Skip to content

Commit

Permalink
AP_Notify: added OreoLED_I2C driver
Browse files Browse the repository at this point in the history
this is for Solo on ChibiOS, but is usable with any board
  • Loading branch information
tridge committed Nov 26, 2018
1 parent deea507 commit 78dc575
Show file tree
Hide file tree
Showing 3 changed files with 930 additions and 3 deletions.
11 changes: 8 additions & 3 deletions libraries/AP_Notify/AP_Notify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "PCA9685LED_I2C.h"
#include "NCP5623.h"
#include "OreoLED_PX4.h"
#include "OreoLED_I2C.h"
#include "RCOutputRGBLed.h"
#include "ToneAlarm.h"
#include "ToshibaLED_I2C.h"
Expand Down Expand Up @@ -136,14 +137,14 @@ const AP_Param::GroupInfo AP_Notify::var_info[] = {
// @User: Advanced
AP_GROUPINFO("DISPLAY_TYPE", 3, AP_Notify, _display_type, 0),

#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 && CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_PX4_V3
#if !HAL_MINIMIZE_FEATURES
// @Param: OREO_THEME
// @DisplayName: OreoLED Theme
// @Description: Enable/Disable Solo Oreo LED driver, 0 to disable, 1 for Aircraft theme, 2 for Rover theme
// @Values: 0:Disabled,1:Aircraft,2:Rover
// @User: Advanced
AP_GROUPINFO("OREO_THEME", 4, AP_Notify, _oreo_theme, 0),
#endif // CONFIG_HAL_BOARD == HAL_BOARD_PX4 && CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_PX4_V3
#endif

#if !defined(HAL_BUZZER_PIN)
// @Param: BUZZ_PIN
Expand Down Expand Up @@ -261,7 +262,11 @@ void AP_Notify::add_backends(void)
if (_oreo_theme) {
ADD_BACKEND(new OreoLED_PX4(_oreo_theme));
}
#endif // (CONFIG_HAL_BOARD == HAL_BOARD_PX4) && (CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_PX4_V3)
#elif !HAL_MINIMIZE_FEATURES
if (_oreo_theme) {
ADD_BACKEND(new OreoLED_I2C(0, _oreo_theme));
}
#endif
break;
case Notify_LED_UAVCAN:
#if HAL_WITH_UAVCAN
Expand Down
Loading

0 comments on commit 78dc575

Please sign in to comment.