Commit Graph

362 Commits

Author SHA1 Message Date
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
Peter Barker ece0e84ddf AP_Notify: reindent (NFC) 2017-05-02 08:50:41 +10:00
Peter Barker ce5739f1a0 AP_Notify: remove semaphores protecting pixels
The semaphore-take-forevers were absolutely killing performance.

We can take some random pixel corruption to avoid vehicles crashing.
2017-05-02 08:50:41 +10:00
Peter Barker a3f4a523b2 AP_Notify: convert unknown characters to spaces 2017-05-01 16:21:55 +01:00
Vinicius Juvinski c3d5aaa21c AP_Notify: add AP_BoardLED support for BBBMini 2017-04-19 01:33:50 -07:00
Andrew Tridgell 6a1c58b5a5 AP_Notify: fixed RGB led output to use SRV_Channels 2017-04-18 08:41:24 +10:00
Pierre Kancir 2f50e865c2 AP_Notify: example fix travis warning
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
murata 1a781f44cc AP_Notify: Correct the display area clear of the text message. 2017-03-22 01:24:21 +00:00
murata 33f91b5af5 AP_Notify: whitespace changes 2017-03-17 01:29:11 +00:00
murata 3a6f8d2136 AP_Notify: Preprocessor out EMOJI code group with character bitmap. 2017-03-17 01:26:54 +00:00
Peter Barker bcb0ead71a AP_Notify: improve display detection
Create probe function for displays
Use a mask to determine I2C buses to probe
2017-03-17 00:37:40 +00:00
Peter Barker d170396acf Notify: Display: blank text line after 10s 2017-02-27 09:02:09 +09:00
Peter Barker da03cf29d6 Notify: Display: pad GPS status/sat count to fix stray chars 2017-02-27 08:14:25 +09:00
Jacob Walser f3fa8403f8 AP_Notify: Add tone and light pattern for leak detection 2017-02-21 11:26:14 +11:00
murata eb6cdd27fb AP_Notify: Change from magic number 0 to definition name. 2017-02-18 14:12:36 +00:00
proficnc 2165a8832b Reduce the risk of the buzzer affecting IMU's during the battery alarm 2017-02-02 07:47:10 +11:00
murata 3ce2ca488a AP_Notify: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
mirkix 2f8452b8a6 AP_Notify: Add BeagleBone Blue 2017-01-26 23:15:52 -08:00
Randy Mackay 0ce8cf3cf4 AP_Notify: remove ToshibaLED_PX4 2017-01-27 15:24:09 +09:00
Randy Mackay 98db17e9a1 AP_Notify: example sketch uses ToshibaLED_I2C driver 2017-01-27 15:24:09 +09:00
Randy Mackay d8ae56f455 AP_Notify: pixhawk and vrbrain use in-tree ToshibaLED 2017-01-27 15:24:09 +09:00
Randy Mackay eedfe13f9c AP_Notify: fix ToshibaLED_I2C and check both I2C buses
the rgb value was never being set meaning the led was always off
external bus is checked first
2017-01-27 15:24:09 +09:00
Randy Mackay 0e20c8040c AP_Notify: rgbled methods protected and add override
no functional change
2017-01-27 15:24:09 +09:00
Randy Mackay b5573f6665 AP_Notify: add PX4_V4 check to PixRacerLED 2017-01-27 11:01:17 +09:00
iseries1 4467a2cd16 AP_Notify: enable PixRacer onboard LED
Enable PixRacer onboard LED to show status of flight controller
2017-01-27 11:01:17 +09:00
Randy Mackay 8041a7f183 AP_Notify: add PixRacerLED 2017-01-27 11:01:17 +09:00
murata 315f7c6a9a AP_Notify: Represent the base of ASCII numeric code with letters. 2017-01-26 23:59:11 +01:00
Michael du Breuil 9346117c01 Notify: Update for GPS types 2017-01-25 03:34:26 +00:00
Randy Mackay 1300a9d3c6 AP_Notify: minor formatting fixes
no functional change
2017-01-23 15:07:21 -08:00
Randy Mackay 4691bc76f3 AP_Notify: display gets semaphore protecting display buffer 2017-01-23 15:07:21 -08:00
Randy Mackay 80c1433682 AP_Notify: Display backend methods become void
We never use the return value so might as well remove it
2017-01-23 15:07:21 -08:00
Randy Mackay cb1d1df03a AP_Notify: reorder flags
This tiny improvement allows the flags above battery voltage to be squeezed into the same byte
2017-01-23 15:07:20 -08:00
Randy Mackay e085ae1ec8 AP_Notify: add set_flight_mode_str method
This allows the vehicle code to set a short string for the flight mode
2017-01-23 15:07:20 -08:00
Randy Mackay acff67c718 AP_Notify: Display_SH1106 command stucture clarification
renaming the elements of the structure makes their purpose more clear
2017-01-23 15:07:20 -08:00
Randy Mackay fd365de5f8 AP_Notify: Display structures PACKED 2017-01-23 15:07:20 -08:00
Randy Mackay 843210cac2 AP_Notify: Display bus passed into contructor 2017-01-23 15:07:20 -08:00
Randy Mackay 682fc759f1 AP_Notify: minor formatting and comment changes
No functional change
2017-01-23 15:07:20 -08:00
Randy Mackay d12e0d6a82 AP_Notify: Display send_text made not static 2017-01-23 15:07:20 -08:00
Randy Mackay 07c08c09a3 AP_Notify: small change to Display health logic 2017-01-23 15:07:20 -08:00
Randy Mackay 847c68bf72 AP_Notify: remove comment 2017-01-23 15:07:20 -08:00
Randy Mackay 21a95a3b0a AP_Notify: Display screenpage variable made part of class 2017-01-23 15:07:20 -08:00
Randy Mackay c5ba54c3fe AP_Notify: adjust Display class structure
This makes the display architecture closer to our other frontend/backend splits
Added check that display is initialised successfully in hw_init
Renamed _update_timer to just _timer to make more consistent with other drivers
2017-01-23 15:07:20 -08:00
Randy Mackay 0690315814 AP_Notify: remove unused methods and member from Display 2017-01-23 15:07:20 -08:00
Randy Mackay f0c6fd3038 AP_Notify: resolve compiler warning in Display 2017-01-23 15:07:20 -08:00
Randy Mackay 9eb6d18d8e AP_Notify: add override to display methods 2017-01-23 15:07:20 -08:00