Merge pull request #99 from voloved/activity_moon_loop_backwards
Activity and moon can loop backwards
This commit is contained in:
@@ -184,10 +184,19 @@ bool moon_phase_face_loop(movement_event_t event, void *context) {
|
||||
state->offset += 86400;
|
||||
_update(state, state->offset);
|
||||
break;
|
||||
case EVENT_ALARM_LONG_PRESS:
|
||||
state->offset = 0;
|
||||
case EVENT_ALARM_LONG_PRESS:
|
||||
state->offset = 0;
|
||||
_update(state, state->offset);
|
||||
break;
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
break;
|
||||
case EVENT_LIGHT_BUTTON_UP:
|
||||
state->offset -= 86400;
|
||||
_update(state, state->offset);
|
||||
break;
|
||||
case EVENT_LIGHT_LONG_PRESS:
|
||||
movement_illuminate_led();
|
||||
break;
|
||||
case EVENT_TIMEOUT:
|
||||
// QUESTION: Should timeout reset offset to 0?
|
||||
break;
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
* each button press, and both the text and the graphical representation will
|
||||
* display the moon phase for that day. Try pressing the Alarm button 27 times
|
||||
* now, just to visualize what the moon will look like over the next month.
|
||||
* Pressing the Light button will move back in time.
|
||||
*
|
||||
* Holding the Light button will illuminate the display.
|
||||
*/
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
Reference in New Issue
Block a user