aboutsummaryrefslogtreecommitdiff
path: root/arduino_sketch/fuzzy_alarm_clock_ds1307
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <elena.valhalla@gmail.com>2012-01-02 22:18:33 +0100
committerElena ``of Valhalla'' Grandi <elena.valhalla@gmail.com>2012-01-02 22:18:33 +0100
commit0e4005d89a83e61d3ebae93571e470513ee8a60e (patch)
tree3b268e4f7c07663045a4840974be81a08fbe41b4 /arduino_sketch/fuzzy_alarm_clock_ds1307
parent038e0ba8909426236503afe454f0e072f49a2232 (diff)
Added status reset command
Diffstat (limited to 'arduino_sketch/fuzzy_alarm_clock_ds1307')
-rw-r--r--arduino_sketch/fuzzy_alarm_clock_ds1307/fuzzy_alarm_clock_ds1307.pde14
1 files changed, 14 insertions, 0 deletions
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<s> - set an alarm");