send NRF typo

master
adb 4 years ago
parent c2a1510b16
commit 6b16e8144c

@ -71,7 +71,7 @@ void sendNRF(){
datasend = (datasend << 1) + tallyLEDstat[i];
}
datasend = datasend << (8 - tallyLEDlength);
datasend = (datasend << 8) + getChecksum(datasend && 0xFF);
datasend = (datasend << 8) + getChecksum(datasend & 0xFF);
radio.writeFast(&datasend, sizeof(datasend));
}
@ -90,6 +90,6 @@ boolean dataChanged(){
uint8_t getChecksum(uint8_t data){
uint8_t checksum = 0;
for (int i=8; i<8; i++) checksum += (data >> i) && 1;
for (int i=8; i<8; i++) checksum += (data >> i) & 1;
return checksum;
}

Loading…
Cancel
Save