Skip to content

Commit

Permalink
AP_Notify:correct and expand 1 led flash sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
Hwurzburg committed Aug 26, 2024
1 parent a65cd27 commit 17aaf32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions libraries/AP_Notify/GPIO_LED_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ void GPIO_LED_1::update(void)
new_pattern = ARMED;
} else if (AP_Notify::flags.pre_arm_check) {
new_pattern = READY_TO_ARM;
} else if (AP_Notify::flags.failsafe_radio || AP_Notify::flags.failsafe_gcs || AP_Notify::flags.failsafe_battery) {
new pattern = FAILSAFE;
} else {
new_pattern = NOT_READY_TO_ARM;
}
Expand Down
3 changes: 2 additions & 1 deletion libraries/AP_Notify/GPIO_LED_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ class GPIO_LED_1 : public NotifyDevice

// left-to-right, each bit represents 100ms
static const uint32_t INITIALIZING = 0b10101010101010101010101010101010UL;
static const uint32_t NOT_READY_TO_ARM = 0b11111111000000001111111100000000UL;
static const uint32_t NOT_READY_TO_ARM = 0b11110000000000001111111110000000UL;
static const uint32_t READY_TO_ARM = 0b11111111111111100000000000000000UL;
static const uint32_t ARMED = 0b11111111111111111111111111111111UL;
static const uint32_t FAILSAFE = 0b11110000111100001111000011110000UL;

uint32_t current_pattern = INITIALIZING;
uint32_t last_timestep_ms;
Expand Down

0 comments on commit 17aaf32

Please sign in to comment.