Core Base Classes for the Light Endpoints
Dependents: mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more
Diff: MBEDBattery.cpp
- Revision:
- 60:76728655fa12
- Parent:
- 52:f0b4710c43f9
- Child:
- 128:fde8d042a9af
diff -r c58774344049 -r 76728655fa12 MBEDBattery.cpp --- a/MBEDBattery.cpp Mon Mar 03 00:56:27 2014 +0000 +++ b/MBEDBattery.cpp Mon Mar 03 03:32:42 2014 +0000 @@ -33,6 +33,6 @@ // update our value void MBEDBattery::update() { - float bat = battery_pot * 5.0; // Scale 0V - 5.0V + float bat = battery_pot.read() * 5.0; // Scale 0V - 5.0V if (this->m_resource != NULL && this->m_resource->getValuePointer() != NULL) sprintf(this->m_resource->getValuePointer(),"%.1fV",bat); }