mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-02 20:05:52 +00:00
Fix build when MESHTASTIC_EXCLUDE_GPS is defined (#7154)
* Fix LED pinout for T-Echo board marked v1.0, date 2021-6-28 * Merge PR #420 * Fixed double and missing Default class. * Use correct format specifier and fixed typo. * Removed duplicate code. * Fix error: #if with no expression * Fix warning: extra tokens at end of #endif directive. * Fix antenna switching logic. Complementary-pin control logic is required on the rp2040-lora board. * Fix deprecated macros. * Set RP2040 in dormant mode when deep sleep is triggered. * Fix array out of bounds read. * Admin key count needs to be set otherwise the key will be zero loaded after reset. * Don't reset the admin key size when loading defaults. Preserve an existing key in config if possible. * Remove log spam when reading INA voltage sensor. * Remove static declaration for admin keys from userPrefs.h. Load hard coded admin keys in case config file has empty slots. * Removed newlines from log. * Fix issue #5665. * Fix build for Pico2 RP2350 platform. * Enable Wifi client on Pico2W. * Use correct processor on Pico2. * Fix deprecated warning. * Update platform and framework for RP2350. * Added Pico2W variant including Wifi support. * Fix typo in used variant. * Remove obsolete define. * Fix for native Linux build. * Simplify RP2350 platform tag reference. Co-authored-by: Austin <vidplace7@gmail.com> * Cast user prefs strings. * Update to last successfully building platform package. * Define I2C GPIOs to ensure usage of both ports. Possibly fixes #5361 * RAK11310 support for RAK12002 RTC added. * Update platform and framework packages to 4.4.3. * Use RP2040 base platform and framework package. Use RAK11300 board definition in arduino-pico framework. * Use RAK11300 board definition in arduino-pico framework. * Fix build when MESHTASTIC_EXCLUDE_GPS is defined. --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com> Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com> Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com> Co-authored-by: Austin <vidplace7@gmail.com> Co-authored-by: Tom Fifield <tom@tomfifield.net>
This commit is contained in:
parent
aadea89202
commit
17f8303e01
@ -327,7 +327,11 @@ void menuHandler::positionBaseMenu()
|
|||||||
}
|
}
|
||||||
screen->showOverlayBanner("Position Action", 30000, optionsArrayPtr, options, [](int selected) -> void {
|
screen->showOverlayBanner("Position Action", 30000, optionsArrayPtr, options, [](int selected) -> void {
|
||||||
if (selected == 1) {
|
if (selected == 1) {
|
||||||
|
#if MESHTASTIC_EXCLUDE_GPS
|
||||||
|
menuQueue = menu_none;
|
||||||
|
#else
|
||||||
menuQueue = gps_toggle_menu;
|
menuQueue = gps_toggle_menu;
|
||||||
|
#endif
|
||||||
} else if (selected == 2) {
|
} else if (selected == 2) {
|
||||||
menuQueue = compass_point_north_menu;
|
menuQueue = compass_point_north_menu;
|
||||||
} else if (selected == 3) {
|
} else if (selected == 3) {
|
||||||
@ -390,6 +394,7 @@ void menuHandler::compassNorthMenu()
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !MESHTASTIC_EXCLUDE_GPS
|
||||||
void menuHandler::GPSToggleMenu()
|
void menuHandler::GPSToggleMenu()
|
||||||
{
|
{
|
||||||
static const char *optionsArray[] = {"Back", "Enabled", "Disabled"};
|
static const char *optionsArray[] = {"Back", "Enabled", "Disabled"};
|
||||||
@ -412,6 +417,7 @@ void menuHandler::GPSToggleMenu()
|
|||||||
},
|
},
|
||||||
config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED ? 1 : 2); // set inital selection
|
config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED ? 1 : 2); // set inital selection
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void menuHandler::BuzzerModeMenu()
|
void menuHandler::BuzzerModeMenu()
|
||||||
{
|
{
|
||||||
@ -461,9 +467,11 @@ void menuHandler::handleMenuSwitch()
|
|||||||
case position_base_menu:
|
case position_base_menu:
|
||||||
positionBaseMenu();
|
positionBaseMenu();
|
||||||
break;
|
break;
|
||||||
|
#if !MESHTASTIC_EXCLUDE_GPS
|
||||||
case gps_toggle_menu:
|
case gps_toggle_menu:
|
||||||
GPSToggleMenu();
|
GPSToggleMenu();
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case compass_point_north_menu:
|
case compass_point_north_menu:
|
||||||
compassNorthMenu();
|
compassNorthMenu();
|
||||||
break;
|
break;
|
||||||
|
@ -13,7 +13,9 @@ class menuHandler
|
|||||||
clock_face_picker,
|
clock_face_picker,
|
||||||
clock_menu,
|
clock_menu,
|
||||||
position_base_menu,
|
position_base_menu,
|
||||||
|
#if !MESHTASTIC_EXCLUDE_GPS
|
||||||
gps_toggle_menu,
|
gps_toggle_menu,
|
||||||
|
#endif
|
||||||
compass_point_north_menu,
|
compass_point_north_menu,
|
||||||
reset_node_db_menu
|
reset_node_db_menu
|
||||||
};
|
};
|
||||||
|
@ -44,22 +44,20 @@ std::string sanitizeString(const std::string &input)
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !MESHTASTIC_EXCLUDE_GPS
|
|
||||||
|
|
||||||
// External variables
|
// External variables
|
||||||
extern graphics::Screen *screen;
|
extern graphics::Screen *screen;
|
||||||
|
|
||||||
namespace graphics
|
namespace graphics
|
||||||
{
|
{
|
||||||
|
NodeNum UIRenderer::currentFavoriteNodeNum = 0;
|
||||||
|
|
||||||
|
#if !MESHTASTIC_EXCLUDE_GPS
|
||||||
// GeoCoord object for coordinate conversions
|
// GeoCoord object for coordinate conversions
|
||||||
extern GeoCoord geoCoord;
|
extern GeoCoord geoCoord;
|
||||||
|
|
||||||
// Threshold values for the GPS lock accuracy bar display
|
// Threshold values for the GPS lock accuracy bar display
|
||||||
extern uint32_t dopThresholds[5];
|
extern uint32_t dopThresholds[5];
|
||||||
|
|
||||||
NodeNum UIRenderer::currentFavoriteNodeNum = 0;
|
|
||||||
|
|
||||||
// Draw GPS status summary
|
// Draw GPS status summary
|
||||||
void UIRenderer::drawGps(OLEDDisplay *display, int16_t x, int16_t y, const meshtastic::GPSStatus *gps)
|
void UIRenderer::drawGps(OLEDDisplay *display, int16_t x, int16_t y, const meshtastic::GPSStatus *gps)
|
||||||
{
|
{
|
||||||
@ -188,6 +186,7 @@ void UIRenderer::drawGpsCoordinates(OLEDDisplay *display, int16_t x, int16_t y,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif // !MESHTASTIC_EXCLUDE_GPS
|
||||||
|
|
||||||
// Draw nodes status
|
// Draw nodes status
|
||||||
void UIRenderer::drawNodes(OLEDDisplay *display, int16_t x, int16_t y, const meshtastic::NodeStatus *nodeStatus, int node_offset,
|
void UIRenderer::drawNodes(OLEDDisplay *display, int16_t x, int16_t y, const meshtastic::NodeStatus *nodeStatus, int node_offset,
|
||||||
@ -1242,5 +1241,4 @@ std::string UIRenderer::drawTimeDelta(uint32_t days, uint32_t hours, uint32_t mi
|
|||||||
|
|
||||||
} // namespace graphics
|
} // namespace graphics
|
||||||
|
|
||||||
#endif // !MESHTASTIC_EXCLUDE_GPS
|
|
||||||
#endif // HAS_SCREEN
|
#endif // HAS_SCREEN
|
Loading…
Reference in New Issue
Block a user