[tuxdroid-svn] r5749 - firmware/tuxcore/trunk
Status: Beta
Brought to you by:
ks156
|
From: ks156 <c2m...@c2...> - 2009-10-20 07:03:38
|
Author: ks156
Date: 2009-10-20 09:03:26 +0200 (Tue, 20 Oct 2009)
New Revision: 5749
Modified:
firmware/tuxcore/trunk/main.c
Log:
* Restore the statuses when quitting the sleep mode.
This should prevent the wings inversion.
Modified: firmware/tuxcore/trunk/main.c
===================================================================
--- firmware/tuxcore/trunk/main.c 2009-10-20 06:51:55 UTC (rev 5748)
+++ firmware/tuxcore/trunk/main.c 2009-10-20 07:03:26 UTC (rev 5749)
@@ -309,8 +309,9 @@
static void sleep(void)
{
uint8_t PRR_bak;
+ uint8_t status_bak;
+ /* Set power savings configuration. */
- /* Set power savings configuration. */
cli();
closeIO();
sensors_disable();
@@ -329,6 +330,7 @@
PCIFR = _BV(PCIE0);
PCICR |= _BV(PCIE0);
+ status_bak = gStatus.pos;
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable();
sei();
@@ -345,6 +347,7 @@
led_init();
communication_init();
irGetRC5();
+ gStatus.pos = status_bak;
/* Wait 200ms for the pull-up to rise before next standalone behavior
* otherwise position switches signals are wrong */
|