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.
Diff: WeatherStation.cpp
- Revision:
- 16:eed9a9ba319c
- Parent:
- 15:aac1b3950a9e
- Child:
- 17:76787f5a334f
--- a/WeatherStation.cpp Tue Apr 16 07:22:47 2019 +0000
+++ b/WeatherStation.cpp Tue Apr 16 08:25:25 2019 +0000
@@ -11,7 +11,7 @@
m_logger(logger),
m_lps25hb(m_iDevKit.getSDA(), m_iDevKit.getSCL(), m_logger),
m_hdc1000(m_iDevKit.getSDA(), m_iDevKit.getSCL(), m_iDevKit.getDataRdy(), m_logger),
- m_history(),
+ m_history(logger),
m_batteryService(ble, m_logger),
m_environmentalService(ble, m_logger) {
// Set the right timing at the Station's start
@@ -92,7 +92,7 @@
// Saving the measured values
m_history.addMeasurement(pressure, temp, humidity, time);
- // Send the measured values for encoding
- m_environmentalService.updateEnvironmentalService(((uint32_t)(pressure*10)), ((int16_t)(temp*100)), ((uint16_t)(humidity*100)));
+ // Send the measured values to GATT
+ m_environmentalService.updateEnvironmentalService(((uint32_t)(pressure*10)), ((int16_t)(temp*100)), ((uint16_t)(humidity*100)), ((uint8_t)(m_history.getPressureTrend())));
m_batteryService.updateBatteryLevel(battery);
}
\ No newline at end of file