Implement OTA update functionality with configuration and response handling; add necessary protobuf definitions and update main loop integration

This commit is contained in:
2025-10-05 19:34:41 +02:00
parent f176e0df26
commit 46cb1a3a20
8 changed files with 189 additions and 45 deletions
+25 -5
View File
@@ -23,6 +23,8 @@ message HardwareConfig {
bool enable_serial_sensor = 9;
// repeated char sensor_api_key = 10;
// bool enable_ws_sensor = 11;
LedConfig on_override_open_led = 12;
LedConfig on_interception_led = 13;
}
// LED configuration
@@ -61,19 +63,37 @@ message RfidReading {
}
message SensorToControlMessage {
uint32 sensor_id = 1;
oneof payload {
RfidReading rfid_reading = 2;
// Add other sensor message types as needed
}
uint32 sensor_id = 1;
oneof payload {
RfidReading rfid_reading = 2;
SensorOTAEnableResponse ota_response = 3;
// Add other sensor message types as needed
}
}
message SensorOTAEnable {
string ssid = 1;
string password = 2;
uint32 timeout_seconds = 3;
bool as_station_mode = 4;
bool use_static_ip = 5;
string static_ip = 6;
string netmask = 7;
string gateway = 8;
}
message SensorOTAEnableResponse {
bool success = 1;
string ip_address = 2;
string error_message = 3;
}
message ControlToSensorMessage {
uint32 control_id = 1;
oneof payload {
LedConfig led_config = 2;
SensorOTAEnable ota_enable = 3;
// Add other control message types as needed
}
}