/*
 * PunjabiUni Kisan AWD water-level sensor — configuration TEMPLATE.
 *
 * COPY THIS FILE TO config.h IN THE SAME FOLDER, then fill in your own values.
 * The sketch will not compile until config.h exists.
 *
 *   cp config.example.h config.h
 *
 * NEVER share or publish your filled-in config.h. It holds your WiFi password
 * and your device key — anyone with the key can post readings as you.
 * (config.h is already in this repository's .gitignore.)
 */

#ifndef KISAN_CONFIG_H
#define KISAN_CONFIG_H

// --- Your WiFi -------------------------------------------------------------
// The ESP32 only joins 2.4 GHz networks. If your router runs 2.4 GHz and 5 GHz
// under the same name, the board may still find it — but if it never connects,
// that is the first thing to check.
#define WIFI_SSID "your-wifi-name"
#define WIFI_PASSWORD "your-wifi-password"

// --- Your PunjabiUni device key --------------------------------------------
// Printed ONCE when your farmer account was set up. It is not recoverable —
// if you lose it, a new one has to be issued.
#define KISAN_API_KEY "paste-your-device-key-here"

// Where readings are posted. Replace <your-site> with the real host.
#define KISAN_URL "https://<your-site>/api/kisan/sensor"

// --- This device -----------------------------------------------------------
// A short name for THIS sensor, so you can tell your plots apart on the
// dashboard. Letters, numbers and dashes; 64 characters at most.
#define SENSOR_ID "field-north-pipe-01"

// --- Mounting geometry (measure with a tape, do not compute from pipe
// lengths — the pipe will not be perfectly vertical and will settle) --------
//
// SENSOR_HEIGHT_CM: distance from the transducer face straight down to the
// soil surface, measured once at install and RE-MEASURED after the first
// heavy irrigation (pipes settle). See docs/kisan-idea-sheets/awd-water-sensor.md
// section 6, "Field install".
//
// With the recommended riser (Fix A in that document) this is around 40 cm.
// The value below is a PLACEHOLDER in that ballpark — it is NOT your pipe's
// real height, and using it unchanged will report a wrong water-table depth.
#define SENSOR_HEIGHT_CM 40

// MIN_VALID_CM: the sensor module's own blind zone. A raw distance reading
// below this number is not a small number — it is an UNKNOWN number, and the
// sketch refuses to post it rather than guess. Set to match whichever module
// you actually bought:
//   JSN-SR04T (with the recommended riser)  -> 25
//   A02YYUW / DFRobot SEN0311               -> 3
#define MIN_VALID_CM 25

// --- How often to report ---------------------------------------------------
// Minutes of deep sleep between readings. A paddy water table moves far more
// slowly than a soil-moisture reading does; 60 minutes is plenty.
#define SLEEP_MINUTES 60

#endif  // KISAN_CONFIG_H
