#ifndef CONFIG_H
#define CONFIG_H

#include <Arduino.h>
#include <esp_task_wdt.h>


const uint32_t WTD_TIMEOUT = 60; //Watchdog timeout in seconds

//Pin Setup

const uint8_t echoPin = 15; // Echo Pin of Ultrasonic Sensor
const uint8_t trigPin = 10;  // Trigger Pin of Ultrasonic Sensor


//SIM CHIP communication pin setup

const uint8_t MODEM_TX = 18; //TX pin of SIM module
const uint8_t MODEM_RX = 17; //RX pin of SIM module

//Network Setup
const char APN[] = "EXAMPLE.EXAMPLE.NET"; //APN for SIM card
const char* TS_HOST = "api.thingspeak.com"; //ThingSpeak Hostname
const char* TS_API_KEY = "EXAMPLEAPIKEY"; //ThingSpeak Write API Key

//Ultrasonic Configuration
const float MAX_DEPTH_CM      = 600.0f; // Distance from sensor to bottom (Empty)
const float MIN_READING_CM    = 24.5f;  // Minimum reliable distance for sensor (Full)

// Filtering Logic (MAD Filter)
const int   NUM_SAMPLES       = 30;     // How many bursts to fire per reading
const int   SAMPLE_DELAY_MS   = 200;     // Wait between bursts to let echoes fade

// How often to wake up and measure the water level and upload?
const unsigned long MEASURE_INTERVAL_MS = 2UL * 60UL * 1000UL; // 15 Minutes

#endif // CONFIG_H