mirror of
https://github.com/firewalkwithm3/Sensor-Watch.git
synced 2024-11-22 11:10:29 +08:00
restore old light button behavior
watch faces that handle EVENT_LIGHT_BUTTON_UP but not EVENT_LIGHT_BUTTON_DOWN probably don't want the default EVENT_LIGHT_BUTTON_DOWN LED activation behavior
This commit is contained in:
parent
c945f323f4
commit
a18c285e58
|
@ -148,6 +148,9 @@ bool mars_time_face_loop(movement_event_t event, movement_settings_t *settings,
|
|||
// TODO: low energy update
|
||||
// watch_start_tick_animation(500);
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
// don't light up every time light is hit
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
break;
|
||||
|
|
|
@ -444,6 +444,9 @@ bool alarm_face_loop(movement_event_t event, movement_settings_t *settings, void
|
|||
case EVENT_TIMEOUT:
|
||||
movement_move_to_face(0);
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
// don't light up every time light is hit
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
break;
|
||||
|
|
|
@ -57,7 +57,7 @@ bool blinky_face_loop(movement_event_t event, movement_settings_t *settings, voi
|
|||
case EVENT_ACTIVATE:
|
||||
_blinky_face_update_lcd(state);
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_UP:
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
if (!state->active) {
|
||||
state->color = (state->color + 1) % 3;
|
||||
_blinky_face_update_lcd(state);
|
||||
|
|
|
@ -225,7 +225,7 @@ bool countdown_face_loop(movement_event_t event, movement_settings_t *settings,
|
|||
abort_quick_ticks(state);
|
||||
movement_move_to_next_face();
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_UP:
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
switch(state->mode) {
|
||||
case cd_running:
|
||||
movement_illuminate_led();
|
||||
|
|
|
@ -136,6 +136,9 @@ bool databank_face_loop(movement_event_t event, movement_settings_t *settings, v
|
|||
// won't be on screen, and thus opts us out of getting the EVENT_LOW_ENERGY_UPDATE above.
|
||||
movement_move_to_face(0);
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
// don't light up every time light is hit
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
break;
|
||||
|
|
|
@ -667,6 +667,9 @@ bool interval_face_loop(movement_event_t event, movement_settings_t *settings, v
|
|||
case EVENT_TIMEOUT:
|
||||
if (state->face_state != interval_state_running) movement_move_to_face(0);
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
// don't light up every time light is hit
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
break;
|
||||
|
|
|
@ -376,6 +376,12 @@ bool morsecalc_face_loop(movement_event_t event, movement_settings_t *settings,
|
|||
settings->bit.led_green_color ? (0xF | settings->bit.led_green_color << 4) : 0);
|
||||
}
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
// don't light up every time light is hit
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -141,7 +141,7 @@ bool probability_face_loop(movement_event_t event, movement_settings_t *settings
|
|||
case EVENT_TICK:
|
||||
display_dice_roll_animation(state);
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_UP:
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
// Change how many sides the die has
|
||||
for (int i = 0; i < NUM_DICE_TYPES; i++) {
|
||||
if (DICE_TYPES[i] == state->dice_sides) {
|
||||
|
|
|
@ -402,7 +402,7 @@ bool rpn_calculator_alt_face_loop(movement_event_t event, movement_settings_t *s
|
|||
return false;
|
||||
}
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_UP:
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
proposed_stack_size = s->stack_size - functions[s->fn_index].input;
|
||||
|
||||
if (s->mode == CALC_NUMBER) {
|
||||
|
|
|
@ -280,7 +280,7 @@ bool rpn_calculator_face_loop(movement_event_t event, movement_settings_t *setti
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_UP:
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
switch (state->mode) {
|
||||
case rpn_calculator_waiting:
|
||||
state->mode = rpn_calculator_op;
|
||||
|
|
|
@ -255,6 +255,9 @@ bool sailing_face_loop(movement_event_t event, movement_settings_t *settings, vo
|
|||
break;
|
||||
case EVENT_LOW_ENERGY_UPDATE:
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
// don't light up every time light is hit
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
break;
|
||||
|
|
|
@ -92,12 +92,6 @@ bool ships_bell_face_loop(movement_event_t event, movement_settings_t *settings,
|
|||
case EVENT_TICK:
|
||||
ships_bell_draw(state);
|
||||
break;
|
||||
case EVENT_MODE_BUTTON_UP:
|
||||
movement_move_to_next_face();
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_UP:
|
||||
movement_illuminate_led();
|
||||
break;
|
||||
case EVENT_ALARM_BUTTON_UP:
|
||||
state->bell_enabled = !state->bell_enabled;
|
||||
if (state->bell_enabled) watch_set_indicator(WATCH_INDICATOR_BELL);
|
||||
|
@ -122,6 +116,7 @@ bool ships_bell_face_loop(movement_event_t event, movement_settings_t *settings,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -250,6 +250,9 @@ bool tachymeter_face_loop(movement_event_t event, movement_settings_t *settings,
|
|||
// You should also consider starting the tick animation, to show the wearer that this is sleep mode:
|
||||
// watch_start_tick_animation(500);
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
// don't light up every time light is hit
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
break;
|
||||
|
|
|
@ -284,6 +284,9 @@ bool tarot_face_loop(movement_event_t event, movement_settings_t *settings, void
|
|||
case EVENT_LOW_ENERGY_UPDATE:
|
||||
watch_display_string("SLEEP ", 4);
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
// don't light up every time light is hit
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
break;
|
||||
|
|
|
@ -142,7 +142,7 @@ bool tomato_face_loop(movement_event_t event, movement_settings_t *settings, voi
|
|||
}
|
||||
tomato_draw(state);
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_UP:
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
movement_illuminate_led();
|
||||
if (state->mode == tomato_ready) {
|
||||
if (state->kind == tomato_break) {
|
||||
|
|
|
@ -149,6 +149,9 @@ bool wake_face_loop(movement_event_t event, movement_settings_t *settings, void
|
|||
break;
|
||||
case EVENT_LOW_ENERGY_UPDATE:
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
// don't light up every time light is hit
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
break;
|
||||
|
|
|
@ -96,7 +96,7 @@ bool frequency_correction_face_loop(movement_event_t event, movement_settings_t
|
|||
break;
|
||||
case EVENT_TICK:
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_UP:
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
freqcorr = RTC->MODE2.FREQCORR.reg;
|
||||
if (freqcorr < 127) {
|
||||
RTC->MODE2.FREQCORR.reg++;
|
||||
|
|
|
@ -214,6 +214,9 @@ bool accelerometer_data_acquisition_face_loop(movement_event_t event, movement_s
|
|||
update_settings(state);
|
||||
}
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
// don't light up every time light is hit
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
break;
|
||||
|
|
|
@ -238,6 +238,9 @@ bool finetune_face_loop(movement_event_t event, movement_settings_t *settings, v
|
|||
// watch_start_tick_animation(500);
|
||||
break;
|
||||
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
// don't light up every time light is hit
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
break;
|
||||
|
|
|
@ -364,6 +364,9 @@ bool nanosec_face_loop(movement_event_t event, movement_settings_t *settings, vo
|
|||
|
||||
apply_RTC_correction(correction);
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
// don't light up every time light is hit
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
break;
|
||||
|
|
|
@ -115,7 +115,7 @@ bool set_time_face_loop(movement_event_t event, movement_settings_t *settings, v
|
|||
_abort_quick_ticks();
|
||||
movement_move_to_next_face();
|
||||
return false;
|
||||
case EVENT_LIGHT_BUTTON_UP:
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
current_page = (current_page + 1) % SET_TIME_FACE_NUM_SETTINGS;
|
||||
*((uint8_t *)context) = current_page;
|
||||
break;
|
||||
|
|
|
@ -200,6 +200,9 @@ bool set_time_hackwatch_face_loop(movement_event_t event, movement_settings_t *s
|
|||
case EVENT_TIMEOUT:
|
||||
movement_move_to_face(0);
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
// don't light up every time light is hit
|
||||
break;
|
||||
default:
|
||||
movement_default_loop_handler(event, settings);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue