use chars for protocol 1 group, with leading 0, to match the way is defined in devices
This commit is contained in:
parent
cad27ea106
commit
2411750b35
@ -21,7 +21,7 @@ public:
|
|||||||
RcDecoder decoder;
|
RcDecoder decoder;
|
||||||
decoder.decode(value);
|
decoder.decode(value);
|
||||||
rcSwitch["state"] = decoder.state;
|
rcSwitch["state"] = decoder.state;
|
||||||
rcSwitch["group"] = String(decoder.group, BIN);
|
rcSwitch["group"] = decoder.group;
|
||||||
rcSwitch["channel"] = decoder.device;
|
rcSwitch["channel"] = decoder.device;
|
||||||
rcSwitch["raw_value"] = value;
|
rcSwitch["raw_value"] = value;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
struct RcDecoder {
|
struct RcDecoder {
|
||||||
bool state;
|
bool state;
|
||||||
char group;
|
char group[6];
|
||||||
unsigned char device;
|
unsigned char device;
|
||||||
|
|
||||||
void decode(unsigned long value) {
|
void decode(unsigned long value) {
|
||||||
@ -16,7 +16,7 @@ struct RcDecoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
state = RC_STATE(res);
|
state = RC_STATE(res);
|
||||||
group = RC_GROUP(res);
|
sprintf(group, "%05ld", RC_GROUP(res));
|
||||||
switch (RC_DEVICE(res)) {
|
switch (RC_DEVICE(res)) {
|
||||||
case 0b10000:
|
case 0b10000:
|
||||||
device = 1;
|
device = 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user