Skip to content

Commit

Permalink
fix Vcom bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ShallowGreen123 committed Feb 20, 2025
1 parent a332821 commit dadf09e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/factory/main/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2497,7 +2497,7 @@ static void create8(lv_obj_t *parent)
}
else
{
ui_setting_set_vcom(5000);
ui_shutdown_vcom(5000);

lv_obj_t * img = lv_img_create(parent);
lv_img_set_src(img, &img_start);
Expand Down
9 changes: 9 additions & 0 deletions examples/factory/main/ui_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ void ui_nvs_set_defaulat_param(void)
epd_vcom_default = nvs_param_get_u16(NVS_ID_EPD_VCOM);
refresh_mode = nvs_param_get_u8(NVS_ID_REFRESH_MODE);

printf("ui_setting_backlight = %d\n", ui_setting_backlight );
printf("epd_vcom_default = %d\n", epd_vcom_default );
printf("refresh_mode = %d\n", refresh_mode );

ui_setting_set_backlight(ui_setting_backlight);
}

Expand Down Expand Up @@ -496,6 +500,11 @@ void ui_gps_get_speed(double *speed)
}

//************************************[ screen 8 ]****************************************** shutdown
void ui_shutdown_vcom(int v)
{
epd_set_vcom(v);
}

void ui_shutdown(void)
{
PPM.shutdown();
Expand Down
1 change: 1 addition & 0 deletions examples/factory/main/ui_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ void ui_gps_get_time(uint8_t *hour, uint8_t *minute, uint8_t *second);
void ui_gps_get_satellites(uint32_t *vsat);
void ui_gps_get_speed(double *speed);
// shutdown
void ui_shutdown_vcom(int v);
void ui_shutdown(void);

void ui_sleep(void);
Expand Down

0 comments on commit dadf09e

Please sign in to comment.