refactor: Notify module driver on config changes (#3780)

This commit is contained in:
Raphael Coeffic
2023-10-01 15:19:17 +10:00
committed by GitHub
parent c0744f2af3
commit 00cb9c48df
13 changed files with 220 additions and 139 deletions
+8 -5
View File
@@ -27,11 +27,8 @@ enum ChannelsProtocols {
PROTOCOL_CHANNELS_UNINITIALIZED,
PROTOCOL_CHANNELS_NONE,
PROTOCOL_CHANNELS_PPM,
PROTOCOL_CHANNELS_PPM_MLINK,
PROTOCOL_CHANNELS_PXX1,
PROTOCOL_CHANNELS_DSM2_LP45,
PROTOCOL_CHANNELS_DSM2_DSM2,
PROTOCOL_CHANNELS_DSM2_DSMX,
PROTOCOL_CHANNELS_DSM2,
PROTOCOL_CHANNELS_CROSSFIRE,
PROTOCOL_CHANNELS_MULTIMODULE,
PROTOCOL_CHANNELS_SBUS,
@@ -57,5 +54,11 @@ struct etx_proto_driver_t {
void (*sendPulses)(void* ctx, uint8_t* buffer, int16_t* channels, uint8_t nChannels);
// Process input data byte (telemetry)
void (*processData)(void* context, uint8_t data, uint8_t* buffer, uint8_t* len);
void (*processData)(void* ctx, uint8_t data, uint8_t* buffer, uint8_t* len);
// Some module settings may have been modified
void (*onConfigChange)(void* ctx);
// Module state mode has been modified
// void (*onModeChange)(void* ctx, uint8_t old_mode, uint8_t new_mode);
};