Steve Mylroie / Mbed OS HPM_Tester

Dependencies:   HPM

Fork of frdm_https_HPM by mDot

Files at this revision

API Documentation at this revision

Comitter:
jacobgqc
Date:
Thu Nov 16 20:00:22 2017 +0000
Parent:
20:512b28f7c82a
Child:
22:fee343b21339
Child:
23:e09d717e5edb
Commit message:
HPM TEST definition works properly if 0 or 1.

Changed in this revision

source/main-https.cpp Show annotated file Show diff for this revision Revisions of this file
source/select-demo.h Show annotated file Show diff for this revision Revisions of this file
--- a/source/main-https.cpp	Thu Nov 16 19:00:19 2017 +0000
+++ b/source/main-https.cpp	Thu Nov 16 20:00:22 2017 +0000
@@ -162,7 +162,7 @@
         post_req->set_header("Authorization","SharedAccessSignature sr=smartlink-iot-hub-1.azure-devices.net%2Fdevices%2Fsmartlink-test-device-1&sig=KaZZE%2BLN4Muu%2FerJM4pqVF8n%2Bdg8j141id5CYzxUFkA%3D&se=1542117770");
         //post_req->set_header("Authorization","SharedAccessSignature sr=hublora.azure-devices.net%2Fdevices%2FHPM01&sig=3app1U%2Fvh1mIgcv0vb%2FsXa33udUpnwITURxOFPQFsJI%3D&se=1541972292");
         
-        #ifdef TEST
+        #if TEST
         string valuesJSON = TestHPM::getPMReadingsJSON();
         char body[256];
         strncpy(body, valuesJSON.c_str(), sizeof(body));
--- a/source/select-demo.h	Thu Nov 16 19:00:19 2017 +0000
+++ b/source/select-demo.h	Thu Nov 16 20:00:22 2017 +0000
@@ -8,7 +8,7 @@
 
 #define         DEMO            DEMO_HTTPS
 
-// Two modes supported: TEST generates fake data and SENSOR attempts to read a serial device sensor
-#define         TEST            TRUE
+// TEST 1 to run the fake PM generator, TEST 0 to use attached sensor
+#define         TEST            1
 
 #endif // _SELECT_METHOD_H_