projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add CRC to radio packets
[fw/altos]
/
target
/
radio
/
recv.c
diff --git
a/target/radio/recv.c
b/target/radio/recv.c
index 17a3d1780358cc8125e28efa2b7f63e9efd0e4f8..1f50d8a95721ca3eb6832a6384136db183ead36a 100644
(file)
--- a/
target/radio/recv.c
+++ b/
target/radio/recv.c
@@
-53,8
+53,10
@@
main ()
break;
/* get excited if the packet came through correctly */
break;
/* get excited if the packet came through correctly */
- if (i == PACKET_LEN) {
- for (i = 0; i < 3; i++){
+ if (i == PACKET_LEN &&
+ packet[PACKET_LEN+1] & PKT_APPEND_STATUS_1_CRC_OK)
+ {
+ for (i = 0; i < 5; i++){
P1 = 2;
delay(100);
P1 = 0;
P1 = 2;
delay(100);
P1 = 0;