1
0
forked from me/IronOS
Files
IronOS/source/Core/Threads/OperatingModes/utils/DrawTipTemperature.cpp
Ivan Zorin c7574c4d0c Implement printSymbolDeg() helper function as method for OLED class (#1743)
* implement printSymbolDeg() helper function as method for OLED class

* Remove extra line added by mistake

* OLED::printSymbolDeg - add drawSymbol calls

* OLED: make comments more clear for implemented method

* OLED::printSymbolDeg(): attempt to improve read-ability replacing if/else by switch/case

* OLED::printSymbolDeg() - add comment for drawSymbol to clarify its underhood

* get tipTemp using ?/: instead of if/else

* Implement getTipTemp() helper

* Add missing header

---------

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
2023-07-18 20:38:14 +10:00

15 lines
489 B
C++

#include "OperatingModeUtilities.h"
#include "OperatingModes.h"
#include "TipThermoModel.h"
void gui_drawTipTemp(bool symbol, const FontStyle font) {
// Draw tip temp handling unit conversion & tolerance near setpoint
uint16_t Temp = getTipTemp();
OLED::printNumber(Temp, 3, font); // Draw the tip temp out
if (symbol) {
// For big font, can draw nice symbols, otherwise fall back to chars
OLED::printSymbolDeg(font == FontStyle::LARGE ? FontStyle::EXTRAS : font);
}
}