temp in F

This commit is contained in:
ELY M 2020-03-20 14:20:34 -05:00
parent c58dc9f351
commit e94aa9ba6f
2 changed files with 10 additions and 7 deletions

View File

@ -566,6 +566,7 @@ void drawNetwork(int tmpX, AssetId id) {
u32 drawStatus() {
bool netstatusFlag=0;
bool temperatureFlag=0;
s32 temperatureF=0;
s32 temperature=0;
AssetId id;
@ -583,7 +584,7 @@ u32 drawStatus() {
ThemeLayoutObject *layoutobj = &themeCurrent.layoutObjects[ThemeLayoutId_Status];
u32 tmpX = GetTextXCoordinate(layoutobj->font, layoutobj->posStart[0], tmpstr, 'r');
//Clock
if (layoutobj->visible) DrawText(layoutobj->font, tmpX, layoutobj->posStart[1], themeCurrent.textColor, tmpstr);
drawCharge();
@ -591,7 +592,9 @@ u32 drawStatus() {
if (statusGet(&netstatusFlag, &id, &temperatureFlag, &temperature)) {
if (netstatusFlag) drawNetwork(tmpX, id);
if (temperatureFlag) {
snprintf(tmpstr, sizeof(tmpstr)-1, "%.1f°C", ((float)temperature) / 1000);
//elys mod
temperatureF = ((float)temperature / 1000 * 9 / 5) + 32;
snprintf(tmpstr, sizeof(tmpstr)-1, "%.1f°F (%.1f°C)", (float)temperatureF, (float)temperature / 1000);
DrawTextFromLayout(ThemeLayoutId_Temperature, themeCurrent.textColor, tmpstr);
}
}

View File

@ -163,7 +163,7 @@ void themeStartup(ThemePreset preset) {
[ThemeLayoutId_AttentionText] = {
.visible = true,
.posType = true,
.posStart = {-32, 46 + 18},
.posStart = {-75, 46 + 18}, ///was -32
.font = interuimedium30,
},
@ -314,20 +314,20 @@ void themeStartup(ThemePreset preset) {
[ThemeLayoutId_BatteryCharge] = {
.visible = true,
.posType = false,
.posStart = {1180 - 10 - 24 - 8, 0 + 47 + 10 + 21 + 4},
.posStart = {1180 - 10 - 24 - 8 - 63, 0 + 47 + 10 + 21 + 4},
.font = interuiregular14,
},
[ThemeLayoutId_BatteryIcon] = {
.visible = true,
.posType = false,
.posStart = {1180 - 8 - 24 - 8, 0 + 47 + 10 + 6},
.posStart = {1180 - 8 - 24 - 8 - 63, 0 + 47 + 10 + 6},
},
[ThemeLayoutId_ChargingIcon] = {
.visible = true,
.posType = false,
.posStart = {1180 - 20, 0 + 47 + 10 + 6},
.posStart = {1180 - 20 - 63, 0 + 47 + 10 + 6},
},
[ThemeLayoutId_Status] = {
@ -340,7 +340,7 @@ void themeStartup(ThemePreset preset) {
[ThemeLayoutId_Temperature] = {
.visible = true,
.posType = false,
.posStart = {1180 + 4, 0 + 47 + 10 + + 21 + 6},
.posStart = {1180 + 4 - 63, 0 + 47 + 10 + + 21 + 6},
.font = interuiregular14,
},