|
@@ -185,9 +185,8 @@ void GetInputGpioStatus(int fd)
|
|
|
}
|
|
|
|
|
|
ShmPrimaryMcuData->InputDet.bits.SpdDetec = gpio_in.SPD;
|
|
|
-
|
|
|
#if defined DD360ComBox
|
|
|
- if (~gpio_in.Emergency_Btn)
|
|
|
+ if (gpio_in.Emergency_Btn == 0 && (EmgBtn_flag == gpio_in.Emergency_Btn))
|
|
|
#else
|
|
|
if (gpio_in.Emergency_Btn && (EmgBtn_flag != gpio_in.Emergency_Btn))
|
|
|
#endif //defined DD360ComBox
|
|
@@ -197,7 +196,11 @@ void GetInputGpioStatus(int fd)
|
|
|
EmgBtn_flag = 1;
|
|
|
EmgBtn_count = 0; // Avoid Overflow
|
|
|
}
|
|
|
- } else if (EmgBtn_flag != gpio_in.Emergency_Btn) {
|
|
|
+#ifdef DD360ComBox
|
|
|
+ } else if ( gpio_in.Emergency_Btn && EmgBtn_flag ) {
|
|
|
+#else
|
|
|
+ } else if (EmgBtn_flag != gpio_in.Emergency_Btn ) {
|
|
|
+#endif
|
|
|
EmgBtn_count++;
|
|
|
if (EmgBtn_count > SensorTrigCount) {
|
|
|
EmgBtn_flag = 0;
|
|
@@ -239,7 +242,7 @@ void GetInputGpioStatus(int fd)
|
|
|
}
|
|
|
|
|
|
#if defined DD360ComBox
|
|
|
- if (gpio_in.Door_Open)
|
|
|
+ if (gpio_in.Door_Open && (Door_flag != gpio_in.Door_Open))
|
|
|
#else
|
|
|
if (gpio_in.Door_Open == 0 && (Door_flag == gpio_in.Door_Open))
|
|
|
#endif //defined DD360ComBox
|
|
@@ -249,7 +252,11 @@ void GetInputGpioStatus(int fd)
|
|
|
Door_flag = 1;
|
|
|
Door_count = 0; // Avoid Overflow
|
|
|
}
|
|
|
+#ifdef DD360ComBox
|
|
|
+ } else if (gpio_in.Door_Open == 0 && Door_flag) {
|
|
|
+#else
|
|
|
} else if (gpio_in.Door_Open && Door_flag) {
|
|
|
+#endif
|
|
|
Door_count++;
|
|
|
if (Door_count > SensorTrigCount) {
|
|
|
Door_flag = 0;
|