some fixes and firmware stabilization
This commit is contained in:
@@ -88,13 +88,13 @@ void weather_forecast_tile_setup( uint32_t tile_num ) {
|
||||
lv_imgbtn_set_src(reload_btn, LV_BTN_STATE_CHECKED_RELEASED, &refresh_32px);
|
||||
lv_imgbtn_set_src(reload_btn, LV_BTN_STATE_CHECKED_PRESSED, &refresh_32px);
|
||||
lv_obj_add_style(reload_btn, LV_IMGBTN_PART_MAIN, &weather_forecast_style );
|
||||
lv_obj_align(reload_btn, weather_forecast_tile, LV_ALIGN_IN_TOP_RIGHT, -10 , STATUSBAR_HEIGHT + 10 );
|
||||
lv_obj_align(reload_btn, weather_forecast_tile, LV_ALIGN_IN_TOP_RIGHT, -10 , 10 );
|
||||
lv_obj_set_event_cb( reload_btn, refresh_weather_widget_event_cb );
|
||||
|
||||
weather_forecast_location_label = lv_label_create( weather_forecast_tile , NULL);
|
||||
lv_label_set_text( weather_forecast_location_label, "n/a");
|
||||
lv_obj_reset_style_list( weather_forecast_location_label, LV_OBJ_PART_MAIN );
|
||||
lv_obj_align( weather_forecast_location_label, weather_forecast_tile, LV_ALIGN_IN_TOP_LEFT, 10, STATUSBAR_HEIGHT + 10 );
|
||||
lv_obj_align( weather_forecast_location_label, weather_forecast_tile, LV_ALIGN_IN_TOP_LEFT, 10, 10 );
|
||||
|
||||
weather_forecast_update_label = lv_label_create( weather_forecast_tile , NULL);
|
||||
lv_label_set_text( weather_forecast_update_label, "");
|
||||
@@ -104,7 +104,7 @@ void weather_forecast_tile_setup( uint32_t tile_num ) {
|
||||
lv_obj_t * weater_forecast_cont = lv_obj_create( weather_forecast_tile, NULL );
|
||||
lv_obj_set_size( weater_forecast_cont, LV_HOR_RES_MAX , 96 );
|
||||
lv_obj_add_style( weater_forecast_cont, LV_OBJ_PART_MAIN, &weather_forecast_style );
|
||||
lv_obj_align( weater_forecast_cont, weather_forecast_tile, LV_ALIGN_CENTER, 0, 10 );
|
||||
lv_obj_align( weater_forecast_cont, weather_forecast_tile, LV_ALIGN_CENTER, 0, 0 );
|
||||
|
||||
for ( int i = 0 ; i < WEATHER_MAX_FORECAST / 4 ; i++ ) {
|
||||
weather_forecast_icon_imgbtn[ i ] = lv_imgbtn_create( weater_forecast_cont, NULL);
|
||||
@@ -184,6 +184,8 @@ void weather_forecast_sync_Task( void * pvParameters ) {
|
||||
|
||||
log_i("start weather forecast task");
|
||||
|
||||
vTaskDelay( 250 );
|
||||
|
||||
if ( xEventGroupGetBits( weather_forecast_event_handle ) & WEATHER_FORECAST_SYNC_REQUEST ) {
|
||||
if ( weather_config->autosync ) {
|
||||
retval = weather_fetch_forecast( weather_get_config() , &weather_forecast[ 0 ] );
|
||||
|
||||
Reference in New Issue
Block a user