aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-misc.c
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-10-10 21:29:22 -0600
committerSelene ToyKeeper2018-10-10 21:29:22 -0600
commit85e0f22130db548c25e2c7677b02087211571306 (patch)
tree00d56b45fa181418fc2ce72bfa93f766008bdfe0 /spaghetti-monster/fsm-misc.c
parentFixed location of an #endif (diff)
parentapplied thermal target bugfix from Anduril (diff)
downloadanduril-85e0f22130db548c25e2c7677b02087211571306.tar.gz
anduril-85e0f22130db548c25e2c7677b02087211571306.tar.bz2
anduril-85e0f22130db548c25e2c7677b02087211571306.zip
merged updates from fsm branch
Diffstat (limited to 'spaghetti-monster/fsm-misc.c')
-rw-r--r--spaghetti-monster/fsm-misc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/spaghetti-monster/fsm-misc.c b/spaghetti-monster/fsm-misc.c
index e60909e..e61fe00 100644
--- a/spaghetti-monster/fsm-misc.c
+++ b/spaghetti-monster/fsm-misc.c
@@ -113,14 +113,26 @@ void indicator_led(uint8_t lvl) {
case 0: // indicator off
DDRB &= 0xff ^ (1 << AUXLED_PIN);
PORTB &= 0xff ^ (1 << AUXLED_PIN);
+ #ifdef AUXLED2_PIN // second LED mirrors the first
+ DDRB &= 0xff ^ (1 << AUXLED2_PIN);
+ PORTB &= 0xff ^ (1 << AUXLED2_PIN);
+ #endif
break;
case 1: // indicator low
DDRB &= 0xff ^ (1 << AUXLED_PIN);
PORTB |= (1 << AUXLED_PIN);
+ #ifdef AUXLED2_PIN // second LED mirrors the first
+ DDRB &= 0xff ^ (1 << AUXLED2_PIN);
+ PORTB |= (1 << AUXLED2_PIN);
+ #endif
break;
default: // indicator high
DDRB |= (1 << AUXLED_PIN);
PORTB |= (1 << AUXLED_PIN);
+ #ifdef AUXLED2_PIN // second LED mirrors the first
+ DDRB |= (1 << AUXLED2_PIN);
+ PORTB |= (1 << AUXLED2_PIN);
+ #endif
break;
}
}