add raw sound
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "gui/mainbar/mainbar.h"
|
||||
#include "gui/mainbar/setup_tile/time_settings/time_settings.h"
|
||||
#include "main_tile.h"
|
||||
|
||||
static lv_obj_t *main_cont = NULL;
|
||||
@@ -71,7 +72,7 @@ void main_tile_setup( void ) {
|
||||
lv_label_set_text(datelabel, "1.Jan 1970");
|
||||
lv_obj_reset_style_list( datelabel, LV_OBJ_PART_MAIN );
|
||||
lv_obj_add_style( datelabel, LV_OBJ_PART_MAIN, &datestyle );
|
||||
lv_obj_align(datelabel, timelabel, LV_ALIGN_OUT_BOTTOM_MID, 0, 0);
|
||||
lv_obj_align( datelabel, clock_cont, LV_ALIGN_IN_BOTTOM_MID, 0, 0 );
|
||||
|
||||
time_t now;
|
||||
struct tm info;
|
||||
@@ -147,7 +148,9 @@ void main_tile_task( lv_task_t * task ) {
|
||||
|
||||
strftime( buf, sizeof(buf), "%H:%M", &info );
|
||||
lv_label_set_text( timelabel, buf );
|
||||
lv_obj_align( timelabel, clock_cont, LV_ALIGN_CENTER, 0, 0 );
|
||||
|
||||
strftime( buf, sizeof(buf), "%a %d.%b %Y", &info );
|
||||
lv_label_set_text( datelabel, buf );
|
||||
lv_obj_align( datelabel, timelabel, LV_ALIGN_OUT_BOTTOM_MID, 0, 0 );
|
||||
lv_obj_align( datelabel, clock_cont, LV_ALIGN_IN_BOTTOM_MID, 0, 0 );
|
||||
}
|
||||
@@ -177,23 +177,21 @@ void WiFiScanDone(WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||
}
|
||||
|
||||
static void wifi_onoff_event_handler(lv_obj_t * obj, lv_event_t event) {
|
||||
if(event == LV_EVENT_VALUE_CHANGED) {
|
||||
motor_vibe( 1 );
|
||||
if( lv_switch_get_state( obj ) ) {
|
||||
wifictl_on();
|
||||
}
|
||||
else {
|
||||
wifictl_off();
|
||||
}
|
||||
switch( event ) {
|
||||
case( LV_EVENT_VALUE_CHANGED ): if( lv_switch_get_state( obj ) ) {
|
||||
wifictl_on();
|
||||
}
|
||||
else {
|
||||
wifictl_off();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void wifi_settings_enter_pass_event_cb( lv_obj_t * obj, lv_event_t event ) {
|
||||
if(event == LV_EVENT_CLICKED) {
|
||||
motor_vibe( 1 );
|
||||
lv_label_set_text( wifi_password_name_label, lv_list_get_btn_text(obj) );
|
||||
lv_textarea_set_text( wifi_password_pass_textfield, "");
|
||||
mainbar_jump_to_tilenumber( wifi_password_tile_num, LV_ANIM_ON );
|
||||
switch( event ) {
|
||||
case( LV_EVENT_CLICKED ): lv_label_set_text( wifi_password_name_label, lv_list_get_btn_text(obj) );
|
||||
lv_textarea_set_text( wifi_password_pass_textfield, "");
|
||||
mainbar_jump_to_tilenumber( wifi_password_tile_num, LV_ANIM_ON );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,7 +355,7 @@ static void exit_wifi_setup_event_cb( lv_obj_t * obj, lv_event_t event ) {
|
||||
|
||||
static void wifi_autoon_onoff_event_handler( lv_obj_t * obj, lv_event_t event ) {
|
||||
switch (event) {
|
||||
case (LV_EVENT_VALUE_CHANGED): wifictl_set_autoon( lv_switch_get_state( obj ) );
|
||||
break;
|
||||
case (LV_EVENT_VALUE_CHANGED): wifictl_set_autoon( lv_switch_get_state( obj ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user