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
save
[aversive.git]
/
projects
/
microb2010
/
cobboard
/
main.c
diff --git
a/projects/microb2010/cobboard/main.c
b/projects/microb2010/cobboard/main.c
index
24f14bc
..
1f4065b
100755
(executable)
--- a/
projects/microb2010/cobboard/main.c
+++ b/
projects/microb2010/cobboard/main.c
@@
-115,16
+115,21
@@
void bootloader(void)
void do_led_blink(__attribute__((unused)) void *dummy)
{
void do_led_blink(__attribute__((unused)) void *dummy)
{
-#if 1 /* simple blink */
- static uint8_t a=0;
+ static uint8_t a = 0;
- if(a)
- LED1_ON();
- else
- LED1_OFF();
-
- a = !a;
-#endif
+ if (cobboard.flags & DO_ERRBLOCKING) {
+ if (a & 1)
+ LED1_ON();
+ else
+ LED1_OFF();
+ }
+ else {
+ if (a & 4)
+ LED1_ON();
+ else
+ LED1_OFF();
+ }
+ a++;
}
static void main_timer_interrupt(void)
}
static void main_timer_interrupt(void)
@@
-153,7
+158,8
@@
int main(void)
memset(&gen, 0, sizeof(gen));
memset(&cobboard, 0, sizeof(cobboard));
/* cs is enabled after arm_calibrate() */
memset(&gen, 0, sizeof(gen));
memset(&cobboard, 0, sizeof(cobboard));
/* cs is enabled after arm_calibrate() */
- cobboard.flags = DO_ENCODERS | DO_POWER; // DO_BD
+ cobboard.flags = DO_ENCODERS | DO_POWER | DO_BD |
+ DO_ERRBLOCKING;
/* UART */
uart_init();
/* UART */
uart_init();