mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-04-19 12:57:19 +00:00
Fix compiler warnings
This commit is contained in:
parent
6520b001c3
commit
a1f14223d5
@ -126,7 +126,7 @@ build_flags =
|
||||
-D HASP_USE_CONFIG=1 ; Native application, not library
|
||||
-D LV_LOG_TRACE_TIMER=1
|
||||
; -- LittleFS build options ------------------------
|
||||
-D CONFIG_LITTLEFS_FOR_IDF_3_2
|
||||
;-D CONFIG_LITTLEFS_FOR_IDF_3_2 ; obsolete in IDF 3.3
|
||||
|
||||
lib_ignore =
|
||||
GxTFT
|
||||
|
@ -285,6 +285,9 @@ static void custom_font_apply_cb(lv_theme_t* th, lv_obj_t* obj, lv_theme_style_t
|
||||
list = lv_obj_get_style_list(obj, LV_BTN_PART_MAIN);
|
||||
// _lv_style_list_add_style(list, &my_style);
|
||||
break;
|
||||
default:
|
||||
// nothing
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1063,8 +1063,7 @@ static void hasp_process_arc_attribute(lv_obj_t* obj, const char* attr_p, uint16
|
||||
bool update)
|
||||
{
|
||||
// We already know it's a arc object
|
||||
int16_t intval = atoi(payload);
|
||||
uint16_t val = atoi(payload);
|
||||
uint16_t val = atoi(payload);
|
||||
|
||||
char* attr = (char*)attr_p;
|
||||
if(*attr == '.') attr++; // strip leading '.'
|
||||
@ -1107,8 +1106,7 @@ static void hasp_process_lmeter_attribute(lv_obj_t* obj, const char* attr_p, uin
|
||||
bool update)
|
||||
{
|
||||
// We already know it's a linemeter object
|
||||
int16_t intval = atoi(payload);
|
||||
uint16_t val = atoi(payload);
|
||||
uint16_t val = atoi(payload);
|
||||
|
||||
uint16_t line_count = lv_linemeter_get_line_count(obj);
|
||||
uint16_t angle = lv_linemeter_get_scale_angle(obj);
|
||||
@ -1782,6 +1780,7 @@ void hasp_process_obj_attribute(lv_obj_t* obj, const char* attr_p, const char* p
|
||||
|
||||
default:
|
||||
hasp_local_style_attr(obj, attr, attr_hash, payload, update);
|
||||
goto attribute_found;
|
||||
}
|
||||
|
||||
attribute_found:
|
||||
|
@ -43,8 +43,6 @@ static void event_delete_object(lv_obj_t* obj)
|
||||
|
||||
case LV_HASP_BTNMATRIX:
|
||||
my_btnmatrix_map_clear(obj);
|
||||
_LV_WIN_PART_REAL_LAST;
|
||||
_LV_WIN_PART_VIRTUAL_LAST;
|
||||
break;
|
||||
|
||||
case LV_HASP_GAUGE:
|
||||
@ -463,9 +461,7 @@ void btnmatrix_event_handler(lv_obj_t* obj, lv_event_t event)
|
||||
|
||||
/* Get the new value */
|
||||
char buffer[128];
|
||||
char property[36];
|
||||
uint16_t val = 0;
|
||||
uint16_t max = 0;
|
||||
|
||||
val = lv_btnmatrix_get_active_btn(obj);
|
||||
if(val != LV_BTNMATRIX_BTN_NONE) {
|
||||
@ -480,10 +476,6 @@ void btnmatrix_event_handler(lv_obj_t* obj, lv_event_t event)
|
||||
last_value_sent = val;
|
||||
event_object_selection_changed(obj, hasp_event_id, val, buffer);
|
||||
// if(max > 0) dispatch_normalized_group_value(obj->user_data.groupid, obj, val, 0, max);
|
||||
|
||||
// set the property
|
||||
// snprintf_P(property, sizeof(property), PSTR("val\":%d,\"text"), val);
|
||||
// attr_out_str(obj, property, buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -60,19 +60,19 @@ static void debugPrintTimestamp(int level, Print* _logOutput)
|
||||
int rslt = gettimeofday(&curTime, NULL);
|
||||
time_t t = curTime.tv_sec;
|
||||
tm* timeinfo = localtime(&t);
|
||||
int milli = curTime.tv_usec / 1000;
|
||||
|
||||
debugSendAnsiCode(F(TERM_COLOR_CYAN), _logOutput);
|
||||
|
||||
if(timeinfo->tm_year >= 120) {
|
||||
int milli = curTime.tv_usec / 1000;
|
||||
char buffer[24];
|
||||
strftime(buffer, sizeof(buffer), "[%b %d %H:%M:%S", timeinfo); // Literal String
|
||||
// strftime(buffer, sizeof(buffer), "[%H:%M:%S.", timeinfo); // Literal String
|
||||
|
||||
#ifdef ARDUINO
|
||||
_logOutput->printf(PSTR("%s.%03lu]"), buffer, curTime.tv_usec / 1000);
|
||||
_logOutput->printf(PSTR("%s.%03lu]"), buffer, milli);
|
||||
#else
|
||||
debug_print(_logOutput, PSTR("%s.%03lu]"), buffer, curTime.tv_usec / 1000);
|
||||
debug_print(_logOutput, PSTR("%s.%03lu]"), buffer, milli);
|
||||
#endif
|
||||
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user