Skip to content
Open
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
4 changes: 3 additions & 1 deletion RCSwitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,14 +496,16 @@ void RCSwitch::send(unsigned long code, unsigned int length) {
#endif

for (int nRepeat = 0; nRepeat < nRepeatTransmit; nRepeat++) {
this->transmit(protocol.syncFactor);
for (int i = length-1; i >= 0; i--) {
if (code & (1L << i))
this->transmit(protocol.one);
else
this->transmit(protocol.zero);
}
this->transmit(protocol.syncFactor);
}
// (start) and end every transmission with a sync bit => issue #82
this->transmit(protocol.syncFactor);

#if not defined( RCSwitchDisableReceiving )
// enable receiver again if we just disabled it
Expand Down