git.droids-corp.org
/
protos
/
xbee-avr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
save some documentation in notes.txt
[protos/xbee-avr.git]
/
xbee_proto.c
diff --git
a/xbee_proto.c
b/xbee_proto.c
index
05f0b56
..
409d9a9
100644
(file)
--- a/
xbee_proto.c
+++ b/
xbee_proto.c
@@
-230,7
+230,7
@@
int xbee_proto_xmit(struct xbee_dev *dev, uint8_t channel_id, uint8_t type,
hdr.type = type;
hdr.id = channel_id;
hdr.type = type;
hdr.id = channel_id;
- if (channel_id
< 0 || channel_id
>= XBEE_MAX_CHANNEL ||
+ if (channel_id >= XBEE_MAX_CHANNEL ||
dev->channel[channel_id].registered == 0) {
dev->stats.tx_invalid_channel ++;
return -1;
dev->channel[channel_id].registered == 0) {
dev->stats.tx_invalid_channel ++;
return -1;
@@
-327,8
+327,9
@@
void xbee_proto_rx(struct xbee_dev *dev)
/* not enough data */
if (dev->frame_len < framelen)
continue;
/* not enough data */
if (dev->frame_len < framelen)
continue;
- if (xbee_proto_parse_frame(dev) < 0)
+ if (xbee_proto_parse_frame(dev) < 0)
{
;//XXX stats
;//XXX stats
+ }
dev->frame_len = 0;
}
}
dev->frame_len = 0;
}
}