25 lines
398 B
C++
25 lines
398 B
C++
#include "uvositem.h"
|
|
|
|
UvosItem::UvosItem(const uint8_t idIn, char nameIn[])
|
|
{
|
|
id = 129 << 8 + idIn;
|
|
type = 1;
|
|
}
|
|
|
|
UvosItem::UvosItem(const Item& item)
|
|
{
|
|
Item::operator=(item);
|
|
type = 1;
|
|
}
|
|
|
|
void UvosItem::setValue(const uint8_t value)
|
|
{
|
|
const uint8_t paket[4] = {id >> 8, id & 0x00FF, 0, value};
|
|
if(transmitter)transmitter->send(paket, 4);
|
|
}
|
|
|
|
void UvosItem::resend()
|
|
{
|
|
setValue(lastValue);
|
|
}
|