mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-31 19:05:44 +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 *optionsArrayCalibrate[] = {"Back", "GPS Toggle", "Compass", "Compass Calibrate"};
|
||||
|
||||
#if !MESHTASTIC_EXCLUDE_I2C
|
||||
if (accelerometerThread) {
|
||||
optionsArrayPtr = optionsArrayCalibrate;
|
||||
options = 4;
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
optionsArrayPtr = optionsArray;
|
||||
options = 3;
|
||||
}
|
||||
@ -334,9 +337,15 @@ void menuHandler::positionBaseMenu()
|
||||
#endif
|
||||
} else if (selected == 2) {
|
||||
menuQueue = compass_point_north_menu;
|
||||
} else if (selected == 3) {
|
||||
}
|
||||
#if !MESHTASTIC_EXCLUDE_I2C
|
||||
else if (selected == 3) {
|
||||
accelerometerThread->calibrate(30);
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
menuQueue = menu_none;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ void setupModules()
|
||||
#endif
|
||||
// Example: Put your module here
|
||||
// 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) {
|
||||
rotaryEncoderInterruptImpl1 = new RotaryEncoderInterruptImpl1();
|
||||
|
Loading…
Reference in New Issue
Block a user