|
|
@@ -141,17 +141,17 @@ bool DataFrame::AddUint32(uint32_t d)
|
|
|
|
|
|
bool DataFrame::AddInt8(int8_t d)
|
|
|
{
|
|
|
- return this->AddInt8((uint8_t)d);
|
|
|
+ return this->AddUint8((uint8_t)d);
|
|
|
}
|
|
|
|
|
|
bool DataFrame::AddInt16(int16_t d)
|
|
|
{
|
|
|
- return this->AddInt16((uint16_t)d);
|
|
|
+ return this->AddUint16((uint16_t)d);
|
|
|
}
|
|
|
|
|
|
bool DataFrame::AddInt32(int32_t d)
|
|
|
{
|
|
|
- return this->AddInt32((uint32_t)d);
|
|
|
+ return this->AddUint32((uint32_t)d);
|
|
|
}
|
|
|
|
|
|
bool DataFrame::AddFloat(float f)
|
|
|
@@ -174,8 +174,8 @@ bool DataFrame::AddFloat(float f)
|
|
|
uint8_t DataFrame::Commit(void)
|
|
|
{
|
|
|
// compute _length
|
|
|
- _frame[_length--] = crc8(0, _length-2, &(*(_frame+2)));
|
|
|
_frame[1] = _length;
|
|
|
+ _frame[_length--] = crc8(0, _length-2, _frame);
|
|
|
// length of payload: from byte 2 to CRC byte (the last)
|
|
|
return _length;
|
|
|
|