git.droids-corp.org
/
aversive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix display and support beacon in robotsim
[aversive.git]
/
projects
/
microb2010
/
cobboard
/
main.c
diff --git
a/projects/microb2010/cobboard/main.c
b/projects/microb2010/cobboard/main.c
index
7a3d240
..
d01a92e
100755
(executable)
--- a/
projects/microb2010/cobboard/main.c
+++ b/
projects/microb2010/cobboard/main.c
@@
-173,13
+173,17
@@
int main(void)
# error not supported
#endif
# error not supported
#endif
- eeprom_write_byte(EEPROM_MAGIC_ADDRESS, EEPROM_MAGIC_COBBOARD);
/* check eeprom to avoid to run the bad program */
if (eeprom_read_byte(EEPROM_MAGIC_ADDRESS) !=
EEPROM_MAGIC_COBBOARD) {
/* check eeprom to avoid to run the bad program */
if (eeprom_read_byte(EEPROM_MAGIC_ADDRESS) !=
EEPROM_MAGIC_COBBOARD) {
+ int c;
sei();
sei();
- printf_P(PSTR("Bad eeprom value\r\n"));
- while(1);
+ printf_P(PSTR("Bad eeprom value ('f' to force)\r\n"));
+ c = uart_recv(CMDLINE_UART);
+ if (c == 'f')
+ eeprom_write_byte(EEPROM_MAGIC_ADDRESS, EEPROM_MAGIC_COBBOARD);
+ wait_ms(100);
+ bootloader();
}
/* LOGS */
}
/* LOGS */
@@
-254,13
+258,13
@@
int main(void)
printf_P(PSTR("cobboard start\r\n"));
printf_P(PSTR("cobboard start\r\n"));
+ /* actuators */
+ actuator_init();
+
/* spickle, shovel */
spickle_init();
shovel_init();
/* spickle, shovel */
spickle_init();
shovel_init();
- /* actuators */
- actuator_init();
-
state_init();
printf_P(PSTR("\r\n"));
state_init();
printf_P(PSTR("\r\n"));