Small project to display some OBD values from the Toyota GT86/ Subaru BRZ/ Scion FRS on an OLED display.
Dependencies: Adafruit_GFX MODSERIAL mbed-rtos mbed
PidValue.cpp
- Committer:
- chrta
- Date:
- 2014-05-11
- Revision:
- 7:a19b63c0a0fa
- Parent:
- 6:506b703a8acf
File content as of revision 7:a19b63c0a0fa:
#include "PidValue.h"
#include "DebugPrint.h"
PidValue::PidValue(const char* name, const char* unit)
: m_value(0)
, m_unit(unit)
, m_name(name)
{
}
void PidValue::print()
{
pc.printf("%d %s\r\n", m_value, m_unit);
}
const char* PidValue::getName()
{
return m_name;
}
const char* PidValue::getUnit()
{
return m_unit;
}
unsigned int PidValue::getValue()
{
return m_value;
}