28 lines
547 B
C++
28 lines
547 B
C++
#ifndef RF433_H
|
|
#define RF433_H
|
|
|
|
#include<util/delay.h>
|
|
#include"writepin.h"
|
|
#include "item.h"
|
|
|
|
class WirelessRelay: public Item
|
|
{
|
|
public:
|
|
static constexpr uint16_t LARGE_TIME = 750;
|
|
static constexpr uint8_t SMALL_TIME = 250;
|
|
|
|
static constexpr uint16_t MAX_NAME_LENGTH = 16;
|
|
|
|
private:
|
|
void sendBit(const bool i);
|
|
void sync();
|
|
void sendId();
|
|
|
|
public:
|
|
WirelessRelay(const uint16_t idIn, char nameIn[]);
|
|
WirelessRelay(const Item& item);
|
|
void setValue(const uint8_t value);
|
|
void resend();
|
|
};
|
|
#endif
|