aboutsummaryrefslogtreecommitdiff
path: root/Arduino
diff options
context:
space:
mode:
Diffstat (limited to 'Arduino')
-rwxr-xr-xArduino/ems-light/Clock.cpp3
-rwxr-xr-xArduino/ems-light/Clock.h8
-rwxr-xr-xArduino/ems-light/Machine.cpp15
-rwxr-xr-xArduino/ems-light/Monitor.h5
4 files changed, 17 insertions, 14 deletions
diff --git a/Arduino/ems-light/Clock.cpp b/Arduino/ems-light/Clock.cpp
index 4f70e8f..4f6431d 100755
--- a/Arduino/ems-light/Clock.cpp
+++ b/Arduino/ems-light/Clock.cpp
@@ -59,8 +59,9 @@
/* Create an rtc object mebby should be private to the class JOE?? */
// add preprocessor code here for non M0 systems.
+#ifdef ARDUINO_SAMD_ZERO
RTCZero rtc;
-
+#endif
/* calculate build date and time (this should be referenceable from monitor for SWV ... */
const byte build_seconds = ((__TIME__[6] - '0') * 10 + __TIME__[7] - '0');
const byte build_minutes = ((__TIME__[3] - '0') * 10 + __TIME__[4] - '0');
diff --git a/Arduino/ems-light/Clock.h b/Arduino/ems-light/Clock.h
index fae33fe..690d72a 100755
--- a/Arduino/ems-light/Clock.h
+++ b/Arduino/ems-light/Clock.h
@@ -46,8 +46,10 @@
#define CHARS_IN_TIMESTAMP 20
// add preprocessor code here for non M0 systems.
+#ifdef ARDUINO_SAMD_ZERO
#include <RTCZero.h>
extern RTCZero rtc;
+#endif
// forward
class Clock;
@@ -115,9 +117,9 @@ public:
uint8_t dayofweek();
void tick(void);
void run(); // this is wrong.
- bool rolledOver(); //??
- void addToCalendar();
- void removeFromCalendar();
+ //bool rolledOver(); //??
+ //void addToCalendar();
+ //void removeFromCalendar();
void sync();
void calcUnixTime();
diff --git a/Arduino/ems-light/Machine.cpp b/Arduino/ems-light/Machine.cpp
index fb852a8..1f9e8a5 100755
--- a/Arduino/ems-light/Machine.cpp
+++ b/Arduino/ems-light/Machine.cpp
@@ -18,9 +18,6 @@ void Machine::init(){
inSafeStateToRun=false;
setState(STATE_SELF_TEST_INIT);
safety.init();
- // thermocouple.init();
- //heater.init();
- //pump.init();
if (state() == STATE_SELF_TEST_INIT) {
inSafeStateToRun=true;
setState(STATE_WARM_UP);
@@ -31,9 +28,9 @@ void Machine::init(){
machineTask.set(500L, TASK_FOREVER, &systemInCharge);
machine.todolist.addTask(machineTask);
machineTask.enable();
- //monitor.registerAction(_TMR_, &TMR);
- //monitor.registerAction(_TMS_, &TMS);
- //monitor.registerAction(_TRM_, &TRM);
+ monitor.registerAction(_TMR_, &TMR);
+ monitor.registerAction(_TMS_, &TMS);
+ monitor.registerAction(_TRM_, &TRM);
}
@@ -63,7 +60,7 @@ static void systemInCharge(){
case STATE_WARM_UP:
if (ENTERING) {
- safety.redLightVal=255;//fix number foo
+ safety.redLightVal=RED_FULL_ON;//fix number foo
} else {
machine.setState(STATE_RUN_MODE);
}
@@ -121,8 +118,8 @@ static void TMR (uint8_t kwIndex, uint8_t verb,char *args) {
bool wasRunning=machine.timerIsRunning;
bool start=machine.timerIsRunning=atoi(args);
if (start) {
- // pump.Press();
- monitor.log("-- Job Started --"); //if was notrunning?
+ //
+ monitor.log("-- Job (Re)Started --"); //if was notrunning?
} else {
if (wasRunning) {
monitor.log("-- Job Paused --");
diff --git a/Arduino/ems-light/Monitor.h b/Arduino/ems-light/Monitor.h
index 940c98c..6bc72c9 100755
--- a/Arduino/ems-light/Monitor.h
+++ b/Arduino/ems-light/Monitor.h
@@ -51,10 +51,13 @@
#include "Configuration.h"
class Monitor;
extern Monitor monitor;
-//#include "Clock.h"
#include "Machine.h"
+
+#ifdef ARDUINO_SAMD_ZERO
#include "Adafruit_SleepyDog.h"
#include "Reset.h"
+#endif
+
#include "TaskScheduler.h"
#include <stdio.h>