summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Godinez <sgodinez@multitech.com>2013-11-22 17:34:53 -0600
committerSean Godinez <sgodinez@multitech.com>2013-11-22 17:34:53 -0600
commitf70588d90e5166739b3d527f51b02c28f906c7df (patch)
treee827eb7ce8a5fc07bb7ca2ca7cdcee01cebab529
parent7c714aea0d69691f4b99b92cb6bd8b11ee020390 (diff)
downloadmts-io-f70588d90e5166739b3d527f51b02c28f906c7df.tar.gz
mts-io-f70588d90e5166739b3d527f51b02c28f906c7df.tar.bz2
mts-io-f70588d90e5166739b3d527f51b02c28f906c7df.zip
reset logic fix
-rw-r--r--io-module/mts_io.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index 9f27af2..728e39b 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -1212,12 +1212,15 @@ static void blink_callback(struct work_struct *ignored)
if (vpid) {
if (reset_pressed) {
reset_count++;
- } else if (reset_count > 0 && reset_count < RESET_HOLD_COUNT) {
- kill_pid(vpid, reset_short_signal, 1);
- reset_count = 0;
- } else if (reset_count >= RESET_HOLD_COUNT && reset_count < RESET_LONG_HOLD_COUNT) {
- reset_count = 0;
- kill_pid(vpid, reset_long_signal, 1);
+ } else {
+ //Reset button has not been pressed
+ if (reset_count > 0 && reset_count < RESET_HOLD_COUNT) {
+ kill_pid(vpid, reset_short_signal, 1);
+ reset_count = 0;
+ } else if (reset_count >= RESET_HOLD_COUNT && reset_count < RESET_LONG_HOLD_COUNT) {
+ reset_count = 0;
+ kill_pid(vpid, reset_long_signal, 1);
+ }
}
if (reset_count >= RESET_LONG_HOLD_COUNT) {