Commit Graph

406 Commits

Author SHA1 Message Date
Tom Pittenger 4ece7fd4f0 AP_Notify: unify singleton naming to _singleton and get_singleton() 2019-02-10 19:09:58 -07:00
LukeMike e15d2c0f89 HAL_ChibiOS: added ChibiOS configuration of VR Brain 5.4 2019-01-24 18:41:38 +11:00
LukeMike 33f7f5b7b6 HAL_ChibiOS: added ChibiOS configuration for VR Core 1.0 2019-01-24 18:41:38 +11:00
LukeMike f615ab9a0a HAL_ChibiOS: added ChibiOS configuration for VR Brain 5.1 2019-01-24 18:41:38 +11:00
Andrew Tridgell 696d7a0218 AP_Notify: removed F4Light 2019-01-21 21:57:21 +11:00
Peter Barker 0492635cbd AP_Notify: remove code protected by PX4 defines, correct comments 2019-01-20 08:52:51 +11:00
Peter Barker 002070ae9e AP_Notify: remove HAL-VRBRAIN-specific code 2019-01-20 08:52:51 +11:00
LukeMike 0bbcbc8624 AP_Notify: added ExternalLED and VRBoard_LED for ChibiOS VR Brain boards 2019-01-18 11:49:19 +11:00
Peter Barker 1dde70007a AC_Notify: remove use of never-set AP_HAL_PX4 and AP_HAL_VRBRAIN 2019-01-18 09:53:44 +11:00
Peter Barker 91a082c29f AP_Notify: remove px4 oreloed driver 2019-01-17 12:30:56 +11:00
Andrew Tridgell 1755f5b6c7 AP_Notify: fixed NTF_BUZZ_ENABLE default
it shouldn't be based on the polarity of the buzzer
2019-01-05 12:08:29 +09:00
Andrew Tridgell 891447d798 AP_Notify: fixed LED sync for OreoLED
the NuttX driver tries to send a sync every 4s, but actually ends up
sending at around 4.1s due to poor scheduling. Rather strangely, the
oreoled firmware seems to rely on this inaccuracy, and doesn't work
with exactly 4s under ChibiOS
2018-11-26 13:29:40 +11:00
Andrew Tridgell 78dc575258 AP_Notify: added OreoLED_I2C driver
this is for Solo on ChibiOS, but is usable with any board
2018-11-26 13:29:40 +11:00
Peter Barker 344d6b938c AP_Notify: add override keyword where required 2018-11-08 11:30:12 +11:00
Andrew Tridgell bf829cd792 AP_Notify: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell 38616e6bee AP_Notify: ensure we can't skip a step in RGBLed timing 2018-10-09 20:25:49 +09:00
Andrew Tridgell 6489166996 AP_Notify: fixed PixracerLED on NuttX
led_dim must be a positive number, and is not related to the led off
value
2018-10-09 20:25:49 +09:00
Andrew Tridgell 927105cd25 AP_Notify: init gpio state for LEDs 2018-10-09 20:25:49 +09:00
Andrew Tridgell 36aa666786 AP_Notify: fixed px4-v4 to use pixracer LED driver 2018-10-09 20:25:49 +09:00
Peter Barker 5ae3c60e8b AP_Notify: fix nullptr in ToshibaLED example 2018-09-19 22:40:20 -07:00
Michael du Breuil e41b2de5ea AP_Notify: Catch bad board LED combos 2018-09-19 22:58:46 +01:00
Andrew Tridgell ebcdf4c9c6 AP_Notify: fixed oled probe on first bus
Thanks to Erwin Quilloy for helping to track this down
2018-09-03 18:15:05 +01:00
Andrew Tridgell c79650a8d8 AP_Notify: fixed remote play tune 2018-08-29 13:47:20 +10:00
Andrew Tridgell 1762a2708c AP_Notify: removed unused hal variable 2018-08-26 07:57:05 +10:00
Peter Barker df836ec70c AP_Notify: tidy and remove code duplications
Saves 60 bytes, too
2018-08-21 10:59:33 +10:00
Francisco Ferreira 3b61a31bb4
AP_Notify: adapt to changes in AP_BoardConfig_CAN 2018-08-12 13:35:03 +01:00
Francisco Ferreira f468602baf
AP_Notify: revert wrong commit 228058e089
Also change the order of logical OR so that led_write in UAVCAN_RGB_LED is called for all UAVCAN instances and not only first one
2018-08-12 13:35:03 +01:00
Peter Barker 5ad1dee284 AP_Notify: make LED blink at constant rate in Rover 2018-08-09 11:57:05 +10:00
Andrew Tridgell c9a830bf3f AP_Notify: support both NCP5623 addresses 2018-08-08 07:11:50 +10:00
Andrew Tridgell 935165a8f8 AP_Notify: tidy up NCP5623 driver 2018-08-08 07:11:50 +10:00
caijie a98d892dec AP_Notify: Add RGB LED driver for NCP5623 2018-08-08 07:11:50 +10:00
Michael du Breuil a5e974c227 AP_Notify: Reduce flash consumption, fix some drivers, always allow
buzzer
2018-08-01 09:22:09 +10:00
Andrew Tridgell 397ba488db AP_Notify: use NTF_BUZZ_ENABLE to disable tonealarm 2018-07-30 15:42:58 +10:00
Andrew Tridgell 1eb010fbf1 AP_Notify: reduced tone buffer size
100 is plenty
2018-07-30 14:02:12 +10:00
Andrew Tridgell b11bd33b0e AP_Notify: removed extra call to play_string 2018-07-30 14:02:12 +10:00
Andrew Tridgell d28c8f0214 AP_Notify: added duration to toneAlarm_set_buzzer_tone 2018-07-30 14:02:12 +10:00
Jonathan Challinger 0dd151c0f3 AP_Notify: changes needed for PX4 tonealarm 2018-07-30 14:02:12 +10:00
Jonathan Challinger f4fc9249f7 AP_Notify: support extended PLAY_TUNE message 2018-07-30 14:02:12 +10:00
Jonathan Challinger cba85eee7b AP_Notify: MMLPlayer constrain note frequency 2018-07-30 14:02:12 +10:00
Jonathan Challinger 98d962ffa2 AP_Notify: MMLPlayer note_tab static const 2018-07-30 14:02:12 +10:00
Jonathan Challinger 720676b28c AP_Notify: run astyle on ToneAlarm and MMLPlayer 2018-07-30 14:02:12 +10:00
Jonathan Challinger b31ddedfef AP_Notify: merge ToneAlarm files, use new AP_HAL tonealarm interface 2018-07-30 14:02:12 +10:00
Michael du Breuil c5a69d8ec2 AP_Notify: Fix bad loop count on notify LED's 2018-07-23 10:11:29 +09:00
Michael du Breuil bff985a9f4 AP_Notify: Configure the PCA9685 every boot 2018-07-20 14:53:23 +10:00
Michael du Breuil 961e16dca9 AP_Notify: Use a bitfield to load LED drivers 2018-07-20 14:53:23 +10:00
Andrew Tridgell d93964b319 AP_Notify: support playing tunes by string on ChibiOS 2018-07-20 14:37:16 +10:00
Andrew Tridgell 6bf3dea5e7 AP_Notify: use I2C bus masks 2018-07-10 15:39:47 +10:00
Andrew Tridgell 8b337bfc4c AP_Notify: fixed shadowed variable warning 2018-07-09 19:41:18 +10:00
Michael du Breuil 72439a053b AP_Notify: Handle LED pins being undefined, select appropriate drivers 2018-06-27 15:25:44 +10:00
Michael du Breuil c5669a614e AP_Notify: Remove unneeded init guards 2018-06-27 15:25:44 +10:00
Michael du Breuil 565a84efcb AP_Notify: Remove unreachable ChibiOS defines, enable BoardLed 2018-06-27 15:25:44 +10:00
Michael du Breuil abda44e886 AP_Notify: Move driver deletion to backend creation macro
Creates a dense array of drivers we want to update, reduces runtime
overhead, allows us to try detecting more backends then are present
2018-06-27 15:25:44 +10:00
Michael du Breuil 8e8e9a5a58 AP_Notify: Delete drivers that are not present 2018-06-27 15:25:44 +10:00
Michael du Breuil d0cd37fabb AP_Notify: Reduce flash consumption, remove unneeded middleware classes 2018-06-27 15:25:44 +10:00
Alexander Malishev 568e5a24b4 AP_Notify: initial OSD support 2018-06-27 14:55:00 +10:00
Lucas De Marchi 49d08ba72a Global: remove minlure
Minlure is a port of ArduPilot to Minnow Board connected to daughter
board. Very few of those were produced and nobody is flying with it.

It served its purpose and all the the improvements to ArduPilot remain
regardless of it not being supported anymore. Now it's just adding
maintenance work with no clear benefit, so pull the plug.
2018-06-26 07:32:08 -07:00
Andrew Tridgell 480017f190 AP_Notify: search for 4 buses in AP_Notify 2018-06-21 13:08:20 +10:00
mirkix 178b5e03c0 AP_Notify: move BUZZER_PIN into AP_HAL 2018-05-10 17:48:25 +01:00
Andrew Tridgell 6e0b5c204a AP_Notify: support buzzer backend on ChibiOS 2018-04-24 08:03:46 +10:00
Peter Barker 9480572075 AP_Notify: ChibiOS: beep on mode change 2018-04-19 09:29:41 +10:00
priseborough d600a96809 AP_Notify: Clarify definition for gps_glitching flag 2018-03-27 20:28:56 +09:00
Peter Barker ca907a5078 AP_Notify: correct parameter documentation
This is causing parameter parsing to fail at the moment
2018-03-26 10:52:48 +09:00
Andrew Tridgell e02f753b01 AP_Notify: removed unused code 2018-03-23 09:36:31 +11:00
night-ghost 64c2e691f8 full system status on 2 LEDs + buzzer pin as parameter 2018-03-23 09:36:31 +11:00
Nikita Tomilov 6ce6afa4be AP_Notify: enabling UAVCAN_RGB_LED for Linux Edge 2018-03-03 10:40:26 +12:00
Tom Pittenger 228058e089 AP_Notify: update some logic syntax
non-functional change, just the logic easier to read.
Converted
success = success || blah
to
success |= blah
2018-03-03 10:40:26 +12:00
Nikita Tomilov b5467bed7f AP_Notify: add new device UAVCAN_RGB_LED
This enables sending ArduPilot status color via UAVCAN bus.
2018-03-03 10:40:26 +12:00
night-ghost ab413b4605 AP_Notify: added personal support for AP_HAL_F4light 2018-02-22 08:10:32 +11:00
Andrew Tridgell 0fdef97c76 AP_Notify: allow ChibiOS to use PixracerLED driver 2018-02-14 18:27:00 +11:00
Mark Whitehorn d200f30cd7 AP_Notify: add ToneAlarm backend for ChibiOS 2018-02-11 14:55:23 +11:00
Andrew Tridgell 14dcee75f1 AP_Notify: added video recording flag 2018-02-08 17:36:33 +11:00
Andrew Tridgell b622fe143e AP_Notify: added have_pos_abs flag
used to notify of high-quality GPS lock
2018-02-08 17:36:33 +11:00
Andrew Tridgell 7d2e3c0d04 AP_Notify: fixed build warning 2018-02-07 20:33:45 +11:00
Andrew Tridgell 65b762ddfe AP_Notify: support OLED display on ChibiOS 2018-02-07 20:33:45 +11:00
mirkix 0926802013 AP_Notify: add new board PocketPilot 2017-12-27 16:01:55 +00:00
Andrew Tridgell cd51c71857 AP_Notify: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
HeBin 1918b07705 AP_Notify: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
Georgii Staroselskii a18cf45798 AP_Notify: enable AP_BoardLED for Navio 2017-11-17 09:20:55 -08:00
Georgii Staroselskii 4e02637f23 AP_Notify: add Led_Sysfs and use in Navio2
Navio2 exports its leds via /sys/class/leds interface. We reuse it in
order not to conflict with GPIO_Sysfs. Otherwise we'd get a Device Busy
error in GPIO_Sysfs::_export_pin().
2017-11-17 09:20:53 -08:00
Georgii Staroselskii 8fcd30c611 AP_HAL_Linux: use GPIO_Sysfs for Navio 2 2017-11-17 09:18:35 -08:00
Peter Barker 23882aaab0 AP_Notify: only play not-ready-or-not-finished tone if we've been ready 2017-11-08 19:08:23 +09:00
Peter Barker 901fe55d04 AP_Notify: play sad tone if prearm checks start to fail 2017-11-08 19:02:44 +09:00
Georgii Staroselskii 8a28556ae1 AP_Notify: use RCOutputRGBLedInverted for Edge 2017-10-20 13:03:08 -07:00
Georgii Staroselskii ef3cad7833 AP_Notify: add RCOutputRGBLedInverted
Some RGB leds controlled with an inverted logic. This class addresses
this.
2017-10-19 15:09:49 -07:00
Andrew Tridgell f00f650f4f AP_Notify: fixed internal toshiba LED
we need to probe for both internal and external on all boards, not just
FMUv3
2017-10-07 12:34:47 +11:00
Lucas De Marchi 9463dbb408 AP_Notify: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi 15bfa940a7 AP_Notify: remove raspilot 2017-09-12 15:06:19 -07:00
Andrew Tridgell 697131e94a AP_Notify: support dual I2c toshiba LEDs
This restructures AP_Notify to allow for multiple backends of the same type.
2017-09-11 10:39:39 -07:00
Matt 5b605d6e1c AP_Notify: Fix for Oreo LED gyro init inidication
If parameter INS_GYRO_CAL is disabled, usually because operator is
arming on a moving vehicle such as a boat, the Oreo LEDs would wait
indefinitely for a gyro calibration that will never happen.  This
removes that dependency.  The LEDs will strobe blue only when gyros are
actually initializing. Not before.  Consequently, this greatly
simiplifies that portion of the code.
2017-07-27 20:43:58 +09:00
Randy Mackay 0d5c98ad45 AP_Notify: add gps glitch notification 2017-07-27 14:16:23 +09:00
Peter Barker eb1f22fc67 AP_Notify: add singleton 2017-07-09 17:17:29 -04:00
Georgii Staroselskii 0203b4c1b1 AP_Notify: RCOutputRGBLed: remove cork()
cork()/push() will be called in the vehicle code.

The issue that led to this fix was as follows:
- on a Linux board (Navio 2) usage of this class didn't yield any PWM on
  the expected outputs on Rover (Copter and Plane worked as expected)

After dicsussion at #6339 rover code was changed (541538f) to use make
proper use of SRV_Channels API.

This fix is also the consequence of the discussion. TL;DR: the output is
only done when commanded by the vehicle.
2017-06-27 11:46:41 -07:00
murata ac8234cdf0 AP_Notify: Change to the value of boolean. 2017-06-07 08:06:44 +09:00
Matt f02bfab7fe AP_Notify: OreoLED rework
Reworked the process flow.  Created the aviation vs rover themes.
Created visual operator feedback for prearm checks, GPS, EKF, gyro init,
radio failsafe, and low battery. This also includes work by Hugh Eaves
to open up the full extended properties of the Oreo LEDs.  Not only are
far more functions available, but you can override and do custom things
via mavlink.
2017-06-06 12:59:03 +09:00
Matt 34d305083d AP_Notify: Complete rework of notify device selection
Jaime did the hard work on this one.  He reworked notify device
selection to take place on init rather than on compile like before.  The
notify decivces are mostly set on compile using preprocessor directives
based on board type.  I created NTF_OREO_THEME.  This will allow the
user to enable/disable the OreoLED driver. And it also allows you to
select between aircraft and rover lighting themes. This allows the Solo
to use the OreoLEDs, and doesn't waste the memory on vehicles not
equipped with Oreo LEDs. The OreoLED driver is restricted to Pixhawk 2
FCs by proprocessor directive due to memory constraints. So it will
never work by accident on another board.

There is also a new notify flag for GPS Fusion.  This flag is true when
the EKF is happy with the GPS, actively using it for position
information.
2017-06-06 12:58:28 +09:00
Matt 545e417348 AP_Notify: Remove solo specific tones, align with px4 tones
Evaluated solo specific tones file vs standard px4 tones files.  The
only thing the Solo had that standard ArduPilot does not have is the GPS
unplugged tone and the power off tone.
* Some tones have a different tune, which is fine. We want the Solo to
sound like ArduPilot if it is running ArduPilot.
* GPS unplugged tone abandoned. Determined to be unnecessary.
* Power off tone merged into standard px4 tones file. Smart battery
signalling a power off will make use of this tone. Has application for
any smart battery equipped vehicle, not just Solo.
* Removed all references and dependencies to `ToneAlarm_PX4_Solo.cpp`
and `ToneAlarm_PX4_Solo.h`
* Deleted `ToneAlarm_PX4_Solo.cpp` and `ToneAlarm_PX4_Solo.h` since
they're no longer needed.
2017-06-06 10:38:40 +09:00
Peter Barker 57c0551260 AP_Notify: remove non-required initialisation of variables
These objects are dynamically allocated, and we zero the memory
as we allocate them
2017-05-08 10:29:25 +09:00
Peter Barker ec37d863bc AP_Notify: simplify scrolling code 2017-05-08 10:29:22 +09:00
mirkix db7cf388f2 AP_Notify: enable display for BeagleBone Blue 2017-05-04 16:25:06 -07:00
Pierre Kancir a6eb337438 AP_Notify: remove unused variables 2017-05-02 18:14:40 +01:00