Cosmetics
This commit is contained in:
@@ -868,7 +868,7 @@ PACK(struct RadioData {
|
|||||||
int8_t timezone:5;
|
int8_t timezone:5;
|
||||||
uint8_t adjustRTC:1;
|
uint8_t adjustRTC:1;
|
||||||
NOBACKUP(uint8_t inactivityTimer);
|
NOBACKUP(uint8_t inactivityTimer);
|
||||||
uint8_t InternalModuleBaudrate:3;
|
uint8_t internalModuleBaudrate:3;
|
||||||
SPLASH_MODE; /* 3bits */
|
SPLASH_MODE; /* 3bits */
|
||||||
int8_t hapticMode:2 CUST(r_beeperMode,w_beeperMode);
|
int8_t hapticMode:2 CUST(r_beeperMode,w_beeperMode);
|
||||||
int8_t switchesDelay;
|
int8_t switchesDelay;
|
||||||
|
|||||||
@@ -288,10 +288,10 @@ class InternalModuleWindow : public FormGroup {
|
|||||||
new StaticText(this, grid.getLabelSlot(), STR_BAUDRATE, 0,COLOR_THEME_PRIMARY1);
|
new StaticText(this, grid.getLabelSlot(), STR_BAUDRATE, 0,COLOR_THEME_PRIMARY1);
|
||||||
new Choice(this, grid.getFieldSlot(1, 0), STR_CRSF_BAUDRATE, 0,CROSSFIRE_MAX_INTERNAL_BAUDRATE,
|
new Choice(this, grid.getFieldSlot(1, 0), STR_CRSF_BAUDRATE, 0,CROSSFIRE_MAX_INTERNAL_BAUDRATE,
|
||||||
[=]() -> int {
|
[=]() -> int {
|
||||||
return CROSSFIRE_STORE_TO_INDEX(g_eeGeneral.InternalModuleBaudrate);
|
return CROSSFIRE_STORE_TO_INDEX(g_eeGeneral.internalModuleBaudrate);
|
||||||
},
|
},
|
||||||
[=](int newValue) {
|
[=](int newValue) {
|
||||||
g_eeGeneral.InternalModuleBaudrate = CROSSFIRE_INDEX_TO_STORE(newValue);
|
g_eeGeneral.internalModuleBaudrate = CROSSFIRE_INDEX_TO_STORE(newValue);
|
||||||
SET_DIRTY();
|
SET_DIRTY();
|
||||||
restartExternalModule();
|
restartExternalModule();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -537,7 +537,7 @@ void menuRadioHardware(event_t event)
|
|||||||
lcdDrawText(INDENT_WIDTH, y, STR_BAUDRATE);
|
lcdDrawText(INDENT_WIDTH, y, STR_BAUDRATE);
|
||||||
lcdDrawNumber(HW_SETTINGS_COLUMN2, y, INT_CROSSFIRE_BAUDRATE, attr|LEFT);
|
lcdDrawNumber(HW_SETTINGS_COLUMN2, y, INT_CROSSFIRE_BAUDRATE, attr|LEFT);
|
||||||
if (attr) {
|
if (attr) {
|
||||||
g_eeGeneral.InternalModuleBaudrate = CROSSFIRE_INDEX_TO_STORE(checkIncDecModel(event, CROSSFIRE_STORE_TO_INDEX(g_eeGeneral.InternalModuleBaudrate), 0, CROSSFIRE_MAX_INTERNAL_BAUDRATE));
|
g_eeGeneral.internalModuleBaudrate = CROSSFIRE_INDEX_TO_STORE(checkIncDecModel(event, CROSSFIRE_STORE_TO_INDEX(g_eeGeneral.internalModuleBaudrate), 0, CROSSFIRE_MAX_INTERNAL_BAUDRATE));
|
||||||
if (checkIncDec_Ret) {
|
if (checkIncDec_Ret) {
|
||||||
restartInternalModule();
|
restartInternalModule();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_PADDING( 3 ),
|
YAML_PADDING( 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_SIGNED( "splashMode", 3 ),
|
YAML_SIGNED( "splashMode", 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_SIGNED( "splashMode", 3 ),
|
YAML_SIGNED( "splashMode", 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_SIGNED( "splashMode", 3 ),
|
YAML_SIGNED( "splashMode", 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_SIGNED( "splashMode", 3 ),
|
YAML_SIGNED( "splashMode", 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_SIGNED( "splashMode", 3 ),
|
YAML_SIGNED( "splashMode", 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -401,7 +401,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_PADDING( 3 ),
|
YAML_PADDING( 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_PADDING( 3 ),
|
YAML_PADDING( 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_SIGNED( "splashMode", 3 ),
|
YAML_SIGNED( "splashMode", 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_SIGNED( "splashMode", 3 ),
|
YAML_SIGNED( "splashMode", 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_SIGNED( "splashMode", 3 ),
|
YAML_SIGNED( "splashMode", 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_SIGNED( "splashMode", 3 ),
|
YAML_SIGNED( "splashMode", 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_SIGNED( "splashMode", 3 ),
|
YAML_SIGNED( "splashMode", 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_SIGNED( "splashMode", 3 ),
|
YAML_SIGNED( "splashMode", 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_SIGNED( "splashMode", 3 ),
|
YAML_SIGNED( "splashMode", 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ static const struct YamlNode struct_RadioData[] = {
|
|||||||
YAML_SIGNED( "timezone", 5 ),
|
YAML_SIGNED( "timezone", 5 ),
|
||||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||||
YAML_UNSIGNED( "InternalModuleBaudrate", 3 ),
|
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||||
YAML_SIGNED( "splashMode", 3 ),
|
YAML_SIGNED( "splashMode", 3 ),
|
||||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||||
YAML_SIGNED( "switchesDelay", 8 ),
|
YAML_SIGNED( "switchesDelay", 8 ),
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ const uint8_t CROSSFIRE_FRAME_PERIODS[] = {
|
|||||||
% DIM(CROSSFIRE_BAUDRATES)
|
% DIM(CROSSFIRE_BAUDRATES)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define INT_CROSSFIRE_BAUDRATE CROSSFIRE_BAUDRATES[CROSSFIRE_STORE_TO_INDEX(g_eeGeneral.InternalModuleBaudrate)]
|
#define INT_CROSSFIRE_BAUDRATE CROSSFIRE_BAUDRATES[CROSSFIRE_STORE_TO_INDEX(g_eeGeneral.internalModuleBaudrate)]
|
||||||
#define EXT_CROSSFIRE_BAUDRATE CROSSFIRE_BAUDRATES[CROSSFIRE_STORE_TO_INDEX(g_model.moduleData[EXTERNAL_MODULE].crsf.telemetryBaudrate)]
|
#define EXT_CROSSFIRE_BAUDRATE CROSSFIRE_BAUDRATES[CROSSFIRE_STORE_TO_INDEX(g_model.moduleData[EXTERNAL_MODULE].crsf.telemetryBaudrate)]
|
||||||
#define CROSSFIRE_PERIOD (CROSSFIRE_FRAME_PERIODS[CROSSFIRE_STORE_TO_INDEX(g_model.moduleData[EXTERNAL_MODULE].crsf.telemetryBaudrate)] * 1000)
|
#define CROSSFIRE_PERIOD (CROSSFIRE_FRAME_PERIODS[CROSSFIRE_STORE_TO_INDEX(g_model.moduleData[EXTERNAL_MODULE].crsf.telemetryBaudrate)] * 1000)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user