summaryrefslogtreecommitdiff
path: root/test_gpsmm.cpp
diff options
context:
space:
mode:
authorGreg Troxel <gdt@ir.bbn.com>2009-11-30 17:23:36 +0000
committerGreg Troxel <gdt@ir.bbn.com>2009-11-30 17:23:36 +0000
commitc91b2494d8a4aef49c0c47961db2cd94fdd87af0 (patch)
treeef7c92998ce4fc740bd6631dd9c9dca178372df2 /test_gpsmm.cpp
parent4847be0a3f2d2a67a22885de9e3869d94f660910 (diff)
downloadgpsd-c91b2494d8a4aef49c0c47961db2cd94fdd87af0.tar.gz
Add '#if 0' around code to exercise features removed from libgpsmm.h.
Unbreaks the build. This test case now does approximately nothing; it's not clear to be how libgpsmm is supposed to be used, and why there is no callback support.
Diffstat (limited to 'test_gpsmm.cpp')
-rw-r--r--test_gpsmm.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test_gpsmm.cpp b/test_gpsmm.cpp
index b238d076..a6219ba7 100644
--- a/test_gpsmm.cpp
+++ b/test_gpsmm.cpp
@@ -16,7 +16,9 @@
using namespace std;
+#if 0
static void callback(struct gps_data_t* p, char* buf, size_t len);
+#endif
int main(void) {
gpsmm gps_rec;
@@ -28,6 +30,7 @@ int main(void) {
return (1);
}
+#if 0
cout << "Going to set the callback...\n";
if (gps_rec.set_callback(callback)!=0 ) {
cout << "Error setting callback.\n";
@@ -37,18 +40,22 @@ int main(void) {
cout << "Callback setted, sleeping...\n";
sleep(10);
cout << "Exited from sleep...\n";
+#endif
+#if 0
if (gps_rec.del_callback()!=0) {
cout << "Error deleting callback\n";
return (1);
}
cout << "Sleeping again, to make sure the callback is disabled\n";
sleep(4);
+#endif
cout << "Exiting\n";
return 0;
}
+#if 0
static void callback(struct gps_data_t* p, char* buf, size_t len) {
if (p==NULL) {
@@ -69,3 +76,4 @@ static void callback(struct gps_data_t* p, char* buf, size_t len) {
cout << "Latitude:\t" << p->fix.latitude <<"\n";
}
}
+#endif