mirror of
https://github.com/agessaman/MeshCore.git
synced 2026-10-23 19:22:39 +00:00
Add new MQTT presets for Mesh Core CA and update compile-time defaults
- Introduced two new MQTT presets: `meshcore-ca-1` and `meshcore-ca-2`. - Updated documentation to reflect compile-time configuration options for MQTT defaults, including slot presets, IATA, and timezone settings. - Removed legacy default MQTT settings from the code, now relying on the new configuration approach.
This commit is contained in:
1 parent
3f5ddcac4c
commit
d669d4dbd4
6 files changed
+139
-62
No files matched your search
@@ -692,28 +692,12 @@ MyMesh::MyMesh(mesh::MainBoard &board, mesh::Radio &radio, mesh::MillisecondCloc
|
||||
_prefs.bridge_baud = 115200; // baud rate
|
||||
_prefs.bridge_channel = 1; // channel 1
|
||||
|
||||
// MQTT defaults (same as repeater; empty mqtt_origin follows node_name when publishing)
|
||||
// MQTT slot/IATA/timezone defaults come from /mqtt_prefs via loadPrefs (see MQTTDefaults.h)
|
||||
_prefs.mqtt_origin[0] = '\0';
|
||||
StrHelper::strncpy(_prefs.mqtt_iata, "SEA", sizeof(_prefs.mqtt_iata));
|
||||
_prefs.mqtt_status_enabled = 1; // enabled
|
||||
_prefs.mqtt_packets_enabled = 1; // enabled
|
||||
_prefs.mqtt_raw_enabled = 0; // disabled
|
||||
_prefs.mqtt_tx_enabled = 2; // advert: own adverts only (matches MQTTPrefs default)
|
||||
_prefs.mqtt_rx_enabled = 1; // RX packets enabled by default
|
||||
_prefs.mqtt_status_interval = 300000; // 5 minutes
|
||||
|
||||
// WiFi defaults (same as repeater)
|
||||
|
||||
// WiFi defaults (user-configured via CLI; placeholders until set)
|
||||
StrHelper::strncpy(_prefs.wifi_ssid, "ssid_here", sizeof(_prefs.wifi_ssid));
|
||||
StrHelper::strncpy(_prefs.wifi_password, "password_here", sizeof(_prefs.wifi_password));
|
||||
|
||||
// Timezone defaults (same as repeater - Pacific Time with DST support)
|
||||
StrHelper::strncpy(_prefs.timezone_string, "America/Los_Angeles", sizeof(_prefs.timezone_string));
|
||||
_prefs.timezone_offset = -8; // fallback
|
||||
|
||||
// MQTT slot presets (analyzer-us and analyzer-eu enabled by default)
|
||||
StrHelper::strncpy(_prefs.mqtt_slot_preset[0], "analyzer-us", sizeof(_prefs.mqtt_slot_preset[0]));
|
||||
StrHelper::strncpy(_prefs.mqtt_slot_preset[1], "analyzer-eu", sizeof(_prefs.mqtt_slot_preset[1]));
|
||||
StrHelper::strncpy(_prefs.mqtt_slot_preset[2], "none", sizeof(_prefs.mqtt_slot_preset[2]));
|
||||
|
||||
next_post_idx = 0;
|
||||
next_client_idx = 0;
|
||||
|
||||
Reference in new issue
Block a user