mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
use nodeid 0 if no nodeid has been set
This commit is contained in:
parent
e60db62b10
commit
e41de15c85
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: node-id.c,v 1.3 2007/09/14 19:24:45 nvt-se Exp $
|
* $Id: node-id.c,v 1.4 2009/08/24 15:44:45 nifi Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "node-id.h"
|
#include "node-id.h"
|
||||||
@ -43,7 +43,7 @@ node_id_restore(void)
|
|||||||
uint16_t newid[2];
|
uint16_t newid[2];
|
||||||
|
|
||||||
infomem_read(newid, INFOMEM_NODE_ID, sizeof(newid));
|
infomem_read(newid, INFOMEM_NODE_ID, sizeof(newid));
|
||||||
node_id = ( newid[0] == 0xdead ) ? newid[1] : newid[0];
|
node_id = (newid[0] == 0xdead) ? newid[1] : 0;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user