contienus previous commit
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
#include"WirelessRelay.h"
|
||||
#include <avr/io.h>
|
||||
#include "eeprom.h"
|
||||
#include <string.h>
|
||||
|
||||
volatile unsigned char *_port = &PORTB;
|
||||
unsigned char _pin = PB5;
|
||||
@ -88,15 +88,25 @@ bool WirelessRelay::getExpectedState()
|
||||
return _state;
|
||||
}
|
||||
|
||||
|
||||
void WirelessRelay::init( const uint16_t id)
|
||||
char* WirelessRelay::getName()
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
||||
void WirelessRelay::setName(char name[])
|
||||
{
|
||||
memcpy(_name, name, strlen(name)+1);
|
||||
}
|
||||
|
||||
void WirelessRelay::init( const uint16_t id, char nameIn[])
|
||||
{
|
||||
setName(nameIn);
|
||||
_id=id;
|
||||
}
|
||||
|
||||
WirelessRelay::WirelessRelay(const uint16_t id)
|
||||
WirelessRelay::WirelessRelay(const uint16_t id, char nameIn[])
|
||||
{
|
||||
init(id);
|
||||
init(id, nameIn);
|
||||
}
|
||||
|
||||
WirelessRelay::WirelessRelay(){}
|
||||
|
Reference in New Issue
Block a user