Merge branch 'master' of https://github.com/sharandac/My-TTGO-Watch
This commit is contained in:
@@ -102,7 +102,7 @@ void bluetooth_settings_tile_setup( void ) {
|
|||||||
lv_obj_set_event_cb( bluetooth_advertising_onoff, bluetooth_advertising_onoff_event_handler );
|
lv_obj_set_event_cb( bluetooth_advertising_onoff, bluetooth_advertising_onoff_event_handler );
|
||||||
lv_obj_t *bluetooth_advertising_label = lv_label_create( bluetooth_advertising_cont, NULL);
|
lv_obj_t *bluetooth_advertising_label = lv_label_create( bluetooth_advertising_cont, NULL);
|
||||||
lv_obj_add_style( bluetooth_advertising_label, LV_OBJ_PART_MAIN, &bluetooth_settings_style );
|
lv_obj_add_style( bluetooth_advertising_label, LV_OBJ_PART_MAIN, &bluetooth_settings_style );
|
||||||
lv_label_set_text( bluetooth_advertising_label, "advertising");
|
lv_label_set_text( bluetooth_advertising_label, "visibility");
|
||||||
lv_obj_align( bluetooth_advertising_label, bluetooth_advertising_cont, LV_ALIGN_IN_LEFT_MID, 5, 0 );
|
lv_obj_align( bluetooth_advertising_label, bluetooth_advertising_cont, LV_ALIGN_IN_LEFT_MID, 5, 0 );
|
||||||
|
|
||||||
lv_obj_t *bluettoth_info_label_cont = lv_obj_create( bluetooth_settings_tile, NULL );
|
lv_obj_t *bluettoth_info_label_cont = lv_obj_create( bluetooth_settings_tile, NULL );
|
||||||
@@ -111,7 +111,7 @@ void bluetooth_settings_tile_setup( void ) {
|
|||||||
lv_obj_align( bluettoth_info_label_cont, bluetooth_advertising_cont, LV_ALIGN_OUT_BOTTOM_MID, 0, 0 );
|
lv_obj_align( bluettoth_info_label_cont, bluetooth_advertising_cont, LV_ALIGN_OUT_BOTTOM_MID, 0, 0 );
|
||||||
lv_obj_t *bluetooth_info_label = lv_label_create( bluettoth_info_label_cont, NULL);
|
lv_obj_t *bluetooth_info_label = lv_label_create( bluettoth_info_label_cont, NULL);
|
||||||
lv_obj_add_style( bluetooth_info_label, LV_OBJ_PART_MAIN, &bluetooth_settings_style );
|
lv_obj_add_style( bluetooth_info_label, LV_OBJ_PART_MAIN, &bluetooth_settings_style );
|
||||||
lv_label_set_text( bluetooth_info_label, "increase battery life");
|
lv_label_set_text( bluetooth_info_label, "increases battery life");
|
||||||
lv_obj_align( bluetooth_info_label, bluettoth_info_label_cont, LV_ALIGN_IN_LEFT_MID, 5, 0 );
|
lv_obj_align( bluetooth_info_label, bluettoth_info_label_cont, LV_ALIGN_IN_LEFT_MID, 5, 0 );
|
||||||
|
|
||||||
lv_obj_t *bluetooth_standby_cont = lv_obj_create( bluetooth_settings_tile, NULL );
|
lv_obj_t *bluetooth_standby_cont = lv_obj_create( bluetooth_settings_tile, NULL );
|
||||||
@@ -126,7 +126,7 @@ void bluetooth_settings_tile_setup( void ) {
|
|||||||
lv_obj_set_event_cb( bluetooth_standby_onoff, bluetooth_standby_onoff_event_handler );
|
lv_obj_set_event_cb( bluetooth_standby_onoff, bluetooth_standby_onoff_event_handler );
|
||||||
lv_obj_t *bluetooth_standby_label = lv_label_create( bluetooth_standby_cont, NULL);
|
lv_obj_t *bluetooth_standby_label = lv_label_create( bluetooth_standby_cont, NULL);
|
||||||
lv_obj_add_style( bluetooth_standby_label, LV_OBJ_PART_MAIN, &bluetooth_settings_style );
|
lv_obj_add_style( bluetooth_standby_label, LV_OBJ_PART_MAIN, &bluetooth_settings_style );
|
||||||
lv_label_set_text( bluetooth_standby_label, "allway on");
|
lv_label_set_text( bluetooth_standby_label, "always on");
|
||||||
lv_obj_align( bluetooth_standby_label, bluetooth_standby_cont, LV_ALIGN_IN_LEFT_MID, 5, 0 );
|
lv_obj_align( bluetooth_standby_label, bluetooth_standby_cont, LV_ALIGN_IN_LEFT_MID, 5, 0 );
|
||||||
|
|
||||||
if ( blectl_get_advertising() ) {
|
if ( blectl_get_advertising() ) {
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ void display_settings_tile_setup( void ) {
|
|||||||
lv_obj_set_hidden( display_setup_info_img, false );
|
lv_obj_set_hidden( display_setup_info_img, false );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
snprintf( temp, sizeof( temp ), "%d secounds", lv_slider_get_value( display_timeout_slider ) );
|
snprintf( temp, sizeof( temp ), "%d seconds", lv_slider_get_value( display_timeout_slider ) );
|
||||||
}
|
}
|
||||||
lv_label_set_text( display_timeout_slider_label, temp );
|
lv_label_set_text( display_timeout_slider_label, temp );
|
||||||
lv_obj_align( display_timeout_slider_label, display_timeout_slider, LV_ALIGN_OUT_BOTTOM_MID, 0, 15 );
|
lv_obj_align( display_timeout_slider_label, display_timeout_slider, LV_ALIGN_OUT_BOTTOM_MID, 0, 15 );
|
||||||
@@ -298,7 +298,7 @@ static void display_timeout_setup_event_cb( lv_obj_t * obj, lv_event_t event ) {
|
|||||||
lv_obj_set_hidden( display_setup_info_img, false );
|
lv_obj_set_hidden( display_setup_info_img, false );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
snprintf( temp, sizeof( temp ), "%d secounds", lv_slider_get_value(obj) );
|
snprintf( temp, sizeof( temp ), "%d seconds", lv_slider_get_value(obj) );
|
||||||
lv_obj_set_hidden( display_setup_info_img, true );
|
lv_obj_set_hidden( display_setup_info_img, true );
|
||||||
}
|
}
|
||||||
lv_label_set_text( display_timeout_slider_label, temp );
|
lv_label_set_text( display_timeout_slider_label, temp );
|
||||||
|
|||||||
Reference in New Issue
Block a user