Small fixes and changes
- Allow printing of more log on HOS boot when LOGS are OFF. - A small name refactoring - Add battery warning symbol when battery < 3200mV
This commit is contained in:
@@ -1205,7 +1205,7 @@ static int _restore_emmc_part(emmc_tool_gui_t *gui, char *sd_path, int active_pa
|
||||
}
|
||||
pct = (u64)((u64)(lba_curr - part->lba_start) * 100u) / (u64)(part->lba_end - part->lba_start);
|
||||
if (pct != prevPct)
|
||||
{;
|
||||
{
|
||||
lv_bar_set_value(gui->bar, pct);
|
||||
s_printf(gui->txt_buf, " "SYMBOL_DOT" %d%%", pct);
|
||||
lv_label_set_array_text(gui->label_pct, gui->txt_buf, 32);
|
||||
|
||||
@@ -830,7 +830,7 @@ static void _update_status_bar(void *params)
|
||||
|
||||
bool voltage_empty = batt_volt < 3200;
|
||||
s_printf(label + strlen(label), " mA# (%s%d mV%s)",
|
||||
voltage_empty ? "#FF8000" : "", batt_volt, voltage_empty ? "#" : "");
|
||||
voltage_empty ? "#FF8000 " : "", batt_volt, voltage_empty ? " "SYMBOL_WARNING"#" : "");
|
||||
|
||||
lv_label_set_array_text(status_bar.battery_more, label, 64);
|
||||
lv_obj_realign(status_bar.battery_more);
|
||||
|
||||
@@ -857,7 +857,6 @@ out0:;
|
||||
lv_line_set_style(line_sep, lv_theme_get_current()->line.decor);
|
||||
lv_obj_align(line_sep, label_txt, LV_ALIGN_OUT_BOTTOM_LEFT, -(LV_DPI / 4), LV_DPI / 8);
|
||||
|
||||
|
||||
lv_obj_t *btn = NULL;
|
||||
lv_btn_ext_t *ext;
|
||||
lv_obj_t *btn_label = NULL;
|
||||
|
||||
@@ -758,10 +758,11 @@ static lv_res_t _create_window_sdcard_info_status(lv_obj_t *btn)
|
||||
lv_obj_t * lb_val2 = lv_label_create(val2, lb_desc);
|
||||
|
||||
|
||||
u32 capacity = sd_storage.csd.capacity >> (20 - sd_storage.csd.read_blkbits);
|
||||
s_printf(txt_buf, "#00DDFF v%d.0#\n%02X\n%d MiB\n%d\n%d MB/s (%d MHz)\n%d\nU%d\nV%d\nA%d\n%d",
|
||||
sd_storage.csd.structure + 1, sd_storage.csd.cmdclass, capacity,
|
||||
sd_storage.ssr.bus_width, sd_storage.csd.busspeed, sd_storage.csd.busspeed * 2,
|
||||
s_printf(txt_buf,
|
||||
"#00DDFF v%d.0#\n%02X\n%d MiB\n%d\n%d MB/s (%d MHz)\n%d\nU%d\nV%d\nA%d\n%d",
|
||||
sd_storage.csd.structure + 1, sd_storage.csd.cmdclass, sd_storage.sec_cnt >> 11,
|
||||
sd_storage.ssr.bus_width, sd_storage.csd.busspeed,
|
||||
(sd_storage.csd.busspeed > 10) ? (sd_storage.csd.busspeed * 2) : 50,
|
||||
sd_storage.ssr.speed_class, sd_storage.ssr.uhs_grade, sd_storage.ssr.video_class,
|
||||
sd_storage.ssr.app_class, sd_storage.csd.write_protect);
|
||||
|
||||
@@ -888,7 +889,7 @@ static lv_res_t _create_window_battery_status(lv_obj_t *btn)
|
||||
max17050_get_property(MAX17050_VCELL, &value);
|
||||
bool voltage_empty = value < 3200;
|
||||
s_printf(txt_buf + strlen(txt_buf), "%s%d mV%s\n",
|
||||
voltage_empty ? "#FF8000" : "", value, voltage_empty ? " (Empty!)#" : "");
|
||||
voltage_empty ? "#FF8000 " : "", value, voltage_empty ? " "SYMBOL_WARNING"#" : "");
|
||||
|
||||
max17050_get_property(MAX17050_OCVInternal, &value);
|
||||
s_printf(txt_buf + strlen(txt_buf), "%d mV\n", value);
|
||||
|
||||
@@ -394,7 +394,7 @@ static lv_res_t _create_window_dump_pk12_tool(lv_obj_t *btn)
|
||||
|
||||
if (!h_cfg.se_keygen_done)
|
||||
{
|
||||
tsec_ctxt.fw = (void *)pkg1 + pkg1_id->tsec_off;
|
||||
tsec_ctxt.fw = (void *)(pkg1 + pkg1_id->tsec_off);
|
||||
tsec_ctxt.pkg1 = (void *)pkg1;
|
||||
tsec_ctxt.pkg11_off = pkg1_id->pkg11_off;
|
||||
tsec_ctxt.secmon_base = pkg1_id->secmon_base;
|
||||
|
||||
Reference in New Issue
Block a user