1
0
forked from me/IronOS

Create DrawTipTemperature.cpp

This commit is contained in:
Ben V. Brown
2022-11-22 18:25:38 +11:00
parent af55cd5da4
commit 3836915b19

View File

@@ -0,0 +1,29 @@
#include "OperatingModeUtilities.h"
#include "TipThermoModel.h"
void gui_drawTipTemp(bool symbol, const FontStyle font) {
// Draw tip temp handling unit conversion & tolerance near setpoint
uint32_t Temp = 0;
if (getSettingValue(SettingsOptions::TemperatureInF)) {
Temp = TipThermoModel::getTipInF();
} else {
Temp = TipThermoModel::getTipInC();
}
OLED::printNumber(Temp, 3, font); // Draw the tip temp out
if (symbol) {
if (font == FontStyle::LARGE) {
// Big font, can draw nice symbols
if (getSettingValue(SettingsOptions::TemperatureInF))
OLED::drawSymbol(0);
else
OLED::drawSymbol(1);
} else {
// Otherwise fall back to chars
if (getSettingValue(SettingsOptions::TemperatureInF))
OLED::print(SymbolDegF, FontStyle::SMALL);
else
OLED::print(SymbolDegC, FontStyle::SMALL);
}
}
}