Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: X_NUCLEO_IKS01A2
Fork of Node_BLE_Switch_Device by
Bluetooth Low Energy enabled device with environmental and inertial features, i.e. "Pressure", "Humidity", "Temperature", "Accelerometer", "Gyroscope", and "Magnetometer", plus "Switch" feature, compatible with BlueST Protocol.
Diff: source/main.cpp
- Revision:
- 5:445024130101
- Parent:
- 4:a10e2c94c8c8
- Child:
- 6:01d49589410e
diff -r a10e2c94c8c8 -r 445024130101 source/main.cpp
--- a/source/main.cpp Wed May 16 17:20:48 2018 +0000
+++ b/source/main.cpp Fri May 18 18:41:27 2018 +0000
@@ -129,7 +129,7 @@
if (BLE::Instance().getGapState().connected) {
float pressure, humidity, temperature;
get_sensors(&pressure, &humidity, &temperature);
- event_queue.call(Callback<void(uint16_t, uint32_t, uint16_t, uint16_t)>(custom_service, &CustomService::send_sensors), time_stamp++, (uint32_t) (pressure * 100), (uint16_t) (humidity * 10), (uint16_t) (temperature * 10));
+ event_queue.call(Callback<void(uint16_t, uint32_t, uint16_t, uint16_t)>(custom_service, &CustomService::send_sensors), time_stamp++, (uint32_t) (pressure * 10), (uint16_t) (humidity * 10), (uint16_t) (temperature * 10));
//printf("Sensors: (%d) %d %d %d\r\n", time_stamp, (uint32_t) (pressure * 100), (uint16_t) (humidity * 10), (uint16_t) (temperature * 10));
}
}
@@ -166,7 +166,7 @@
if (BLE::Instance().getGapState().connected) {
float pressure, humidity, temperature;
get_sensors(&pressure, &humidity, &temperature);
- event_queue.call(Callback<void(uint16_t, uint32_t, uint16_t, uint16_t)>(custom_service, &CustomService::send_sensors), time_stamp++, (uint32_t) (pressure * 100), (uint16_t) (humidity * 10), (uint16_t) (temperature * 10));
+ event_queue.call(Callback<void(uint16_t, uint32_t, uint16_t, uint16_t)>(custom_service, &CustomService::send_sensors), time_stamp++, (uint32_t) (pressure * 10), (uint16_t) (humidity * 10), (uint16_t) (temperature * 10));
//printf("Sensors: (%d) %d %d %d\r\n", time_stamp, (uint32_t) (pressure * 100), (uint16_t) (humidity * 10), (uint16_t) (temperature * 10));
}
}
