mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-28 23:34:03 +00:00
Fn symbol code removed
This commit is contained in:
parent
3bb5a3341c
commit
4ca56ec9cb
@ -113,10 +113,6 @@ uint32_t dopThresholds[5] = {2000, 1000, 500, 200, 100};
|
|||||||
// we'll need to hold onto pointers for the modules that can draw a frame.
|
// we'll need to hold onto pointers for the modules that can draw a frame.
|
||||||
std::vector<MeshModule *> moduleFrames;
|
std::vector<MeshModule *> moduleFrames;
|
||||||
|
|
||||||
// Global variables for screen function overlay symbols
|
|
||||||
std::vector<std::string> functionSymbol;
|
|
||||||
std::string functionSymbolString;
|
|
||||||
|
|
||||||
#if HAS_GPS
|
#if HAS_GPS
|
||||||
// GeoCoord object for the screen
|
// GeoCoord object for the screen
|
||||||
GeoCoord geoCoord;
|
GeoCoord geoCoord;
|
||||||
@ -1300,28 +1296,6 @@ void Screen::decreaseBrightness()
|
|||||||
/* TO DO: add little popup in center of screen saying what brightness level it is set to*/
|
/* TO DO: add little popup in center of screen saying what brightness level it is set to*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void Screen::setFunctionSymbol(std::string sym)
|
|
||||||
{
|
|
||||||
if (std::find(functionSymbol.begin(), functionSymbol.end(), sym) == functionSymbol.end()) {
|
|
||||||
functionSymbol.push_back(sym);
|
|
||||||
functionSymbolString = "";
|
|
||||||
for (auto symbol : functionSymbol) {
|
|
||||||
functionSymbolString = symbol + " " + functionSymbolString;
|
|
||||||
}
|
|
||||||
setFastFramerate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Screen::removeFunctionSymbol(std::string sym)
|
|
||||||
{
|
|
||||||
functionSymbol.erase(std::remove(functionSymbol.begin(), functionSymbol.end(), sym), functionSymbol.end());
|
|
||||||
functionSymbolString = "";
|
|
||||||
for (auto symbol : functionSymbol) {
|
|
||||||
functionSymbolString = symbol + " " + functionSymbolString;
|
|
||||||
}
|
|
||||||
setFastFramerate();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Screen::handleOnPress()
|
void Screen::handleOnPress()
|
||||||
{
|
{
|
||||||
// If screen was off, just wake it, otherwise advance to next frame
|
// If screen was off, just wake it, otherwise advance to next frame
|
||||||
|
|||||||
@ -54,8 +54,6 @@ class Screen
|
|||||||
void startFirmwareUpdateScreen() {}
|
void startFirmwareUpdateScreen() {}
|
||||||
void increaseBrightness() {}
|
void increaseBrightness() {}
|
||||||
void decreaseBrightness() {}
|
void decreaseBrightness() {}
|
||||||
void setFunctionSymbol(std::string) {}
|
|
||||||
void removeFunctionSymbol(std::string) {}
|
|
||||||
void startAlert(const char *) {}
|
void startAlert(const char *) {}
|
||||||
void showSimpleBanner(const char *message, uint32_t durationMs = 0) {}
|
void showSimpleBanner(const char *message, uint32_t durationMs = 0) {}
|
||||||
void showOverlayBanner(BannerOverlayOptions) {}
|
void showOverlayBanner(BannerOverlayOptions) {}
|
||||||
@ -341,9 +339,6 @@ class Screen : public concurrency::OSThread
|
|||||||
void increaseBrightness();
|
void increaseBrightness();
|
||||||
void decreaseBrightness();
|
void decreaseBrightness();
|
||||||
|
|
||||||
void setFunctionSymbol(std::string sym);
|
|
||||||
void removeFunctionSymbol(std::string sym);
|
|
||||||
|
|
||||||
/// Stops showing the boot screen.
|
/// Stops showing the boot screen.
|
||||||
void stopBootScreen() { enqueueCmd(ScreenCmd{.cmd = Cmd::STOP_BOOT_SCREEN}); }
|
void stopBootScreen() { enqueueCmd(ScreenCmd{.cmd = Cmd::STOP_BOOT_SCREEN}); }
|
||||||
|
|
||||||
|
|||||||
@ -30,10 +30,7 @@ int SystemCommandsModule::handleInputEvent(const InputEvent *event)
|
|||||||
switch (event->kbchar) {
|
switch (event->kbchar) {
|
||||||
// Fn key symbols
|
// Fn key symbols
|
||||||
case INPUT_BROKER_MSG_FN_SYMBOL_ON:
|
case INPUT_BROKER_MSG_FN_SYMBOL_ON:
|
||||||
IF_SCREEN(screen->setFunctionSymbol("Fn"));
|
|
||||||
return 0;
|
|
||||||
case INPUT_BROKER_MSG_FN_SYMBOL_OFF:
|
case INPUT_BROKER_MSG_FN_SYMBOL_OFF:
|
||||||
IF_SCREEN(screen->removeFunctionSymbol("Fn"));
|
|
||||||
return 0;
|
return 0;
|
||||||
// Brightness
|
// Brightness
|
||||||
case INPUT_BROKER_MSG_BRIGHTNESS_UP:
|
case INPUT_BROKER_MSG_BRIGHTNESS_UP:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user