Add --continue argument
The monitor will exit when key is pressed.
Add --continue argument and if it is set to "true", the monitor will
continue after key is pressed.
This is useful in cases to monitor a button presses.
E.g. It can be used to monitor ID button and start a system unit
everytime when the button is pressed.
This argument is optional so it does not break the current code.
Tested: With "--continue=true", the monitor does not exit when the key
is pressed.
Without the argument of if it is set to other strings, the
monitor exits after the key is pressed.
Change-Id: I4f2ca16d7b26e10397181c83c2c5947ed5ce091f
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/test/utest.cpp b/test/utest.cpp
index c6b6f18..a023cde 100644
--- a/test/utest.cpp
+++ b/test/utest.cpp
@@ -71,7 +71,7 @@
const std::string emptyTarget = "";
Monitor gpio(DEVICE, code, value, emptyTarget,
- eventP, callbackHandler, false);
+ eventP, false, callbackHandler, false);
// Waiting 3 seconds and check if the completion status is set
int count = 0;
@@ -100,7 +100,7 @@
const std::string emptyTarget = "";
Monitor gpio(DEVICE, code, value, emptyTarget,
- eventP, callbackHandler, false);
+ eventP, false, callbackHandler, false);
// Pump the data in the middle
int count = 0;