Skip to content

Commit 72010f6

Browse files
jcyriofifieldt
authored andcommitted
fix 'symbal' typo (meshtastic#5395)
1 parent 0193e57 commit 72010f6

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed

src/graphics/Screen.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ std::vector<MeshModule *> moduleFrames;
101101
static char ourId[5];
102102

103103
// vector where symbols (string) are displayed in bottom corner of display.
104-
std::vector<std::string> functionSymbals;
105-
// string displayed in bottom right corner of display. Created from elements in functionSymbals vector
106-
std::string functionSymbalString = "";
104+
std::vector<std::string> functionSymbol;
105+
// string displayed in bottom right corner of display. Created from elements in functionSymbol vector
106+
std::string functionSymbolString = "";
107107

108108
#if HAS_GPS
109109
// GeoCoord object for the screen
@@ -243,10 +243,10 @@ static void drawWelcomeScreen(OLEDDisplay *display, OLEDDisplayUiState *state, i
243243
static void drawFunctionOverlay(OLEDDisplay *display, OLEDDisplayUiState *state)
244244
{
245245
// LOG_DEBUG("Draw function overlay");
246-
if (functionSymbals.begin() != functionSymbals.end()) {
246+
if (functionSymbol.begin() != functionSymbol.end()) {
247247
char buf[64];
248248
display->setFont(FONT_SMALL);
249-
snprintf(buf, sizeof(buf), "%s", functionSymbalString.c_str());
249+
snprintf(buf, sizeof(buf), "%s", functionSymbolString.c_str());
250250
display->drawString(SCREEN_WIDTH - display->getStringWidth(buf), SCREEN_HEIGHT - FONT_HEIGHT_SMALL, buf);
251251
}
252252
}
@@ -2252,24 +2252,24 @@ void Screen::decreaseBrightness()
22522252
/* TO DO: add little popup in center of screen saying what brightness level it is set to*/
22532253
}
22542254

2255-
void Screen::setFunctionSymbal(std::string sym)
2255+
void Screen::setFunctionSymbol(std::string sym)
22562256
{
2257-
if (std::find(functionSymbals.begin(), functionSymbals.end(), sym) == functionSymbals.end()) {
2258-
functionSymbals.push_back(sym);
2259-
functionSymbalString = "";
2260-
for (auto symbol : functionSymbals) {
2261-
functionSymbalString = symbol + " " + functionSymbalString;
2257+
if (std::find(functionSymbol.begin(), functionSymbol.end(), sym) == functionSymbol.end()) {
2258+
functionSymbol.push_back(sym);
2259+
functionSymbolString = "";
2260+
for (auto symbol : functionSymbol) {
2261+
functionSymbolString = symbol + " " + functionSymbolString;
22622262
}
22632263
setFastFramerate();
22642264
}
22652265
}
22662266

2267-
void Screen::removeFunctionSymbal(std::string sym)
2267+
void Screen::removeFunctionSymbol(std::string sym)
22682268
{
2269-
functionSymbals.erase(std::remove(functionSymbals.begin(), functionSymbals.end(), sym), functionSymbals.end());
2270-
functionSymbalString = "";
2271-
for (auto symbol : functionSymbals) {
2272-
functionSymbalString = symbol + " " + functionSymbalString;
2269+
functionSymbol.erase(std::remove(functionSymbol.begin(), functionSymbol.end(), sym), functionSymbol.end());
2270+
functionSymbolString = "";
2271+
for (auto symbol : functionSymbol) {
2272+
functionSymbolString = symbol + " " + functionSymbolString;
22732273
}
22742274
setFastFramerate();
22752275
}

src/graphics/Screen.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class Screen
2424
void startFirmwareUpdateScreen() {}
2525
void increaseBrightness() {}
2626
void decreaseBrightness() {}
27-
void setFunctionSymbal(std::string) {}
28-
void removeFunctionSymbal(std::string) {}
27+
void setFunctionSymbol(std::string) {}
28+
void removeFunctionSymbol(std::string) {}
2929
void startAlert(const char *) {}
3030
void endAlert() {}
3131
};
@@ -282,8 +282,8 @@ class Screen : public concurrency::OSThread
282282
void increaseBrightness();
283283
void decreaseBrightness();
284284

285-
void setFunctionSymbal(std::string sym);
286-
void removeFunctionSymbal(std::string sym);
285+
void setFunctionSymbol(std::string sym);
286+
void removeFunctionSymbol(std::string sym);
287287

288288
/// Stops showing the boot screen.
289289
void stopBootScreen() { enqueueCmd(ScreenCmd{.cmd = Cmd::STOP_BOOT_SCREEN}); }
@@ -605,4 +605,4 @@ class Screen : public concurrency::OSThread
605605

606606
} // namespace graphics
607607

608-
#endif
608+
#endif

src/modules/CannedMessageModule.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,13 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
234234
screen->decreaseBrightness();
235235
LOG_DEBUG("Decrease Screen Brightness");
236236
break;
237-
case INPUT_BROKER_MSG_FN_SYMBOL_ON: // draw modifier (function) symbal
237+
case INPUT_BROKER_MSG_FN_SYMBOL_ON: // draw modifier (function) symbol
238238
if (screen)
239-
screen->setFunctionSymbal("Fn");
239+
screen->setFunctionSymbol("Fn");
240240
break;
241-
case INPUT_BROKER_MSG_FN_SYMBOL_OFF: // remove modifier (function) symbal
241+
case INPUT_BROKER_MSG_FN_SYMBOL_OFF: // remove modifier (function) symbol
242242
if (screen)
243-
screen->removeFunctionSymbal("Fn");
243+
screen->removeFunctionSymbol("Fn");
244244
break;
245245
// mute (switch off/toggle) external notifications on fn+m
246246
case INPUT_BROKER_MSG_MUTE_TOGGLE:
@@ -249,13 +249,13 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
249249
externalNotificationModule->setMute(false);
250250
showTemporaryMessage("Notifications \nEnabled");
251251
if (screen)
252-
screen->removeFunctionSymbal("M"); // remove the mute symbol from the bottom right corner
252+
screen->removeFunctionSymbol("M"); // remove the mute symbol from the bottom right corner
253253
} else {
254254
externalNotificationModule->stopNow(); // this will turn off all GPIO and sounds and idle the loop
255255
externalNotificationModule->setMute(true);
256256
showTemporaryMessage("Notifications \nDisabled");
257257
if (screen)
258-
screen->setFunctionSymbal("M"); // add the mute symbol to the bottom right corner
258+
screen->setFunctionSymbol("M"); // add the mute symbol to the bottom right corner
259259
}
260260
}
261261
break;
@@ -308,7 +308,7 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
308308
break;
309309
}
310310
if (screen && (event->kbchar != INPUT_BROKER_MSG_FN_SYMBOL_ON)) {
311-
screen->removeFunctionSymbal("Fn"); // remove modifier (function) symbal
311+
screen->removeFunctionSymbol("Fn"); // remove modifier (function) symbol
312312
}
313313
}
314314

@@ -672,7 +672,7 @@ int32_t CannedMessageModule::runOnce()
672672
break;
673673
}
674674
if (screen)
675-
screen->removeFunctionSymbal("Fn");
675+
screen->removeFunctionSymbol("Fn");
676676
}
677677

678678
this->lastTouchMillis = millis();

0 commit comments

Comments
 (0)