Fix mesh. Actually check CRCs again. Increment release no.

This commit is contained in:
Stefan `Sec` Zehl 2011-12-27 01:53:48 +01:00
parent e94680838d
commit b0b30b86a5
4 changed files with 6 additions and 5 deletions

View File

@ -198,7 +198,7 @@ static inline uint32_t popcount(uint32_t *buf, uint8_t n){
uint8_t mesh_recvqloop_work(void){
__attribute__ ((aligned (4))) uint8_t buf[32];
int len;
unsigned int len;
len=nrf_rcv_pkt_poll_dec(sizeof(buf),buf,NULL);
@ -249,6 +249,8 @@ uint8_t mesh_recvqloop_work(void){
(*(
(uint32_t*)(MO_BODY(buf)+6)
))++;
if(GLOBAL(privacy)==0)
uint32touint8p(GetUUID32(),MO_BODY(buf)+20);
MO_TIME_set(mpkt->pkt,0);
};
#if 0

View File

@ -9,7 +9,7 @@
#define M_RECVTIM 100
#define MESH_CHANNEL 83
#define MESH_MAC "MESHB"
#define MESH_MAC "BMESH"
#define MO_TYPE(x) (x[0])
#define MO_TYPE_set(x,y) (x[0]=y)

View File

@ -151,8 +151,7 @@ int nrf_rcv_pkt_poll_dec(int maxsize, uint8_t * pkt, uint32_t const key[4]){
if(len <=0)
return len;
if(key==NULL)
return len;
// if(key==NULL) return len;
cmpcrc=crc16(pkt,len-2);
if(key!=NULL)

View File

@ -77,5 +77,5 @@ int main(void) {
}
int getrelease(void){
return 0x00000104;
return 0x00000105;
};