sky: Initialize energest as early as possible
If energest is initialized too late, the radio is not accounted until the first switch. This is a problem when the radio is always listening.
This commit is contained in:
parent
e803a654b4
commit
c0783e2841
|
@ -283,6 +283,10 @@ main(int argc, char **argv)
|
||||||
* Hardware initialization done!
|
* Hardware initialization done!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Initialize energest first (but after rtimer)
|
||||||
|
*/
|
||||||
|
energest_init();
|
||||||
|
ENERGEST_ON(ENERGEST_TYPE_CPU);
|
||||||
|
|
||||||
#if WITH_TINYOS_AUTO_IDS
|
#if WITH_TINYOS_AUTO_IDS
|
||||||
node_id = TOS_NODE_ID;
|
node_id = TOS_NODE_ID;
|
||||||
|
@ -418,9 +422,6 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
#endif /* WITH_UIP */
|
#endif /* WITH_UIP */
|
||||||
|
|
||||||
energest_init();
|
|
||||||
ENERGEST_ON(ENERGEST_TYPE_CPU);
|
|
||||||
|
|
||||||
watchdog_start();
|
watchdog_start();
|
||||||
|
|
||||||
NETSTACK_LLSEC.bootstrap(start_network_layer);
|
NETSTACK_LLSEC.bootstrap(start_network_layer);
|
||||||
|
|
Loading…
Reference in a new issue