Update ESP32 platform and LoRa batching
This commit is contained in:
@@ -15,6 +15,11 @@ enum class PayloadType : uint8_t {
|
||||
Ack = 4
|
||||
};
|
||||
|
||||
enum class BatchRetryPolicy : uint8_t {
|
||||
Keep = 0,
|
||||
Drop = 1
|
||||
};
|
||||
|
||||
constexpr uint8_t PROTOCOL_VERSION = 1;
|
||||
|
||||
// Pin definitions
|
||||
@@ -48,6 +53,7 @@ constexpr uint8_t LORA_SPREADING_FACTOR = 12;
|
||||
constexpr long LORA_BANDWIDTH = 125E3;
|
||||
constexpr uint8_t LORA_CODING_RATE = 5;
|
||||
constexpr uint8_t LORA_SYNC_WORD = 0x34;
|
||||
constexpr uint8_t LORA_PREAMBLE_LEN = 8;
|
||||
|
||||
// Timing
|
||||
constexpr uint32_t SENDER_WAKE_INTERVAL_SEC = 30;
|
||||
@@ -63,6 +69,8 @@ constexpr uint32_t METER_SEND_INTERVAL_MS = 30000;
|
||||
constexpr uint32_t BATCH_ACK_TIMEOUT_MS = 3000;
|
||||
constexpr uint8_t BATCH_MAX_RETRIES = 2;
|
||||
constexpr uint8_t METER_BATCH_MAX_SAMPLES = 30;
|
||||
constexpr uint8_t BATCH_QUEUE_DEPTH = 10;
|
||||
constexpr BatchRetryPolicy BATCH_RETRY_POLICY = BatchRetryPolicy::Keep;
|
||||
constexpr uint32_t WATCHDOG_TIMEOUT_SEC = 120;
|
||||
constexpr bool ENABLE_HA_DISCOVERY = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user