nyx: info: highlight battery temp info if cold/hot

This commit is contained in:
CTCaer 2022-01-16 01:37:26 +02:00
parent 06e7af150e
commit 5a88f7bc06
2 changed files with 4 additions and 10 deletions

View file

@ -2175,11 +2175,11 @@ static lv_res_t _create_window_battery_status(lv_obj_t *btn)
i2c_recv_byte(I2C_5, MAX77621_CPU_I2C_ADDR, MAX77621_CHIPID1_REG)); i2c_recv_byte(I2C_5, MAX77621_CPU_I2C_ADDR, MAX77621_CHIPID1_REG));
break; break;
case 1: case 1:
s_printf(txt_buf + strlen(txt_buf), "max77812-2 v%d", // High power. 2 Outputs, phases 3 1. s_printf(txt_buf + strlen(txt_buf), "max77812-2 v%d", // High power GPU. 2 Outputs, phases 3 1.
i2c_recv_byte(I2C_5, MAX77812_PHASE31_CPU_I2C_ADDR, MAX77812_REG_VERSION) & 7); i2c_recv_byte(I2C_5, MAX77812_PHASE31_CPU_I2C_ADDR, MAX77812_REG_VERSION) & 7);
break; break;
case 2: case 2:
s_printf(txt_buf + strlen(txt_buf), "max77812-3 v%d.0", // Low power. 3 Outputs, phases 2 1 1. s_printf(txt_buf + strlen(txt_buf), "max77812-3 v%d.0", // Low power GPU. 3 Outputs, phases 2 1 1.
i2c_recv_byte(I2C_5, MAX77812_PHASE211_CPU_I2C_ADDR, MAX77812_REG_VERSION) & 7); i2c_recv_byte(I2C_5, MAX77812_PHASE211_CPU_I2C_ADDR, MAX77812_REG_VERSION) & 7);
break; break;
} }
@ -2265,10 +2265,10 @@ static lv_res_t _create_window_battery_status(lv_obj_t *btn)
strcat(txt_buf, "Cool"); strcat(txt_buf, "Cool");
break; break;
case 5: case 5:
strcat(txt_buf, "Cold"); strcat(txt_buf, "#FF8000 Cold#");
break; break;
case 6: case 6:
strcat(txt_buf, "Hot"); strcat(txt_buf, "#FF8000 Hot#");
break; break;
default: default:
s_printf(txt_buf + strlen(txt_buf), "Unknown (%d)", value); s_printf(txt_buf + strlen(txt_buf), "Unknown (%d)", value);

View file

@ -413,12 +413,6 @@ void nyx_init_load_res()
sd_unmount(); sd_unmount();
} }
#if (LV_LOG_PRINTF == 1)
#include <soc/clock.h>
#include <soc/gpio.h>
#include <soc/pinmux.h>
#endif
void ipl_main() void ipl_main()
{ {
//Tegra/Horizon configuration goes to 0x80000000+, package2 goes to 0xA9800000, we place our heap in between. //Tegra/Horizon configuration goes to 0x80000000+, package2 goes to 0xA9800000, we place our heap in between.