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:
- 19:e056f98192f2
- Parent:
- 17:76787f5a334f
- Child:
- 22:79c64511d34d
--- a/WeatherStation.cpp Wed Apr 17 11:29:46 2019 +0000 +++ b/WeatherStation.cpp Wed Apr 17 12:58:36 2019 +0000 @@ -92,7 +92,8 @@ // Saving the measured values m_history.addMeasurement(((uint32_t)(pressure*10)), ((int16_t)(temp*100)), ((uint16_t)(humidity*100)), ((uint32_t)time)); - // 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()))); + // Send the measured values to GATT + uint32_t averagePressure = m_history.getPressureTrend(); + m_environmentalService.updateEnvironmentalService(((uint32_t)(pressure*10)), ((int16_t)(temp*100)), ((uint16_t)(humidity*100)), averagePressure); m_batteryService.updateBatteryLevel(battery); } \ No newline at end of file