summaryrefslogtreecommitdiff
path: root/test_gpsmm.cpp
diff options
context:
space:
mode:
authorRobert Norris <rw_norris@hotmail.com>2017-03-04 18:59:21 +0000
committerFred Wright <fw@fwright.net>2017-03-04 14:20:59 -0800
commitdcb8bb0483f9224fa211ca2617579ddd082c9a0f (patch)
tree43680e3aa7f0d3d1e87e95d435a6a8468cb14fc0 /test_gpsmm.cpp
parent62c08407f0683a83b543d22d1fa854825b431569 (diff)
downloadgpsd-dcb8bb0483f9224fa211ca2617579ddd082c9a0f.tar.gz
Fix gpxlogger to be able to run continuously
My mistake in adding of parameter to run for a specified number of received packets, such that it would never enter the loop when a count was not specified. TESTED: test_gpsmm runs practically forever; or ends when the specified count is reached Signed-off-by: Fred Wright <fw@fwright.net>
Diffstat (limited to 'test_gpsmm.cpp')
-rw-r--r--test_gpsmm.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test_gpsmm.cpp b/test_gpsmm.cpp
index d9668f5b..452b595e 100644
--- a/test_gpsmm.cpp
+++ b/test_gpsmm.cpp
@@ -111,7 +111,7 @@ static void libgps_dump_state(struct gps_data_t *collect)
int main(int argc, char *argv[])
{
- uint looper = 0;
+ uint looper = UINT_MAX;
// A typical C++ program may look to use a more native option parsing method
// such as boost::program_options
@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
// If not specified then by default it loops until ll simply goes out of bounds
// So with the 5 second wait & a 4 byte uint - this equates to ~680 years
// - long enough for a test program :)
- for (uint ll = 0; ll < looper ; ll++) {
+ for (uint ll = 0; ll < looper; ll++) {
struct gps_data_t* newdata;
if (!gps_rec.waiting(5000000))