add senet packet format

Dependencies:   Senet_Packet mDot_X_NUCLEO_IKS01A1 libmDot-dev-mbed5-deprecated

Fork of mDot-IKS01A1 by Peter Ferland

Files at this revision

API Documentation at this revision

Comitter:
mfiore
Date:
Fri Apr 07 23:17:16 2017 +0000
Parent:
12:922bb95e4c2e
Commit message:
multiply temp by 10 to preserve the decimal

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Apr 07 22:18:38 2017 +0000
+++ b/main.cpp	Fri Apr 07 23:17:16 2017 +0000
@@ -260,7 +260,7 @@
         // get temperature
         temp_sensor1->GetTemperature(&value);
         logInfo("temperature: %2.1f C", value);
-        packet.addSensorValue(0, 2, (int16_t)value);
+        packet.addSensorValue(0, 2, (int16_t)(value*10));
         packet.serialize();
         
         tx_data.assign(packet.payload(), packet.payload() + packet.length());