Skip to content

Commit

Permalink
AP_Notify: NCP5623 Re enabling the LED OV3-968
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokesh Ramina committed Sep 6, 2023
1 parent 721062a commit af19399
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libraries/AP_Notify/NCP5623.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,16 @@ bool NCP5623::hw_set_rgb(uint8_t red, uint8_t green, uint8_t blue)

void NCP5623::_timer(void)
{
// enable the led if ack not fetch in last write
if (!_status){
_status = write(NCP5623_LED_ENABLE, 0x1f);
return;
}

if (!_need_update) {
return;
}
_need_update = false;

write_pwm(rgb);
_status = write_pwm(rgb);
}
1 change: 1 addition & 0 deletions libraries/AP_Notify/NCP5623.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ class NCP5623 : public RGBLed {
uint8_t rgb[3];
bool _need_update;
uint8_t _bus;
bool _status;
};

0 comments on commit af19399

Please sign in to comment.