OTA update continued

This commit is contained in:
Bertrand Songis
2019-04-24 17:23:28 +02:00
parent 1cd8c93455
commit bae1131a1b
6 changed files with 85 additions and 21 deletions
+7 -1
View File
@@ -131,8 +131,11 @@ struct BindInformation {
uint8_t rxUid;
uint8_t lbtMode;
uint8_t flexMode;
PXX2HardwareInformation receiverInformation;
};
typedef void (* ModuleCallback)();
PACK(struct ModuleState {
uint8_t protocol:4;
uint8_t mode:4;
@@ -144,9 +147,12 @@ PACK(struct ModuleState {
ModuleSettings * moduleSettings;
BindInformation * bindInformation;
};
void startBind(BindInformation * destination)
ModuleCallback callback;
void startBind(BindInformation * destination, ModuleCallback bindCallback = nullptr)
{
bindInformation = destination;
callback = bindCallback;
mode = MODULE_MODE_BIND;
#if defined(SIMU)
bindInformation->candidateReceiversCount = 2;