Commit Graph

56 Commits

Author SHA1 Message Date
Andrew Tridgell
bf5555ccd3 AP_DroneCAN: actuator status is measured, not commanded 2024-12-03 07:38:17 +11:00
Iampete1
d5c29735d6 AP_DroneCAN: send incomming servo telem data to new AP_Servo_Telem lib 2024-12-03 07:38:17 +11:00
Thomas Watson
5874337df7 AP_DroneCAN: optimize DroneCAN subscription process
* remove unnecessary nullptr check, these are always called from an
  initialized AP_DroneCAN so if it's nullptr something has gone
  horrifically wrong

* pass in driver index instead of repeatedly calling function to get it

* simplify error handling; knowing exactly which allocation failed is not
  super helpful and one failing likely means subsequent ones will too,
  as it can only fail due to being out of memory
2024-11-18 10:30:29 +11:00
Thomas Watson
7ca558f625 AP_DroneCAN: use 32 bit timeout for write_aux_frame
Saves a handful of bytes. 71 minutes ought to be enough for anybody!
2024-11-17 10:38:12 +11:00
Andrew Tridgell
03de099452 AP_DroneCAN: support FlexDebug message 2024-11-05 17:03:23 +09:00
Andrew Tridgell
996b36531b AP_DroneCAN: force DroneCAN zero throttle when disarmed
if a user has set CAN_D1_UC_ESC_RV which is the mask of ESCs that are
reversible we were sending -8191 when disarmed, which is full reverse
throttle. This is the correct output when armed as it is treated as
full reverse at "PWM" 1000 and stopped at 1500, but when disarmed we
should always send zero or the user may find all ESCs spin up at full
reverse when disarmed if the ESC supports reverse throttle (which is
rare in DroneCAN ESCs)
2024-10-15 11:51:10 +11:00
Andrew Tridgell
9dc7dc32c8 AP_DroneCAN: prevent saturation of CPU with DroneCAN thread 2024-09-27 11:06:20 +10:00
Bob Long
8e707ef4e2 AP_DroneCAN: prevent invalid numbers spinning ESCs
This prevents bugs and misconfigurations from causing DroneCAN ESCs to
spin at full speed while the vehicle is disarmed.
2024-09-17 09:18:36 +10:00
Iampete1
5453f3a0cc AP_DroneCAN: register handle_actuator_status_Volz callback and fix logging 2024-08-27 11:18:18 +10:00
Iampete1
8ec3d0f0a9 AP_DroneCAN: populate ESC power percentage 2024-08-07 11:23:35 +01:00
Pradeep CK
c7216c05b8 AP_DroneCAN: addition of ESC extended status message
- Conditional compilation definition : AP_EXTENDED_ESC_TELEM_ENABLE
 - ESCX log structure
 - Update functionalities for ESCX status message
 - ESCX DroneCAN callback
2024-08-06 10:57:36 +10:00
Thomas Watson
a9317b1a07 AP_DroneCAN: correct and validate allowed NODE range
Node IDs >= 128 don't exist, and IDs 126 and 127 are "reserved for
network maintenance tools" according to the spec.
2024-07-30 09:49:43 +10:00
Andrew Tridgell
ed8926361f AP_DroneCAN: use NEW_NOTHROW for new(std::nothrow) 2024-06-04 09:20:21 +10:00
Iampete1
982cc3a00f AP_DroneCAN: call RPM subscribe 2024-05-02 20:25:38 +10:00
Andrew Tridgell
ed27e30f9e AP_DroneCAN: map DroneCAN debug levels to MAV_SEVERITY levels 2024-02-22 15:03:01 +11:00
Iampete1
5fd3be1b75 AP_DroneCAN: add subscribe msgs for TemperatureSensor 2024-01-30 10:13:35 +11:00
Peter Barker
dd4d017717 AP_DroneCAN: allow compilation with HAL_LOGGING_ENABLED false 2024-01-17 18:25:55 +11:00
Iampete1
c8a63a1de4 AP_DroneCAN: remove duplicate rgb_led set_timeout_ms and set_priority 2024-01-10 18:29:24 +11:00
Iampete1
69e076605e AP_DroneCAN: support streaming relay hardpoint command 2024-01-10 18:29:24 +11:00
Andrew Tridgell
ad59f6db01 AP_DroneCAN: support an aux 11 bit protocol with DroneCAN 2023-11-28 11:38:16 +11:00
Andrew Tridgell
a725d8b90c AP_DroneCAN: support CAN serial ports
this allows any serial protocol to be mapped to a remote DroneCAN node
2023-11-22 17:19:12 +11:00
Andrew Tridgell
713745ed28 AP_DroneCAN: don't update hobbywing ESC table while armed
some hobbywing ESCs have a bug where requesting the ID table can cause
the ESC to stutter
2023-11-17 16:21:58 +11:00
Mykhailo Kuznietsov
e3d9ce3fd0 AP_DroneCAN: Fix some typos
Fixed some typos found in the code.
2023-10-12 18:30:42 +11:00
Andrew Tridgell
3ba12d16db AP_DroneCAN: fixed sim on hw build
tested using:

Tools/scripts/sitl-on-hardware/sitl-on-hw.py --board Pixhawk6C --vehicle plane --simclass Plane --frame plane
2023-10-12 18:29:32 +11:00
Randy Mackay
1f11d5f3fc AP_DroneCAN: support string parameters 2023-09-19 10:58:52 +10:00
Andrew Tridgell
b33cf11bfb AP_DroneCAN: make himark servo support optional 2023-09-07 08:44:54 +10:00
Peter Barker
e7def98195 AP_DroneCAN: use correct define for DroneCAN GPS drivers 2023-09-03 08:43:03 +10:00
Andrew Tridgell
232509ad7a AP_DroneCAN: removed native_millis/micros 2023-08-24 13:06:40 +10:00
Fred Kummer
7c6551af9b AP_DroneCAN: allow sending negative RawCommands to ESCs 2023-08-19 20:27:58 +10:00
Peter Barker
1e8d256bc2 AP_DroneCAN: add support for DroneCAN RCInput packets 2023-08-19 20:27:24 +10:00
Randy Mackay
ee07d6bec8 AP_DroneCAN: get/set param timeout after 0.1 sec 2023-08-09 18:10:35 +10:00
Randy Mackay
6fe31396d9 AP_DroneCAN: improve get/set param comments 2023-08-09 18:10:35 +10:00
bugobliterator
34494bb7d1 AP_DroneCAN: pass all the variables to AP_DroneCAN_DNA_Server by value
we were using the values by the AP_DroneCAN object, but the members might
not have been initialised if they are out of order
2023-07-29 08:27:27 +09:00
bugobliterator
a0e541893c AP_DroneCAN: add support for sending CAN and Protocol Stats 2023-07-10 12:56:37 +10:00
Tom Pittenger
461671eaf3 AP_DroneCAN: add NotifyState.landing & taking off 2023-07-03 22:44:00 -07:00
Andrew Tridgell
9a68b78973 AP_DroneCAN: allow BRD_SAFETY_MASK to work on CAN ESCs and servos
this allows for testing of a fwd motor or control surfaces while not
allowing for VTOL ESCs to run. This makes CAN actuators behave the
same as direct PWM actuators
2023-07-04 10:40:45 +10:00
Randy Mackay
b975310fda AP_DroneCAN: add xacti gimbal support 2023-06-27 21:12:20 +10:00
Andrew Tridgell
93c1674e1f AP_DroneCAN: set priority and timeout for RGB LEDs 2023-06-24 20:48:08 +10:00
bugobliterator
efe5fb7e69 AP_DroneCAN: push ESC data out immediately and ensure high priority 2023-05-31 17:31:09 +10:00
Tom Pittenger
f38041567f AP_DroneCAN: remove unused defines 2023-05-31 17:31:09 +10:00
bugobliterator
a277547248 AP_DroneCAN: move dronecan led, buzzer and rtcm stream to their respective drivers 2023-05-31 17:31:09 +10:00
Andrew Tridgell
419a75f0b7 AP_DroneCAN: support hobbywing DroneCAN ESCs
these use different messages from other DroneCAN ESCs
2023-05-23 20:26:11 +10:00
Andrew Tridgell
29715e2a74 AP_DroneCAN: support Himark servo protocol 2023-05-09 09:40:53 +10:00
Peter Barker
80752af077 AP_DroneCAN: move and rename CAN Driver_Type enumeration 2023-04-20 08:53:46 +10:00
bugobliterator
b1c4cf9923 AP_DroneCAN: fix DroneCAN run for SITL 2023-04-19 17:26:57 +10:00
Andrew Tridgell
42192b2800 AP_DroneCAN: cope with 16 bit limit on event timeout
use a smaller process() time while waiting for node startup
2023-04-19 17:26:57 +10:00
Iampete1
4186edad3f AP_DroneCAN: move to hal.util->snprintf to keep g++ 7.5.0 happy 2023-04-18 17:44:29 +01:00
Andrew Tridgell
6fbd8df95b AP_DroneCAN: fixed Volz feedback build 2023-04-13 10:36:47 -07:00
Andrew Tridgell
e811cf86eb AP_DroneCAN: text messages and more defines 2023-04-11 10:31:31 +10:00
Andrew Tridgell
3129cae875 AP_DroneCAN: cleanup more defines and classes 2023-04-11 10:31:31 +10:00