temp in F
This commit is contained in:
parent
c58dc9f351
commit
e94aa9ba6f
@ -566,6 +566,7 @@ void drawNetwork(int tmpX, AssetId id) {
|
|||||||
u32 drawStatus() {
|
u32 drawStatus() {
|
||||||
bool netstatusFlag=0;
|
bool netstatusFlag=0;
|
||||||
bool temperatureFlag=0;
|
bool temperatureFlag=0;
|
||||||
|
s32 temperatureF=0;
|
||||||
s32 temperature=0;
|
s32 temperature=0;
|
||||||
AssetId id;
|
AssetId id;
|
||||||
|
|
||||||
@ -583,7 +584,7 @@ u32 drawStatus() {
|
|||||||
ThemeLayoutObject *layoutobj = &themeCurrent.layoutObjects[ThemeLayoutId_Status];
|
ThemeLayoutObject *layoutobj = &themeCurrent.layoutObjects[ThemeLayoutId_Status];
|
||||||
|
|
||||||
u32 tmpX = GetTextXCoordinate(layoutobj->font, layoutobj->posStart[0], tmpstr, 'r');
|
u32 tmpX = GetTextXCoordinate(layoutobj->font, layoutobj->posStart[0], tmpstr, 'r');
|
||||||
|
//Clock
|
||||||
if (layoutobj->visible) DrawText(layoutobj->font, tmpX, layoutobj->posStart[1], themeCurrent.textColor, tmpstr);
|
if (layoutobj->visible) DrawText(layoutobj->font, tmpX, layoutobj->posStart[1], themeCurrent.textColor, tmpstr);
|
||||||
|
|
||||||
drawCharge();
|
drawCharge();
|
||||||
@ -591,7 +592,9 @@ u32 drawStatus() {
|
|||||||
if (statusGet(&netstatusFlag, &id, &temperatureFlag, &temperature)) {
|
if (statusGet(&netstatusFlag, &id, &temperatureFlag, &temperature)) {
|
||||||
if (netstatusFlag) drawNetwork(tmpX, id);
|
if (netstatusFlag) drawNetwork(tmpX, id);
|
||||||
if (temperatureFlag) {
|
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);
|
DrawTextFromLayout(ThemeLayoutId_Temperature, themeCurrent.textColor, tmpstr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
[ThemeLayoutId_AttentionText] = {
|
[ThemeLayoutId_AttentionText] = {
|
||||||
.visible = true,
|
.visible = true,
|
||||||
.posType = true,
|
.posType = true,
|
||||||
.posStart = {-32, 46 + 18},
|
.posStart = {-75, 46 + 18}, ///was -32
|
||||||
.font = interuimedium30,
|
.font = interuimedium30,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -314,20 +314,20 @@ void themeStartup(ThemePreset preset) {
|
|||||||
[ThemeLayoutId_BatteryCharge] = {
|
[ThemeLayoutId_BatteryCharge] = {
|
||||||
.visible = true,
|
.visible = true,
|
||||||
.posType = false,
|
.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,
|
.font = interuiregular14,
|
||||||
},
|
},
|
||||||
|
|
||||||
[ThemeLayoutId_BatteryIcon] = {
|
[ThemeLayoutId_BatteryIcon] = {
|
||||||
.visible = true,
|
.visible = true,
|
||||||
.posType = false,
|
.posType = false,
|
||||||
.posStart = {1180 - 8 - 24 - 8, 0 + 47 + 10 + 6},
|
.posStart = {1180 - 8 - 24 - 8 - 63, 0 + 47 + 10 + 6},
|
||||||
},
|
},
|
||||||
|
|
||||||
[ThemeLayoutId_ChargingIcon] = {
|
[ThemeLayoutId_ChargingIcon] = {
|
||||||
.visible = true,
|
.visible = true,
|
||||||
.posType = false,
|
.posType = false,
|
||||||
.posStart = {1180 - 20, 0 + 47 + 10 + 6},
|
.posStart = {1180 - 20 - 63, 0 + 47 + 10 + 6},
|
||||||
},
|
},
|
||||||
|
|
||||||
[ThemeLayoutId_Status] = {
|
[ThemeLayoutId_Status] = {
|
||||||
@ -340,7 +340,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
[ThemeLayoutId_Temperature] = {
|
[ThemeLayoutId_Temperature] = {
|
||||||
.visible = true,
|
.visible = true,
|
||||||
.posType = false,
|
.posType = false,
|
||||||
.posStart = {1180 + 4, 0 + 47 + 10 + + 21 + 6},
|
.posStart = {1180 + 4 - 63, 0 + 47 + 10 + + 21 + 6},
|
||||||
.font = interuiregular14,
|
.font = interuiregular14,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user