mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-03 04:15:53 +00:00
fix MESHTASTIC_EXCLUDE_I2C compile errors
This commit is contained in:
parent
cd170fb011
commit
5033fd1f9f
@ -318,10 +318,13 @@ void menuHandler::positionBaseMenu()
|
|||||||
static const char *optionsArray[] = {"Back", "GPS Toggle", "Compass"};
|
static const char *optionsArray[] = {"Back", "GPS Toggle", "Compass"};
|
||||||
static const char *optionsArrayCalibrate[] = {"Back", "GPS Toggle", "Compass", "Compass Calibrate"};
|
static const char *optionsArrayCalibrate[] = {"Back", "GPS Toggle", "Compass", "Compass Calibrate"};
|
||||||
|
|
||||||
|
#if !MESHTASTIC_EXCLUDE_I2C
|
||||||
if (accelerometerThread) {
|
if (accelerometerThread) {
|
||||||
optionsArrayPtr = optionsArrayCalibrate;
|
optionsArrayPtr = optionsArrayCalibrate;
|
||||||
options = 4;
|
options = 4;
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
optionsArrayPtr = optionsArray;
|
optionsArrayPtr = optionsArray;
|
||||||
options = 3;
|
options = 3;
|
||||||
}
|
}
|
||||||
@ -334,9 +337,15 @@ void menuHandler::positionBaseMenu()
|
|||||||
#endif
|
#endif
|
||||||
} else if (selected == 2) {
|
} else if (selected == 2) {
|
||||||
menuQueue = compass_point_north_menu;
|
menuQueue = compass_point_north_menu;
|
||||||
} else if (selected == 3) {
|
}
|
||||||
|
#if !MESHTASTIC_EXCLUDE_I2C
|
||||||
|
else if (selected == 3) {
|
||||||
accelerometerThread->calibrate(30);
|
accelerometerThread->calibrate(30);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
else {
|
||||||
|
menuQueue = menu_none;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ void setupModules()
|
|||||||
#endif
|
#endif
|
||||||
// Example: Put your module here
|
// Example: Put your module here
|
||||||
// new ReplyModule();
|
// new ReplyModule();
|
||||||
#if (HAS_BUTTON || ARCH_PORTDUINO) && !MESHTASTIC_EXCLUDE_INPUTBROKER
|
#if (HAS_BUTTON || ARCH_PORTDUINO) && !MESHTASTIC_EXCLUDE_INPUTBROKER && !MESHTASTIC_EXCLUDE_I2C
|
||||||
|
|
||||||
if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {
|
if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {
|
||||||
rotaryEncoderInterruptImpl1 = new RotaryEncoderInterruptImpl1();
|
rotaryEncoderInterruptImpl1 = new RotaryEncoderInterruptImpl1();
|
||||||
|
Loading…
Reference in New Issue
Block a user