Commit Graph

174 Commits

Author SHA1 Message Date
Pierre Kancir f84433e5ba AP_UAVCAN: change isnanf for isnan 2023-02-27 04:15:24 -08:00
Peter Barker 4a44b6af86 AP_UAVCAN: AP_Compass_UAVCAN may not be enabled 2023-02-22 19:40:13 +11:00
Tom Pittenger bc555c9082 AP_UAVCAN: add Volz servo feedback handling 2023-02-14 08:13:54 -08:00
Peter Barker 1d57ada441 AP_UAVAN: pass error_count from ESC Status packet to AP_ESC_Telem 2023-02-07 10:39:16 +11:00
Peter Barker 6cdbc95d9d AP_UAVCAN: tidy includes of SRV_Channel.h 2023-01-25 22:30:55 +11:00
rishabsingh3003 650f0ff659 AP_UAVCAN: Add proximity support 2022-12-15 07:20:05 +11:00
Andrew Tridgell 50d00f4e45 AP_UAVCAN: log bus statistics 2022-12-13 16:56:57 +11:00
Iampete1 2c847b1061 AP_UAVCAN: update options bitmask for PWM option 2022-11-23 19:47:50 +11:00
Peter Barker c06d0cda30 AP_UAVCAN: correct compilation with EFI dronecan not compiled in 2022-10-11 10:50:13 +11:00
jackhong12 4a4f361a17 all: use CLASS_NO_COPY() macro 2022-10-04 11:23:04 +11:00
Andrew Tridgell bf89a39621 AP_UAVCAN: removed the old DroneCAN Fix message
only send/process Fix2 message, saving bus bandwidth and flash space
2022-09-28 17:27:32 +10:00
Andy Piper 5b7f1779c6 AP_UAVCAN: only apply ESC telemetry updates that are valid 2022-09-20 09:45:03 +10:00
Andrew Tridgell 0d082043ba AP_UAVCAN: support sending pulses as PWM for DroneCAN actuators 2022-09-13 16:23:44 +10:00
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