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.
Dependencies: Adafruit_GFX MODSERIAL mbed-rtos mbed
OilTemperature.cpp
- Committer:
- chrta
- Date:
- 2014-04-27
- Revision:
- 5:0b229ba8ede5
- Child:
- 6:506b703a8acf
File content as of revision 5:0b229ba8ede5:
#include "OilTemperature.h"
OilTemperature::OilTemperature()
: PidValue("Oil Temperature", "deg C")
{
}
bool OilTemperature::decode(const uint8_t* data, uint16_t length)
{
if (length < 2)
{
return false;
}
if ((length != 31) || (data[0] != 0x61) || (data[1] != 0x01))
{
return false;
}
m_value = data[30] - 40; // deg C
return true;
}