Merge with latest 2.3

This commit is contained in:
Bertrand Songis
2020-03-25 12:33:53 +01:00
34 changed files with 788 additions and 497 deletions
+2 -2
View File
@@ -314,12 +314,12 @@ const char * FrskyDeviceFirmwareUpdate::doFlashFirmware(const char * filename, P
}
else {
#if defined(PCBHORUS)
information.productId = FIRMWARE_ID_XJT;
information.productId = FIRMWARE_ID_MODULE_XJT;
#endif
}
#if defined(PCBHORUS)
if (module == INTERNAL_MODULE && information.productId == FIRMWARE_ID_XJT) {
if (module == INTERNAL_MODULE && information.productId == FIRMWARE_ID_MODULE_XJT) {
INTERNAL_MODULE_ON();
RTOS_WAIT_MS(1);
intmoduleSerialStart(38400, true, USART_Parity_No, USART_StopBits_1, USART_WordLength_8b);
+37 -5
View File
@@ -24,6 +24,7 @@
#include "dataconstants.h"
#include "definitions.h"
#include "frsky_pxx2.h"
#include "pulses/modules_helpers.h"
#include "ff.h"
#include "popups.h"
@@ -36,12 +37,43 @@ enum FrskyFirmwareProductFamily {
FIRMWARE_FAMILY_POWER_MANAGEMENT_UNIT,
};
enum FrskyFirmwareProductId {
FIRMWARE_ID_NONE,
FIRMWARE_ID_XJT = 0x01,
FIRMWARE_ID_ISRM = 0x02,
enum FrskyFirmwareModuleProductId {
FIRMWARE_ID_MODULE_NONE,
FIRMWARE_ID_MODULE_XJT = 0x01,
FIRMWARE_ID_MODULE_ISRM = 0x02,
};
enum FrskyFirmwareReceiverProductId {
FIRMWARE_ID_RECEIVER_NONE,
FIRMWARE_ID_RECEIVER_ARCHER = 0xC0, // TODO use the right constant
FIRMWARE_ID_RECEIVER_R9MX = 0xF0, // TODO use the right constant
// TODO fill the table
};
inline bool isReceiverOTAEnabledFromModule(uint8_t moduleIdx, uint8_t productId)
{
switch (productId) {
case FIRMWARE_ID_RECEIVER_ARCHER:
return isModuleISRM(moduleIdx);
case FIRMWARE_ID_RECEIVER_R9MX:
return isModuleR9M(moduleIdx);
// TODO add all those OTA receivers here
/*
"R9-MINI-OTA", // this one has OTA (different bootloader)
"R9-MM-OTA", // this one has OTA (different bootloader)
"R9-SLIM+-OTA", // this one has OTA (different bootloader)
"R9SX", // this one has OTA
*/
default:
return false;
}
}
PACK(struct FrSkyFirmwareInformation {
uint32_t fourcc;
uint8_t headerVersion;
@@ -70,7 +102,7 @@ class FrskyDeviceFirmwareUpdate {
};
public:
FrskyDeviceFirmwareUpdate(ModuleIndex module):
explicit FrskyDeviceFirmwareUpdate(ModuleIndex module):
module(module) {
}