|
@@ -68,6 +68,7 @@ void halInit(void) {
|
|
|
idleTimer.start();
|
|
|
idleCounter = 0;
|
|
|
idle = false;
|
|
|
+ halDisplayOn();
|
|
|
|
|
|
flagIgnoreRlsInt0 = false;
|
|
|
flagIgnoreRlsInt1 = false;
|
|
@@ -361,7 +362,6 @@ int halGetInt1(void) {
|
|
|
*/
|
|
|
void halSendSignal(HalSig val) {
|
|
|
//catch if machine is idle and drop button event
|
|
|
-
|
|
|
switch (val) {
|
|
|
case SigInt0Psh:
|
|
|
case SigInt1Psh:
|
|
@@ -385,6 +385,7 @@ void halSendSignal(HalSig val) {
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
sigval value = { 0 };
|
|
|
value.sival_int = (int) val;
|
|
|
|
|
@@ -407,6 +408,7 @@ void halMachineOn(void) {
|
|
|
halRelaisOn(RELAIS_HEAT);
|
|
|
halRelaisOff(RELAIS_PUMP);
|
|
|
halRelaisOn(RELAIS_POWER);
|
|
|
+ idleTimer.stop();
|
|
|
logger(V_HAL, "Turning machine on\n");
|
|
|
}
|
|
|
|
|
@@ -417,6 +419,9 @@ void halMachineOff(void) {
|
|
|
halRelaisOff(RELAIS_HEAT);
|
|
|
halRelaisOff(RELAIS_PUMP);
|
|
|
halRelaisOff(RELAIS_POWER);
|
|
|
+
|
|
|
+ idleCounter = 0;
|
|
|
+ idleTimer.start();
|
|
|
logger(V_HAL, "Turning machine off\n");
|
|
|
}
|
|
|
|
|
@@ -424,6 +429,8 @@ void halMachineOff(void) {
|
|
|
*
|
|
|
*/
|
|
|
void halEnterIdle(void){
|
|
|
+ logger(V_HAL, "Entering Idle Mode\n");
|
|
|
+ idleTimer.stop();
|
|
|
halDisplayOff();
|
|
|
idle = true;
|
|
|
}
|
|
@@ -432,6 +439,8 @@ void halEnterIdle(void){
|
|
|
*
|
|
|
*/
|
|
|
void halLeaveIdle(void){
|
|
|
+ logger(V_HAL, "Leaving Idle Mode\n");
|
|
|
halDisplayOn();
|
|
|
+ idleTimer.start();
|
|
|
idle = false;
|
|
|
}
|