/* * Single click handler on up button */ static void up_single_click_handler(ClickRecognizerRef recognizer, void *context) { // Make the snooze and the cancel buttons the same way around as the default alarm app #ifdef PBL_COLOR snooze_alarm(); #else cancel_alarm(); #endif // Bring clock up to date if a button is pressed revive_clock_on_movement(CLOCK_UPDATE_THRESHOLD); }
/** * Back button single click handler */ static void back_single_click_handler(ClickRecognizerRef recognizer, void *context) { // Stop accidental closure of Morpheuz by defining this // Bring clock up to date if a button is pressed // Only if we're recording or running powernap if (is_monitoring_sleep()) { manual_shutdown_request(); revive_clock_on_movement(CLOCK_UPDATE_THRESHOLD); } else { close_morpheuz(); } }
/* * Store our samples from each group until we have two minute's worth */ static void store_sample(uint16_t biggest) { revive_clock_on_movement(biggest); if (biggest > biggest_movement_in_one_minute) biggest_movement_in_one_minute = biggest; }
/* * Single click handler on select button */ static void select_single_click_handler(ClickRecognizerRef recognizer, void *context) { // Bring clock up to date if a button is pressed revive_clock_on_movement(CLOCK_UPDATE_THRESHOLD); if (!is_notice_showing()) show_menu(); }
/* * Single click handler on up button */ static void up_single_click_handler(ClickRecognizerRef recognizer, void *context) { revive_clock_on_movement(CLOCK_UPDATE_THRESHOLD); // Make the snooze and the cancel buttons the same way around as the default alarm app snooze_alarm(); }