Commit Graph

161 Commits

Author SHA1 Message Date
Andrew Tridgell 9ce11159b0 AP_UAVCAN: support OpenDroneID 2022-08-09 14:37:08 +10:00
bugobliterator 4852ac332d AP_UAVCAN: add option bit for disabling Node Unhealthy check 2022-07-27 18:18:03 +10:00
bugobliterator 48f1e18161 AP_UAVCAN: add node healthy check 2022-07-27 18:18:03 +10:00
bugobliterator 34583d750d AP_UAVCAN: include AP_CANManager header 2022-07-27 18:18:03 +10:00
bugobliterator 7ff0af7a0d AP_UAVCAN: add support for dna_server instance per driver 2022-07-27 18:18:03 +10:00
Peter Barker 05131853d8 AP_UAVCAN: allow rangefinder backends to be individually compiled in 2022-06-21 09:15:20 +10:00
Andrew Tridgell 465dbd89f4 AP_UAVCAN: support DroneCAN EFI 2022-06-09 21:10:37 +10:00
Andrew Tridgell 540dcc554f AP_UAVCAN: added a check for memory corruption in the pool 2022-06-05 16:03:35 +10:00
Andrew Tridgell 541de85354 AP_UAVCAN: added dynamically allocated pool size param
allow for smaller pool size to save memory
2022-06-05 16:03:35 +10:00
Peter Barker 8cd0922f01 AP_UAVCAN: allow baro backends to be individually compiled out 2022-05-22 12:11:45 +10:00
Andrew Tridgell cc06327526 AP_UAVCAN: allow CAN output for function==0 and allow for 32 CAN servos 2022-05-22 12:07:37 +10:00
Iampete1 d1e45c93d6 AP_UAVCAN: update ESC_BM and SRV_BM Bitmask 2022-05-22 12:07:37 +10:00
Andrew Tridgell 8106291bfe AP_UAVCAN: added CAN_Dx_UC_ESC_OF parameter
this allows for an offset in ESC numbering for much more efficient CAN
bandwidth usage.

For example, on a coaxial OctoQuad quadplane the ESCs are typically
setup as outputs 5 to 12. An ideal setup is to split these over 2 CAN
buses, with one CAN bus for the top layer and the one bus for the
bottom layer (allowing for VTOL flight with one bus failed).

Without this offset parameter you would be sending RawCommand messages
like this:

bus1: [ 0, 0, 0, 0, ESC1, ESC2, ESC3, ESC4 ]
bus2: [ 0, 0, 0, 0, 0, 0, 0, 0, ESC1, ESC2, ESC3, ESC4 ]

this is very wasteful of bus bandwidth, with bus1 using 3x the
bandwidth it should and bus2 using 4x the bandwidth it should (the
above will take 3 can frames for bus1, and 4 can frames for bus 2)

With this patch you can set:

CAN_D1_UC_ESC_OF = 4
CAN_D2_UC_ESC_OF = 8

and you will get this on the bus:

bus1: [ ESC1, ESC2, ESC3, ESC4 ]
bus2: [ ESC1, ESC2, ESC3, ESC4 ]

that takes just 1 can frame per send on each bus
2022-05-18 21:23:30 +10:00
Peter Barker 7799d8bff5 AP_UAVCAN: allow backends to be compiled out 2022-05-10 09:02:51 +10:00
Peter Barker e490a5b5cd AP_UAVCAN: tidy includes 2022-05-03 09:14:58 +10:00
pacolate12 0d256da3b5 AP_UAVCAN: correct array inxexing
Allows the code to be run on hardware
2022-03-20 07:32:33 -07:00
bugobliterator 5865680070 AP_UAVCAN: move pool allocator to cpp 2022-03-11 18:13:54 +11:00
bugobliterator 3569435531 AP_UAVCAN: ensure that we publish allocation messages in STD CAN format 2022-03-11 18:13:54 +11:00
Siddharth Purohit ef1bdc2e5f AP_UAVCAN: add support for optionally publishing CANFD frames 2022-03-11 18:13:54 +11:00
Henry Wurzburg 14c9d4e6a3 AP_UAVCAN: add metadata to GetNodeInfo log message 2022-02-14 13:38:07 +11:00
Andrew Tridgell 55f21f367b AP_UAVCAN: disable CAN filtering except on AP_Periph
this saves flash space and makes CAN forwarding for any bus without
reconfigure/reboot easy. CAN filtering is not useful in the main
flight controller firmware as we want to see nearly all packets
2022-02-12 16:36:05 +11:00
Peter Barker 7db723981c AP_UAVCAN: make C_TO_KELVIN a function macro; create KELVIN_TO_C
These are in celsius
2022-01-13 18:31:46 +11:00
Peter Barker a741499cff AP_UAVCAN: create and use AP_OPTICALFLOW_ENABLED
Including a define for each backend.
2021-12-29 18:12:03 +11:00
Jaaaky 3008a480d5 AP_UAVCAN: Fix multi #include's 2021-12-21 10:38:46 +11:00
Andrew Tridgell 9e5fcb4ced AP_UAVCAN: removed old vendor DSDL and add README.md
this DSDL is in https://github.com/DroneCAN/DSDL now
2021-12-06 20:17:02 +11:00
Andrew Tridgell 5afe055a46 AP_UAVCAN: use soft armed state for DroneCAN ARMING_STATUS
this fixes motortest on quadplanes, so that ESCs see an armed state
during the test
2021-12-06 20:16:23 +11:00
Pierre Kancir 4037104f59 AP_UAVCAN: hide -Wcast-function-type warning on GCC11 2021-11-13 17:28:30 +11:00
李孟晓 36ceb76cae AP_UAVCAN: Add battery ID field 2021-10-13 18:44:05 +11:00
bugobliterator 2673cde52b AP_UAVCAN: add dsdl for sending vehicle notify state 2021-09-30 08:52:27 +10:00
bugobliterator e4c6c0ad17 AP_UAVCAN:add support for sending Vehicle Notify state 2021-09-30 08:52:27 +10:00
bugobliterator fd369e8262 AP_UAVCAN: throw allocation error when failing to allocate 2021-09-30 08:51:26 +10:00
bugobliterator b897f984a7 AP_UAVCAN: use config error instead of panic on allocation failure 2021-09-30 08:51:26 +10:00
Andrew Tridgell 63fcb804b3 AP_UAVCAN: added CAN_Dn_UC_OPTION parameter
this allows for 2 ways of controlling conflicts in the UAVCAN DNA
database. The first is to set CAN_Dn_UC_OPTION to 1, which resets the
DNA database, thus clearing any node conflicts.

The second is to set CAN_Dn_UC_OPTION to 2, which ignores node
conflicts in the DNA database

These options are useful for vehicles with UAVCAN smart batteries
where the node ID is fixed but the hwid changes and you want to do
battery swapping (possibly without rebooting)
2021-09-17 12:32:59 +10:00
Josh Henderson b1028035bc AP_UAVCAN: cleanup comments in BatteryInfoAux dsdl message 2021-08-31 10:30:28 +10:00
bugobliterator e8c4b99a99 AP_UAVCAN: add support for setting parameters on CAN nodes 2021-08-19 14:20:58 +10:00
bugobliterator ddc82f7619 AP_UAVCAN: add messages for doing MovingBaseline Heading over UAVCAN 2021-08-19 14:20:58 +10:00
Andrew Tridgell cb462cac6e AP_UAVCAN: fixed printf format errors 2021-08-05 09:43:35 +10:00
Siddharth Purohit 0217d1c3dc AP_UAVCAN: add BatteryInfoAux dsdl message 2021-07-08 11:56:06 +10:00
Siddharth Purohit 9494a439ec AP_UAVCAN: Use HAL_ENABLE_LIBUAVCAN_DRIVERS instead of HAL_MAX_CAN_PROTOCOL_DRIVERS 2021-06-24 09:02:42 +10:00
Dr.-Ing. Amilcar do Carmo Lucas ff200e9d11 AP_UAVCAN: fix compilation when HAL_WITH_ESC_TELEM == 0 2021-06-09 21:42:51 +10:00
Tom Pittenger c807035e02 AP_UAVCAN: use HAL_ENABLE_LIBUAVCAN_DRIVERS instead of HAL_MAX_CAN_PROTOCOL_DRIVERS 2021-06-09 18:36:18 +10:00
Peter Barker 42b1a0998f AP_UAVCAN: move from HAL_NO_LOGGING to HAL_LOGGING_ENABLED 2021-05-19 17:38:47 +10:00
Andy Piper f513b1d1c2 AP_UAVCAN: add esc telemetry updates
remove send_esc_telemetry_mavlink()
remove datastructures and semaphore obsoleted by AP_ESC_Telem* (<amilcar.lucas@iav.de>)
record volts, amps and consumption as floats
2021-05-12 17:01:11 +10:00
Michael du Breuil e47857a278 AP_UAVCAN: Add ardupilot.gnss.Status 2021-03-12 09:39:55 +11:00
Patrick José Pereira 9904b397d8 AP_UAVCAN: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Michael du Breuil 05b9aa2fa2 AP_UAVCAN: Broadcast ArmingStatus regularly 2021-02-02 10:57:57 +11:00
Michael Oborne 5ef3e1bec3 UAVCAN: add dsdl for gps heading 2021-01-07 15:56:28 +11:00
Andy Piper 40090dcce9 AP_UAVCAN: compile fix for debug/assertions 2021-01-03 08:57:13 +11:00
Andrew Tridgell a4517032c5 AP_UAVCAN: log all UAVCAN devices in CAND log message 2021-01-01 17:30:14 +11:00
Andrew Tridgell 88b5523d47 AP_UAVCAN: added logging of UAVCAN LogMessage messages
this allows us to log internal errors from nodes into main flight
controller log
2020-12-01 11:14:50 +11:00