Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions MiLightRadio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#define PACKET_ID(packet) ( ((packet[1] & 0xF0)<<24) | (packet[2]<<16) | (packet[3]<<8) | (packet[7]) )

static const uint8_t CHANNELS[] = {9, 40, 71};
static const uint8_t CHANNELS[] = {70, 39, 8};
#define NUM_CHANNELS (sizeof(CHANNELS)/sizeof(CHANNELS[0]))

MiLightRadio::MiLightRadio(AbstractPL1167 &pl1167)
Expand Down Expand Up @@ -39,12 +39,12 @@ int MiLightRadio::begin()
return retval;
}

retval = _pl1167.setSyncword(0x147A, 0x258B);
retval = _pl1167.setSyncword(0x7236, 0x1809);
if (retval < 0) {
return retval;
}

retval = _pl1167.setMaxPacketLength(8);
retval = _pl1167.setMaxPacketLength(10);
if (retval < 0) {
return retval;
}
Expand Down
2 changes: 1 addition & 1 deletion MiLightRadio.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MiLightRadio {
AbstractPL1167 &_pl1167;
uint32_t _prev_packet_id;

uint8_t _packet[8], _out_packet[8];
uint8_t _packet[10], _out_packet[10];
bool _waiting;
int _dupes_received;
};
Expand Down