From 0e4005d89a83e61d3ebae93571e470513ee8a60e Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Mon, 2 Jan 2012 22:18:33 +0100 Subject: Added status reset command --- .../fuzzy_alarm_clock_ds1307/fuzzy_alarm_clock_ds1307.pde | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'arduino_sketch') diff --git a/arduino_sketch/fuzzy_alarm_clock_ds1307/fuzzy_alarm_clock_ds1307.pde b/arduino_sketch/fuzzy_alarm_clock_ds1307/fuzzy_alarm_clock_ds1307.pde index 9b2e0c9..794b314 100644 --- a/arduino_sketch/fuzzy_alarm_clock_ds1307/fuzzy_alarm_clock_ds1307.pde +++ b/arduino_sketch/fuzzy_alarm_clock_ds1307/fuzzy_alarm_clock_ds1307.pde @@ -179,6 +179,9 @@ void check_serial() { case 'h': s_print_help(); break; + case 'r': + s_reset_alarms(); + break; } } @@ -299,6 +302,17 @@ void s_led_test() { } } +void s_reset_alarms() { + for ( int i = 0 ; i < NALARMS ; i ++ ) { + for ( int j = 0; j < 5 ; j ++ ) { + alarms[i][j] = 0; + } + } + st = 0; + a = -1; + save_status(); +} + void s_print_help() { Serial.println(""); Serial.println(" a - set an alarm"); -- cgit v1.2.3