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:
- 22:79c64511d34d
- Parent:
- 19:e056f98192f2
- Child:
- 23:f45027ac625c
--- a/WeatherStation.cpp Fri Apr 19 16:17:07 2019 +0000 +++ b/WeatherStation.cpp Wed May 29 06:36:54 2019 +0000 @@ -92,8 +92,12 @@ // 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 + // Send the measured values to GATT's services + m_environmentalService.updatePressureLevel ((uint32_t)(pressure*10)); + m_environmentalService.updateTemperatureLevel ((int16_t)(temp*100)); + m_environmentalService.updateHumidityLevel ((uint16_t)(humidity*100)); + // get pressure trend for the environmental service uint32_t averagePressure = m_history.getPressureTrend(); - m_environmentalService.updateEnvironmentalService(((uint32_t)(pressure*10)), ((int16_t)(temp*100)), ((uint16_t)(humidity*100)), averagePressure); + m_environmentalService.updatePressureLevel (averagePressure); m_batteryService.updateBatteryLevel(battery); } \ No newline at end of file