Support multi backend items
This commit is contained in:
24
uvositem.cpp
Normal file
24
uvositem.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
#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);
|
||||
}
|
Reference in New Issue
Block a user