Skip to content

Commit

Permalink
DM: make LED flash specific pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
deanm1278 committed May 30, 2018
1 parent 35e1689 commit e7b2fce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/System.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class System : public QActive {
#if CONFIG_POWER_SENSE
QTimeEvt m_powerSenseTimer;
QTimeEvt m_powerSenseBlinkTimer;
bool m_powerSenseLEDState;
uint8_t m_powerSenseLEDState;
#endif

#if CONFIG_I2C_SLAVE
Expand Down
4 changes: 2 additions & 2 deletions source/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,9 @@ QState System::Conflicted(System * const me, QEvt const * const e) {
}
case SYSTEM_POWER_SENSE_BLINK: {
LOG_EVENT(e);
me->m_powerSenseLEDState = !me->m_powerSenseLEDState;
me->m_powerSenseLEDState = (me->m_powerSenseLEDState + 1) % 30;
uint32_t color = 0;
if(me->m_powerSenseLEDState){
if(me->m_powerSenseLEDState % 2 && me->m_powerSenseLEDState < 12){
color = 0x002000;
}
neopix_show_800k(CONFIG_POWER_SENSE_NEOPIX_PIN, (uint8_t *)&color, 4);
Expand Down

0 comments on commit e7b2fce

Please sign in to comment.