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: EnvironmentalService.cpp
- Revision:
- 19:e056f98192f2
- Parent:
- 18:7002e66af2e5
- Child:
- 20:dac20b06d457
--- a/EnvironmentalService.cpp Wed Apr 17 11:29:46 2019 +0000 +++ b/EnvironmentalService.cpp Wed Apr 17 12:58:36 2019 +0000 @@ -2,6 +2,8 @@ #include "mbed.h" +#include <stdio.h> + EnvironmentalService::EnvironmentalService(BLE& ble, Logger& logger) : m_ble(ble), m_serviceAdded(false), @@ -41,7 +43,7 @@ if (newPressure == newPressureTrend) m_pressureTrend = STEADY; if (newPressure > newPressureTrend) m_pressureTrend = RISING_CONTINUOUSLY; if (newPressure < newPressureTrend) m_pressureTrend = FALLING_CONTINUOUSLY; - + m_ble.gattServer().write(m_pressureCharacteristic.getValueHandle(), (uint8_t *) &m_pressure, sizeof(PressureType_t)); m_ble.gattServer().write(m_temperatureCharacteristic.getValueHandle(), (uint8_t *) &m_temperature, sizeof(m_temperature)); m_ble.gattServer().write(m_humidityCharacteristic.getValueHandle(), (uint8_t *) &m_humidity, sizeof(m_humidity));