1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

lv_sw: add comment

This commit is contained in:
Gabor Kiss-Vamosi 2018-11-19 06:35:11 +01:00
parent 07f2e18dfc
commit bf557a1bb0
2 changed files with 2 additions and 3 deletions

View File

@ -264,9 +264,8 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param)
if((old_val < threshold && ext->slider.drag_value > threshold) ||
(old_val > threshold && ext->slider.drag_value < threshold))
{
ext->changed = 1;
ext->changed = 1; /*If explicitly changed don't need to be toggled on release*/
}
printf("tmp: %d\n", ext->changed);
}
else if(sign == LV_SIGNAL_PRESS_LOST) {
if(lv_sw_get_state(sw)) {

View File

@ -44,7 +44,7 @@ typedef struct
/*New data for this type */
lv_style_t *style_knob_off; /*Style of the knob when the switch is OFF*/
lv_style_t *style_knob_on; /*Style of the knob when the switch is ON (NULL to use the same as OFF)*/
uint8_t changed :1; /*Indicates the switch explicitly changed by drag*/
uint8_t changed :1; /*Indicates the switch state explicitly changed by drag*/
#if USE_LV_ANIMATION
uint16_t anim_time; /*switch animation time */
#endif