refactor: Notify module driver on config changes (#3780)
This commit is contained in:
@@ -181,7 +181,7 @@ void mlinkSetDefault(int index, uint16_t id, uint8_t subId, uint8_t instance)
|
||||
storageDirty(EE_MODEL);
|
||||
}
|
||||
|
||||
void processExternalMLinkSerialData(void* ctx, uint8_t data, uint8_t* buffer, uint8_t* len) {
|
||||
void processExternalMLinkSerialData(uint8_t module, uint8_t data, uint8_t* buffer, uint8_t* len) {
|
||||
static bool destuff = false; // byte requires adjustment
|
||||
static bool started = false; // start of frame detected
|
||||
|
||||
|
||||
@@ -65,4 +65,4 @@ void processMLinkPacket(const uint8_t *packet, bool multi);
|
||||
// used by external MLink module driver
|
||||
#define PPM_MSB_BAUDRATE 115200
|
||||
|
||||
void processExternalMLinkSerialData(void* ctx, uint8_t data, uint8_t* buffer, uint8_t* len);
|
||||
void processExternalMLinkSerialData(uint8_t module, uint8_t data, uint8_t* buffer, uint8_t* len);
|
||||
|
||||
@@ -775,8 +775,7 @@ void processDSMBindPacket(uint8_t module, const uint8_t *packet)
|
||||
storageDirty(EE_MODEL);
|
||||
|
||||
moduleState[module].mode = MODULE_MODE_NORMAL;
|
||||
restartModuleAsync(module, 50); // ~200ms
|
||||
|
||||
restartModuleAsync(module, 50); // ~500ms
|
||||
}
|
||||
#if defined(MULTIMODULE)
|
||||
else if (g_model.moduleData[module].type == MODULE_TYPE_MULTIMODULE &&
|
||||
|
||||
@@ -127,7 +127,7 @@ rxStatStruct *getRxStatLabels() {
|
||||
break;
|
||||
#endif
|
||||
case MODULE_TYPE_PPM:
|
||||
if(moduleState[moduleToUse].protocol == PROTOCOL_CHANNELS_PPM_MLINK) {
|
||||
if(g_model.moduleData[moduleToUse].subType == PPM_PROTO_TLM_MLINK) {
|
||||
rxStat.label = STR_RXSTAT_LABEL_RQLY;
|
||||
rxStat.unit = STR_RXSTAT_UNIT_PERCENT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user