Commit Graph

30823 Commits

Author SHA1 Message Date
Andrew Tridgell
0ae3b39a66 AP_Scripting: implement tricks on a switch on top of trajectory tracking
this re-implements tricks on a switch with the new accurate trajectory
tracking code.

It adds new parameters:

 - TRIK_ENABLE=0/1
 - TRIK_COUNT for number of tricks
 - TRIK_ACT_FN for the rc option to use to activate tricks (default 300)
 - TRIK_SEL_FN for the rc option to use to select which trick (default 301)

So if you want to use a 3 position switch on RC7 to activate and use a
knob on RC8 for selection then you would set:

- RC7_OPTION = 300
- RC8_OPTION = 301

then if tricks are enabled the following parameters are created per trick:

 - TRIKn_ID
 - TRIKn_ARG1
 - TRIKn_ARG2
 - TRIKn_ARG3
 - TRIKn_ARG4

You can have a maximum of 11 tricks.

The ID numbers are from the trajectory table. The arguments are path specific.
2022-10-29 21:22:29 +11:00
Peter Barker
db2736c297 GCS_MAVLink: correct potential uint underflow in stream slowdown 2022-10-27 08:40:21 +11:00
Peter Barker
77abaef092 GCS_MAVLink: use AP_NOTIFY_MAVLINK_LED_CONTROL_SUPPORT_ENABLED 2022-10-26 21:22:39 +11:00
Peter Barker
c136257a3a AP_Notify: gate mavlink access on HAL_GCS_ENABLED
via AP_NOTIFY_MAVLINK_LED_CONTROL_SUPPORT_ENABLED
2022-10-26 21:22:39 +11:00
Peter Barker
eead037513 AP_BattMonitor: remove unneeded include of Notify 2022-10-26 21:22:39 +11:00
Peter Barker
9ca19c25a9 GCS_MAVLink: process mavlink play_tune in frontend 2022-10-26 21:22:39 +11:00
Peter Barker
f846f703e4 AP_Notify: process mavlink play_tune in frontend 2022-10-26 21:22:39 +11:00
Peter Barker
959982c053 AP_HAL_ChibiOS: rename parameter name BRD_SAFETYENABLE to BRD_SAFETY_DEFLT 2022-10-26 19:53:03 +11:00
Peter Barker
b4a42e61f3 AP_BoardConfig: rename parameter name BRD_SAFETYENABLE to BRD_SAFETY_DEFLT 2022-10-26 19:53:03 +11:00
Peter Barker
21d27d8988 AP_BoardConfig: correct description of safety switch 2022-10-26 19:53:03 +11:00
MatthewHampsey
51481eff24 AP_Scripting: Made negative radii steer in other direction for remaining trajs 2022-10-25 16:37:19 +11:00
MatthewHampsey
d011c8977f AP_Scripting: Fix humpty bump 2022-10-25 16:37:19 +11:00
Peter Barker
56c4794700 AP_Notify: use existing method for setting rgb and rate 2022-10-25 12:11:38 +11:00
Yuri
c474edc7b8 AP_Vehicle: enable HNTCH for Rover 2022-10-25 09:48:51 +09:00
Andrew Tridgell
eb1d27df7b AP_Scripting: adjust EFI_SkyPower for rev 0.3 protocol 2022-10-25 11:44:45 +11:00
Andrew Tridgell
78c7bcf132 AP_EFI: fixed units of exhaust gas temperature 2022-10-25 11:44:45 +11:00
Andrew Tridgell
aea9dea005 AP_Scripting: added CANDRV to HFE EFI driver and document 2022-10-25 11:44:45 +11:00
Andrew Tridgell
96852a8eb4 AP_Scripting: added throttle and generator control for EFI_SkyPower driver
and added documentation for the driver
2022-10-25 11:44:45 +11:00
Henry Wurzburg
0a33799216 AP_SerialManager: move multiple RC input error to pre-arm failure 2022-10-25 11:34:13 +11:00
Henry Wurzburg
8f67e9b69f AP_Arming: move multiple RC input error to pre-arm failure 2022-10-25 11:34:13 +11:00
Peter Barker
a269acf76f AP_AdvancedFailsafe: use heartbeat method
this block is identical to the heartbeat method, with the exception of the enabled check (which is made earlier in the function this code is being removed from)
2022-10-25 11:31:14 +11:00
Peter Barker
ad0df546a7 AP_AdvancedFailsafe: use fence singleton in afs check 2022-10-25 11:31:14 +11:00
Andy Piper
55aed98f81 AP_InertialSensor: ensure that hardware AAF and notch filter are enabled on 42605 and 42609 2022-10-25 11:06:02 +11:00
Iampete1
5382083452 SRV_Channel: pwm_from_angle: return trim for 0 high_out 2022-10-25 11:03:35 +11:00
Iampete1
623501d0d5 AP_Arming: allow scripting channels to be disabled 2022-10-25 11:02:21 +11:00
Henry Wurzburg
eee856b427 hwdef: limit to onboard BARO for low flash F4 boards 2022-10-25 10:33:24 +11:00
WillyZehnder
a7d5f8addc AP_Scripting: bindings: get_alt_frame included
bindings.desc + docs.lua: get_alt_frame included
2022-10-25 10:21:05 +11:00
Andy Piper
35b138afb1 AP_HAL_ChibiOS: correctly default SERIAL7 to RCIN and SERIAL5 to ESC telem on MatekH743-bdshot 2022-10-25 10:18:57 +11:00
Andy Piper
7702e2ea99 AP_HAL_ChibiOS: support 8 bi-directional dshot channels on MatekH743 2022-10-25 10:18:57 +11:00
Peter Barker
4f0d301edb GCS_MAVLink: move defaulting of HAL_HIGH_LATENCY2_ENABLED to minimize_features.inc 2022-10-25 10:10:44 +11:00
Peter Barker
6dba092c52 AP_HAL_ChibiOS: move defaulting of HAL_HIGH_LATENCY2_ENABLED to minimize_features.inc 2022-10-25 10:10:44 +11:00
Iampete1
5db30b75e7 AP_Scripting: logging: move to char buffer from lua buffer 2022-10-25 10:09:14 +11:00
Andrew Tridgell
1c868cac37 AP_Airspeed: add instance to hygrometer logging 2022-10-24 17:35:07 +11:00
alexklimaj
2ed679f0a8 AP_Baro: BMP390 2022-10-24 07:27:11 +11:00
alexklimaj
e5cd25ff98 hwdef: ARKV6X 2022-10-24 07:27:11 +11:00
MatthewHampsey
bdce9d5cb3 AP_Scripting: improved trajectory tracking
with thanks to Paul Riseborough for the algorithmic improvements
2022-10-23 18:11:15 +11:00
Andrew Tridgell
5def680fb9 AP_Scripting: fixed binding for nav_script_time 2022-10-23 18:11:15 +11:00
Andrew Tridgell
ce77be9599 AP_Vehicle: updated nav_script_time 2022-10-23 18:11:15 +11:00
Andrew Tridgell
f57935d406 AP_Scripting: update examples for new nav_script_time 2022-10-23 18:11:15 +11:00
Andrew Tridgell
41bc08e132 AP_Mission: save flash space when scripting not enabled 2022-10-23 12:14:14 +11:00
Andrew Tridgell
d832b41262 AP_Mission: auto-convert NAV_SCRIPT_TIME from old to new format
this mechanism can be used for other structures in the future
2022-10-23 12:14:14 +11:00
Andrew Tridgell
cafed85872 AP_Mission: fixed climb_rate in ATTITUDE_TIME
need to stay within 10 byte limit
2022-10-23 12:14:14 +11:00
Andrew Tridgell
cc39bd08be AP_Mission: use Float16_t for NAV_SCRIPT_TIME 2022-10-23 12:14:14 +11:00
Andrew Tridgell
4121cc464d AP_Common: added Float16_t type 2022-10-23 12:14:14 +11:00
Andrew Tridgell
92f25150f6 AP_NavEKF3: fixed getLLH alt for local origin height
this fixes a bug introduced in #21834

this fix in #21834 was correct for getPosD, but should not have been
applied to getLLH

this caused cruise mode in plane to descend/ascend by the difference
between the public and local origins on mode entry

fixes #21984
2022-10-23 11:23:48 +11:00
Andrew Tridgell
9fa3a433f5 Revert "AP_InertialSensor: disable temperature based fifo check on ICM20602"
This reverts commit 05f8e3c18d.

this leads to bad IMU data on ICM20602
2022-10-22 13:01:39 +11:00
Pierre Kancir
64774a2f92 GCS_MAVLink: fix always 0 division.
7/8 into array range bracket will be integral type, therefore 7/8 is reported as always 0.
2022-10-22 11:11:52 +11:00
Andrew Tridgell
b96677c70d AP_Arming: use baro arming checks call 2022-10-22 08:15:36 +11:00
Andrew Tridgell
13893d3ed5 AP_Baro: added option to treat MS5611 as MS5607
and add arming check for pressure altitude error
2022-10-22 08:15:36 +11:00
Andrew Tridgell
bb1b2dafae AP_InternalError: only panic in SITL if debug enabled
a user recently had a flow of control panic in quadplane in
cygwin/missionplanner SITL. The panic this caused means we don't get
logging information on what line of code was triggered

the panic in SITL for internal errors is only useful if you have debug
information and can then attach a debugger. Without debug information
it is much better to behave the same as a real vehicle and report an
internal error (with line number)
2022-10-21 22:14:39 +11:00