Compare commits
421 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
3e039eb372 | ||
|
d23247b901 | ||
|
16b7838229 | ||
|
65bcfb6b27 | ||
|
aa330b436f | ||
|
6a1c6b370a | ||
|
636a285216 | ||
|
e443bde8fc | ||
|
788d5fd1a5 | ||
|
bb9f20c9c5 | ||
|
8a1fc6d507 | ||
|
d10e6174bc | ||
|
58ef9b3755 | ||
|
5c68af36f9 | ||
|
a96c9efe93 | ||
|
d6666caa29 | ||
|
610b7135bd | ||
|
378d586feb | ||
|
586e8f756f | ||
|
a333587b58 | ||
|
2750bda430 | ||
|
7d5b86958b | ||
|
a4b543e4ea | ||
|
204a993963 | ||
|
df7c432c2e | ||
|
f398756ffe | ||
|
0f18844c7a | ||
|
6e124fda8f | ||
|
bc61e2ab61 | ||
|
b4b58a90a1 | ||
|
218ba75bbb | ||
|
fa6a7abe8a | ||
|
926896eb3a | ||
|
3748192173 | ||
|
f9fac9093f | ||
|
e6aa357fb4 | ||
|
cc115a661f | ||
|
b6d607c2b0 | ||
|
9fab634f7a | ||
|
e2ccb1d49c | ||
|
df1d9e0e7a | ||
|
d4f8bc2ba3 | ||
|
dd1ecec79c | ||
|
0faadb11b6 | ||
|
d3b7dd24e7 | ||
|
b5467ca03f | ||
|
b1219f5bef | ||
|
d4f62e30b2 | ||
|
8305ba6009 | ||
|
db5515c60e | ||
|
936e0ab1be | ||
|
3e19cf19b8 | ||
|
26a3388f22 | ||
|
8060b9a445 | ||
|
061c188342 | ||
|
fb50240723 | ||
|
8b5dd7bee4 | ||
|
c48fc52e89 | ||
|
22d059f354 | ||
|
8fd36cb5e7 | ||
|
8b3554c591 | ||
|
6797625bc6 | ||
|
f24ee8f800 | ||
|
0852044e9e | ||
|
ae0fada9e6 | ||
|
f7767d9068 | ||
|
a89c2cda6e | ||
|
763bbc509e | ||
|
8242a10e44 | ||
|
14093ab2a0 | ||
|
1f1c0714df | ||
|
829fcf5f33 | ||
|
6a97817fa6 | ||
|
36dabc0985 | ||
|
4bc82e4b3e | ||
|
2ab583d80b | ||
|
0bbea732a0 | ||
|
def89ea600 | ||
|
f56ce445b1 | ||
|
f307f3c26f | ||
|
810b1e300d | ||
|
8aa0efb962 | ||
|
dadffef92c | ||
|
cf6fe59a7a | ||
|
38b1c526b4 | ||
|
65ef005ea5 | ||
|
5384ab3b3b | ||
|
ddfa4c0ed7 | ||
|
993ca4665d | ||
|
47c367da92 | ||
|
cf0dc14e31 | ||
|
a4ba1c7ec1 | ||
|
f1cc021b1c | ||
|
f2d9e3aa5b | ||
|
1280e469f1 | ||
|
0b7552e6f8 | ||
|
799ccb32e2 | ||
|
26b6a1b7b8 | ||
|
3a5b99f0d4 | ||
|
6a17a605d4 | ||
|
bfc9b6e389 | ||
|
9b44444a28 | ||
|
fcd00f65e9 | ||
|
2b211dcfaf | ||
|
99491d2436 | ||
|
a98678a0f9 | ||
|
4f44760912 | ||
|
c37557736c | ||
|
c2f384ec48 | ||
|
c6c4a3d355 | ||
|
f95e16bca6 | ||
|
54db689b0f | ||
|
47908cb185 | ||
|
e36ab2e51b | ||
|
88f4e4e33f | ||
|
72809eea03 | ||
|
f5568d7ce5 | ||
|
962c2c35cf | ||
|
bfbae2d8e6 | ||
|
371ebe8afc | ||
|
c2ca9d6ea1 | ||
|
9b30602515 | ||
|
06c2c02dc0 | ||
|
3b7352d3a7 | ||
|
c75fba3d21 | ||
|
3bc082211b | ||
|
53bf4e9e8e | ||
|
5a860009bb | ||
|
1dcb31eb6e | ||
|
ee5b529ed2 | ||
|
bcd5da1780 | ||
|
421e535ffa | ||
|
5fdc7d9326 | ||
|
29c204c0bc | ||
|
d179103c67 | ||
|
1124b05fc8 | ||
|
ad04fadf2d | ||
|
01cd698947 | ||
|
cd6ad72cdb | ||
|
de35407713 | ||
|
ddd2b7dab0 | ||
|
cf997df79f | ||
|
1a7a6b6dd9 | ||
|
b05919ea88 | ||
|
276578c509 | ||
|
ce1eff398c | ||
|
00c119c643 | ||
|
cb6b45e30c | ||
|
4ccbfb1fad | ||
|
8708b1c67a | ||
|
2da8f95492 | ||
|
d44f77be8c | ||
|
b3b35857fd | ||
|
6754bdefe7 | ||
|
90730e952f | ||
|
3e2ce0da52 | ||
|
df3ee3086a | ||
|
3caa6400e1 | ||
|
bcebac9132 | ||
|
a594aa9330 | ||
|
3fe0a2bd92 | ||
|
2b1a195293 | ||
|
56986b4cad | ||
|
d45d868701 | ||
|
f2e8032f17 | ||
|
1766c0e384 | ||
|
d4c2cb2097 | ||
|
9954edd4da | ||
|
dde422717e | ||
|
0eb4afaeec | ||
|
ee10f447e0 | ||
|
481955f067 | ||
|
4418ccc4a9 | ||
|
d923ca6ec2 | ||
|
e615034c83 | ||
|
321e82c451 | ||
|
47615b14cc | ||
|
6487c46562 | ||
|
99b73ee695 | ||
|
6fd0157913 | ||
|
765d632995 | ||
|
76f494cb50 | ||
|
3315e637f6 | ||
|
42dec26a4a | ||
|
912309b682 | ||
|
d5c5a86ff9 | ||
|
6e3279bdf9 | ||
|
3e97d55f7c | ||
|
5a980e04a8 | ||
|
e3dc563a85 | ||
|
46576685b7 | ||
|
47405af84d | ||
|
87a405152f | ||
|
ee0f3c5f51 | ||
|
b7eef68974 | ||
|
2c5d160c67 | ||
|
096c5ebf57 | ||
|
8ec7c4e9fd | ||
|
a2e804b81c | ||
|
2e571d6483 | ||
|
bc4c7605a5 | ||
|
76b328a4ae | ||
|
f51f5e81f3 | ||
|
6503324081 | ||
|
0e85a4041f | ||
|
e054c82f11 | ||
|
91b43c5115 | ||
|
e23b615b85 | ||
|
4c2d3f34e0 | ||
|
8a5867e3d9 | ||
|
1897411b9d | ||
|
a8df3d9b6f | ||
|
21db41f5b8 | ||
|
49cb017ca5 | ||
|
710b94a885 | ||
|
7b3c2d299b | ||
|
1b02da05a7 | ||
|
4b734ddc93 | ||
|
1369afd229 | ||
|
9db275caa6 | ||
|
dc0eaac0da | ||
|
cdee8e5a88 | ||
|
452527cb4c | ||
|
4039e1bc22 | ||
|
cfe64421f1 | ||
|
42332559a8 | ||
|
9c43cde3d5 | ||
|
f7a9eb37b1 | ||
|
49e9cac9c0 | ||
|
0f46cd7a34 | ||
|
306519767f | ||
|
41dabdbf76 | ||
|
c024c58486 | ||
|
a7dff69f8f | ||
|
38c586712b | ||
|
9535af19e3 | ||
|
a5f71c4f7c | ||
|
06398a9a1d | ||
|
d9a782b4b8 | ||
|
2376eb95dd | ||
|
41a97efcb3 | ||
|
fa817c1d32 | ||
|
35513ba539 | ||
|
eaa2ce17de | ||
|
2f847c9129 | ||
|
873290de1b | ||
|
a0b9b4ebd0 | ||
|
049cb93cad | ||
|
66814c57ef | ||
|
4b7e1db3e4 | ||
|
bd8af22ef9 | ||
|
da4ad1063a | ||
|
cdd2124353 | ||
|
97fa94ef6e | ||
|
ec73566503 | ||
|
aa00e16cdd | ||
|
95526881ad | ||
|
d4596e39f5 | ||
|
c746714eaa | ||
|
2beb6f8fd0 | ||
|
202f443cb5 | ||
|
12268609b1 | ||
|
dc9e1a2bc3 | ||
|
b93bc2767f | ||
|
c36b6c1c0b | ||
|
4df27dbedb | ||
|
7f9b9eb344 | ||
|
787d03c1a3 | ||
|
cc19359c33 | ||
|
0c7eb9f814 | ||
|
0249abb099 | ||
|
a67b6c7837 | ||
|
17ce04daba | ||
|
b1cdc81feb | ||
|
6adc713496 | ||
|
707b50d1cc | ||
|
d81d4640ee | ||
|
a121f665f1 | ||
|
a564af680b | ||
|
4957173f45 | ||
|
24ec48d1e3 | ||
|
799833fdaa | ||
|
166b3e902e | ||
|
2476594d1f | ||
|
ff6c1e009e | ||
|
9501b61729 | ||
|
9090bb17a5 | ||
|
2aec5ccd7b | ||
|
dc7efab45f | ||
|
678b81563d | ||
|
488b6a92b5 | ||
|
f45f0d09e1 | ||
|
cb430470cf | ||
|
07ec058155 | ||
|
b1c7614bf9 | ||
|
6921c7138b | ||
|
bed8a9de27 | ||
|
25ccd609d7 | ||
|
49c3d4e049 | ||
|
b3837ee911 | ||
|
f7e657f6c5 | ||
|
86b6785fca | ||
|
5e657c4e7f | ||
|
38a26f26a7 | ||
|
f32e2c9ddb | ||
|
a75ee432c8 | ||
|
a357d14f4b | ||
|
3df9e40ebc | ||
|
5a214efcaa | ||
|
3f3ba237fb | ||
|
9e19e12040 | ||
|
4d7cce1b36 | ||
|
f4a59b3a7e | ||
|
94a3f2aff2 | ||
|
ec79c3ffae | ||
|
113ed38f82 | ||
|
8b825b4ea7 | ||
|
96681b03aa | ||
|
3a34cf4562 | ||
|
72b525cff6 | ||
|
a8f6464121 | ||
|
f917554c4a | ||
|
602f7d1336 | ||
|
ad1055e9ea | ||
|
abac633fe0 | ||
|
5422ed01f2 | ||
|
3f81bc482b | ||
|
0f287073a6 | ||
|
e52075b861 | ||
|
ddc8b492de | ||
|
375a209a9b | ||
|
8c173a9d9a | ||
|
b38a334056 | ||
|
d0a7c3cf95 | ||
|
a3d6bcc5da | ||
|
823e7c53b5 | ||
|
f7ee365907 | ||
|
538a0ef966 | ||
|
edc5e598f8 | ||
|
890f9878ec | ||
|
2764305f8e | ||
|
adee71fe22 | ||
|
de7e388ed4 | ||
|
2e6a16907b | ||
|
58d03f01ec | ||
|
87b47d5ea1 | ||
|
8e32c1645e | ||
|
d669a2b079 | ||
|
5178ac92bc | ||
|
641ab1b7d5 | ||
|
6b8dfcdeac | ||
|
fe0268b2b8 | ||
|
c161875659 | ||
|
b8b2bfafdf | ||
|
0aa51a6ed3 | ||
|
cc9ca6f013 | ||
|
443fbb7666 | ||
|
147abc67ab | ||
|
c1943261ad | ||
|
d5c6d1c8a8 | ||
|
328354999b | ||
|
388c4738dc | ||
|
d04a301e9a | ||
|
f00f1af1d1 | ||
|
61b276995b | ||
|
91e8099c34 | ||
|
57d47e080b | ||
|
0553d06c14 | ||
|
b2be3c1dbc | ||
|
cc84fd1859 | ||
|
595be4d04d | ||
|
3d2fb949e0 | ||
|
1428557140 | ||
|
eff26c0bb8 | ||
|
d9237518f3 | ||
|
129129b4ae | ||
|
e364f7f491 | ||
|
d8a2eb5a87 | ||
|
ac4e14fbb9 | ||
|
66cf54ba4e | ||
|
6fe6fb2317 | ||
|
43a4ae4a8e | ||
|
bb5cd4f475 | ||
|
bbe79b3c18 | ||
|
d9c9875768 | ||
|
030b1c855f | ||
|
a39357fe29 | ||
|
313e8e39b6 | ||
|
5328e70b50 | ||
|
ee44de4d9a | ||
|
884e57e601 | ||
|
6993a126d6 | ||
|
07aa7b543e | ||
|
66eb8ba5bf | ||
|
bfbfc81720 | ||
|
cec42abc66 | ||
|
7dc3ac8051 | ||
|
33e98cfe13 | ||
|
9929c2030c | ||
|
d703a2d984 | ||
|
df2f8366c5 | ||
|
dfd6e6d8ac | ||
|
44950fd18e | ||
|
c40267644a | ||
|
8d9c624632 | ||
|
25c04c1fa2 | ||
|
a079b570d5 | ||
|
3432bd0580 | ||
|
72d923378d | ||
|
74bf7754a3 | ||
|
ab4d2e1119 | ||
|
c522b0ad5c | ||
|
673bf619e5 | ||
|
3e83d40bd8 | ||
|
aabfce2099 | ||
|
7527c6e278 | ||
|
c55a2916f6 | ||
|
b9e9d4cc4f | ||
|
f88db74356 | ||
|
6eaa05960f | ||
|
7df64eb330 |
2
.github/workflows/cygwin_build.yml
vendored
2
.github/workflows/cygwin_build.yml
vendored
@ -55,7 +55,7 @@ jobs:
|
||||
shell: C:\cygwin\bin\bash.exe -eo pipefail '{0}'
|
||||
run: >-
|
||||
ln -sf /usr/bin/python3.7 /usr/bin/python && ln -sf /usr/bin/pip3.7 /usr/bin/pip &&
|
||||
python -m pip install --progress-bar off empy pexpect &&
|
||||
python -m pip install --progress-bar off empy==3.3.4 pexpect &&
|
||||
python -m pip install --progress-bar off dronecan --upgrade &&
|
||||
cp /usr/bin/ccache /usr/local/bin/ &&
|
||||
cd /usr/local/bin && ln -s ccache /usr/local/bin/gcc &&
|
||||
|
2
.github/workflows/esp32_build.yml
vendored
2
.github/workflows/esp32_build.yml
vendored
@ -62,7 +62,7 @@ jobs:
|
||||
./install.sh
|
||||
source ./export.sh
|
||||
cd ../..
|
||||
python -m pip install --progress-bar off future lxml pymavlink MAVProxy pexpect flake8 geocoder empy dronecan
|
||||
python -m pip install --progress-bar off future lxml pymavlink MAVProxy pexpect flake8 geocoder empy==3.3.4 dronecan
|
||||
which cmake
|
||||
./waf configure --board ${{matrix.config}}
|
||||
./waf plane
|
||||
|
39
.github/workflows/test_size.yml
vendored
39
.github/workflows/test_size.yml
vendored
@ -251,42 +251,3 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
diff -r $GITHUB_WORKSPACE/base_branch_bin_no_versions $GITHUB_WORKSPACE/pr_bin_no_versions --exclude=*.elf --exclude=*.apj || true
|
||||
|
||||
- name: elf_diff compare with ${{ github.event.pull_request.base.ref }}
|
||||
shell: bash
|
||||
run: |
|
||||
# we don't use weasyprint so manually pull the elf_diff deps reduce install size and time
|
||||
python3 -m pip install -U --no-deps elf_diff GitPython Jinja2 MarkupSafe PyYAML anytree dict2xml gitdb progressbar2 python-utils setuptools-git smmap
|
||||
mkdir elf_diff
|
||||
BIN_PREFIX="arm-none-eabi-"
|
||||
if [ "${{ matrix.toolchain }}" = "armhf" ]; then
|
||||
BIN_PREFIX="arm-linux-gnueabihf-"
|
||||
fi
|
||||
BOOTLOADER=0
|
||||
AP_PERIPH=0
|
||||
if [ "${{matrix.config}}" = "Hitec-Airspeed" ] ||
|
||||
[ "${{matrix.config}}" = "f103-GPS" ]; then
|
||||
AP_PERIPH=1
|
||||
elif [ "${{matrix.config}}" = "MatekF405-CAN" ]; then
|
||||
BOOTLOADER=1
|
||||
fi
|
||||
|
||||
if [ $AP_PERIPH -eq 1 ]; then
|
||||
TO_CHECK="AP_Periph"
|
||||
elif [ $BOOTLOADER -eq 1 ]; then
|
||||
TO_CHECK="AP_Bootloader"
|
||||
else
|
||||
TO_CHECK="arduplane arducopter"
|
||||
fi
|
||||
for CHECK in $TO_CHECK; do
|
||||
python3 -m elf_diff --bin_prefix="$BIN_PREFIX" --html_dir=elf_diff/AP_Periph $GITHUB_WORKSPACE/base_branch_bin/$CHECK $GITHUB_WORKSPACE/pr_bin/$CHECK
|
||||
done
|
||||
|
||||
zip -r elf_diff.zip elf_diff
|
||||
|
||||
- name: Archive elf_diff output
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ELF_DIFF_${{matrix.config}}
|
||||
path: elf_diff.zip
|
||||
retention-days: 14
|
||||
|
@ -9,6 +9,8 @@ public:
|
||||
|
||||
using GCS_MAVLINK::GCS_MAVLINK;
|
||||
|
||||
uint8_t sysid_my_gcs() const override;
|
||||
|
||||
protected:
|
||||
|
||||
// telem_delay is not used by Tracker but is pure virtual, thus
|
||||
@ -16,7 +18,6 @@ protected:
|
||||
// as currently Tracker may brick XBees
|
||||
uint32_t telem_delay() const override { return 0; }
|
||||
|
||||
uint8_t sysid_my_gcs() const override;
|
||||
|
||||
MAV_RESULT handle_command_component_arm_disarm(const mavlink_command_long_t &packet) override;
|
||||
MAV_RESULT _handle_command_preflight_calibration_baro(const mavlink_message_t &msg) override;
|
||||
|
@ -28,9 +28,10 @@ public:
|
||||
bool simple_input_active() const override;
|
||||
bool supersimple_input_active() const override;
|
||||
|
||||
uint8_t sysid_this_mav() const override;
|
||||
|
||||
protected:
|
||||
|
||||
uint8_t sysid_this_mav() const override;
|
||||
|
||||
// minimum amount of time (in microseconds) that must remain in
|
||||
// the main scheduler loop before we are allowed to send any
|
||||
|
@ -1,5 +1,382 @@
|
||||
ArduPilot Copter Release Notes:
|
||||
------------------------------------------------------------------
|
||||
Copter 4.4.4 19-Dec-2023 / 4.4.4-beta1 05-Dec-2023
|
||||
Changes from 4.4.3
|
||||
1) Autopilot related enhancement and fixes
|
||||
- CubeOrange Sim-on-hardware compilation fix
|
||||
- RADIX2HD supports external I2C compasses
|
||||
- SpeedyBeeF405v4 support
|
||||
2) Bug fixes
|
||||
- DroneCAN battery monitor with cell monitor SoC reporting fix
|
||||
- NTF_LED_TYPES parameter description fixed (was missing IS31FL3195)
|
||||
- ProfiLED output fixed in both Notify and Scripting
|
||||
- Scripting bug that could cause crash if parameters were added in flight
|
||||
- STAT_BOOTCNT param fix (was not updating in some cases)
|
||||
- Takeoff RPM check fixed where motors are attached to AUX channels
|
||||
- don't query hobbywing DroneCAN ESC IDs while armed
|
||||
------------------------------------------------------------------
|
||||
Copter 4.4.3 14-Nov-2023
|
||||
Changes from 4.4.3-beta1
|
||||
1) AP_GPS: correct uBlox M10 configuration on low flash boards
|
||||
------------------------------------------------------------------
|
||||
Copter 4.4.3-beta1 07-Nov-2023
|
||||
Changes from 4.4.2
|
||||
1) Autopilot related enhancements and fixes
|
||||
- BETAFTP-F405 board configuration fixes
|
||||
- CubeOrangePlus-BG edition ICM45486 IMU setup fixed
|
||||
- YJUAV_A6SE_H743 support
|
||||
2) Minor enhancements
|
||||
- GPS_DRV_OPTION allows using ellipsoid height in more GPS drivers
|
||||
- Lua script support for fully populating ESC telemetry data
|
||||
3) Bug fixes
|
||||
- AK09916 compass being non-responsive fixed
|
||||
- IxM42xxx IMUs "stuck" gyros fixed
|
||||
- MAVLink response fixed when no airspeed sensor during preflight calibration
|
||||
- Notch filtering protection when using uninitialised RPM source in ESC telemetry
|
||||
- SIYI gimbal driver parsing bug fixed (was causing lost packets)
|
||||
------------------------------------------------------------------
|
||||
Copter 4.4.2 22-Oct-2023 / Copter 4.4.2-beta1 13-Oct-2023
|
||||
Changes from 4.4.1
|
||||
1) Autopilot related enhancements and fixes
|
||||
- BETAFPV-F405 support
|
||||
- MambaF405v2 battery and serial setup corrected
|
||||
- mRo Control Zero OEM H7 bdshot support
|
||||
- SpeedyBee-F405-Wing gets VTX power control
|
||||
- SpeedyBee-F405-Mini support
|
||||
- T-Motor H743 Mini support
|
||||
2) EKF3 supports baroless boards
|
||||
3) GPS-for-yaw allows base GPS to update at only 3Hz
|
||||
4) INA battery monitor supports config of shunt resistor used (see BATTx_SHUNT)
|
||||
5) Log VER message includes vehicle type
|
||||
6) OpenDroneId option to auto-store IDs in persistent flash
|
||||
7) RC SBUS protection against invalid data in first 4 channels
|
||||
8) Bug fixes
|
||||
- BMI088 IMU error value handling fixed to avoid occasional negative spike
|
||||
- Dev environment CI autotest stability improvements
|
||||
- OSD correct DisplayPort BF MSP symbols
|
||||
- OSD option to correct direction arrows for BF font set
|
||||
- Sensor status reporting to GCS fixed for baroless boards
|
||||
------------------------------------------------------------------
|
||||
Copter 4.4.1 26-Sep-2023 / 4.4.1-beta2 14-Sep-2023
|
||||
Changes from 4.4.1-beta1
|
||||
1) Autopilot related enhancements
|
||||
- H750 external flash optimisations for to lower CPU load
|
||||
- MambaF405Mini fixes to match manufacturer's recommended wiring
|
||||
- RADIX2 HD support
|
||||
- YJUAV_A6SE support
|
||||
2) Bug fixes
|
||||
- Airbotf4 features minimised to build for 4.4
|
||||
- ChibiOS clock fix for 480Mhz H7 boards (affected FDCAN)
|
||||
- RPI hardware version check fix
|
||||
------------------------------------------------------------------
|
||||
Copter 4.4.1-beta1 05-Sep-2023
|
||||
Changes from 4.4.0
|
||||
1) Autopilot related fixes and enhancements
|
||||
- KakuteH7-wing get 8 bit directional dshot channel support
|
||||
- Luminousbee5 boards defaults updated
|
||||
- Navigator autopilot GPIOs fix (PWM output was broken)
|
||||
- Pixhawk6C Serial RTS lines pulled low on startup
|
||||
- QiotekZealotF427 and QiotekZealotH743 battery monitor default fixed
|
||||
- SDMODELH7V1 support
|
||||
2) Driver enhancements
|
||||
- DroneCAN battery monitors allow reset of battery SoC
|
||||
- Himark DroneCAN servo support
|
||||
- Hobbywing DroneCAN ESC support
|
||||
3) EKF3 high vibration handling improved with EK3_GLITCH_RADIUS option
|
||||
4) Custom build server gets mission storage on SDCard selection
|
||||
5) SITL default parameter handling bug fix
|
||||
------------------------------------------------------------------
|
||||
Copter 4.4.0 18-Aug-2023 / 4.4.0-beta5 12-Aug-2023
|
||||
Changes from 4.4.0-beta4
|
||||
1) Autopilots specific changes
|
||||
- SIYI N7 support
|
||||
2) Bug fixes
|
||||
- DroneCAN airspeed sensor fix to handle missing packets
|
||||
- DroneCAN GPS RTK injection fix
|
||||
- Notch filter gyro glitch caused by race condition fixed
|
||||
------------------------------------------------------------------
|
||||
Copter 4.4.0-beta4 27-July-2023
|
||||
Changes from 4.4.0-beta3
|
||||
1) Autopilots specific changes
|
||||
- Diatone-Mamba-MK4-H743v2 uses SPL06 baro (was DPS280)
|
||||
- DMA for I2C disabled on F7 and H7 boards
|
||||
- Foxeer H743v1 default serial protocol config fixes
|
||||
- HeeWing-F405 and F405v2 support
|
||||
- iFlight BlitzF7 support
|
||||
2) Scripts may take action based on VTOL motor loss
|
||||
3) Bug fixes
|
||||
- BLHeli returns battery status requested via MSP (avoids hang when using esc-configurator)
|
||||
- CRSFv3 rescans at baudrates to avoid RX loss
|
||||
- EK3_ABIAS_P_NSE param range fix
|
||||
- Scripting restart memory corruption bug fixed
|
||||
- Siyi A8/ZR10 driver fix to avoid crash if serial port not configured
|
||||
------------------------------------------------------------------
|
||||
Copter 4.4.0-beta3 03-July-2023
|
||||
Changes from 4.4.0-beta2
|
||||
1) Autopilots specific changes
|
||||
- Holybro KakuteH7-Wing support
|
||||
- JFB100 external watchdog GPIO support added
|
||||
- Pixhawk1-bdshot support
|
||||
- Pixhawk6X-bdshot support
|
||||
- SpeedyBeeF4 loses bdshot support
|
||||
2) Device drivers
|
||||
- added LP5562 I2C LED driver
|
||||
- added IS31FL3195 LED driver
|
||||
3) TradHeli gets minor fix to RSC servo output range
|
||||
4) Camera and Gimbal related changes
|
||||
- DO_SET_ROI_NONE command support added
|
||||
5) Applet changes
|
||||
- added QUIK_MAX_REDUCE parameter to VTOL quicktune lua applet
|
||||
6) Bug fixes
|
||||
- ADSB sensor loss of transceiver message less spammy
|
||||
- AutoTune Yaw rate max fixed
|
||||
- EKF vertical velocity reset fixed on loss of GPS
|
||||
- GPS pre-arm failure message clarified
|
||||
- SERVOx_PROTOCOL "SToRM32 Gimbal Serial" value renamed to "Gimbal" because also used by Siyi
|
||||
- SERIALx_OPTION "Swap" renamed to "SwapTXRX" for clarity
|
||||
- SBF GPS ellipsoid height fixed
|
||||
- Ublox M10S GPS auto configuration fixed
|
||||
- ZigZag mode user takeoff fixed (users could not takeoff in ZigZag mode previously)
|
||||
------------------------------------------------------------------
|
||||
Copter 4.4.0-beta2 05-Jun-2023
|
||||
Changes from 4.4.0-beta1
|
||||
1) Autopilots specific changes
|
||||
- FlywooF745 update to motor pin output mapping and baro
|
||||
- FoxeerH743 support
|
||||
- JFB100 support
|
||||
- Mamba-F405v2 supports ICM42688
|
||||
- Matek-F405-TE/VTOL support
|
||||
- Matek-H743 IMU SPI slowed to 1Mhz to avoid init issues
|
||||
- SpeedyBee-405-Wing support
|
||||
2) Copter specfic fixes and enhancements
|
||||
- RTL speed fix so changes to WPNAV_SPEED have no effect if RTL_SPEED is non-zero
|
||||
- RTL mode accepts do-change-speed commands from GCS
|
||||
3) AHRS/EKF related fixes and Enhancements
|
||||
- EKF allocation failure handled to avoid watchdog
|
||||
- EKF3 accel bias calculation fix and tuning for greater robustness
|
||||
- Airspeed sensor remains enabled during dead-reckoning (few copters have airspeed sensors)
|
||||
- Wind speed estimates updates reduced while dead-reckoning
|
||||
4) Other Enhancements
|
||||
- Attitude control slew limits always calculated (helps tuning reporting and analysis)
|
||||
- INA228 and INA238 I2C battery monitor support
|
||||
- LOG_DISARMED=3 logs while disarmed but discards log if never eventually armed
|
||||
- LOG_DARM_RATEMAX reduces logging while disarmed
|
||||
- Serial LEDs threading enhancement to support longer lengths without dshot interference
|
||||
4) Bug fixes
|
||||
- Analog battery monitor2 current parameter default fixed
|
||||
- AutoTune fix for loading Yaw Rate D gains
|
||||
- BRD_SAFETYOPTION parameter documentation fix (ActiveForSafetyEnable and Disable were reversed)
|
||||
- Compassmot fix to protect against bad gyro biases from GSF yaw
|
||||
- ICE engine fix for starting after reaching a specified altitude
|
||||
- LED thread locking fix to avoid watchdog
|
||||
- Logging rotation on disarm disabled if Replay logging active (avoids gaps in logs)
|
||||
- RC input on IOMCU bug fix (RC might not be regained if lost)
|
||||
- Serial passthrough fixed
|
||||
5) Custom build server fix to which features are included/excluded
|
||||
------------------------------------------------------------------
|
||||
Copter 4.4.0-beta1 19-Apr-2023
|
||||
Changes from 4.3.6
|
||||
1) New autopilots supported
|
||||
- ESP32
|
||||
- Flywoo Goku F405S AIO
|
||||
- Foxeer H743v1
|
||||
- MambaF405-2022B
|
||||
- PixPilot-V3
|
||||
- PixSurveyA2
|
||||
- rFCU H743
|
||||
- ThePeach K1/R1
|
||||
2) Autopilot specific changes
|
||||
- Bi-Directional DShot support for CubeOrangePlus-bdshot, CUAVNora+, MatekF405TE/VTOL-bdshot, MatekL431, Pixhawk6C-bdshot, QioTekZealotH743-bdshot
|
||||
- Bi-Directional DShot up to 8 channels on MatekH743
|
||||
- BlueRobotics Navigator supports baro on I2C bus 6
|
||||
- BMP280 baro only for BeastF7, KakuteF4, KakuteF7Mini, MambaF405, MatekF405, Omnibusf4 to reduce code size (aka "flash")
|
||||
- CSRF and Hott telemetry disabled by default on some low power boards (aka "minimised boards")
|
||||
- Foxeer Reaper F745 supports external compasses
|
||||
- OmnibusF4 support for BMI270 IMU
|
||||
- OmnibusF7V2-bdshot support removed
|
||||
- KakuteF7 regains displayport, frees up DMA from unused serial port
|
||||
- KakuteH7v2 gets second battery sensor
|
||||
- MambaH743v4 supports VTX
|
||||
- MatekF405-Wing supports InvensenseV3 IMUs
|
||||
- PixPilot-V6 heater enabled
|
||||
- Raspberry 64OS startup crash fixed
|
||||
- ReaperF745AIO serial protocol defaults fixed
|
||||
- SkystarsH7HD (non-bdshot) removed as users should always use -bdshot version
|
||||
- Skyviper loses many unnecessary features to save flash
|
||||
- UBlox GPS only for AtomRCF405NAVI, BeastF7, MatekF405, Omnibusf4 to reduce code size (aka "flash")
|
||||
- VRBrain-v52 and VRCore-v10 features reduced to save flash
|
||||
3) Driver enhancements
|
||||
- ARK RTK GPS support
|
||||
- BMI088 IMU filtering and timing improved, ignores bad data
|
||||
- CRSF OSD may display disarmed state after flight mode (enabled using RC_OPTIONS)
|
||||
- Daiwa winch baud rate obeys SERIALx_BAUD parameter
|
||||
- EFI supports fuel pressure and ignition voltage reporting and battery failsafe
|
||||
- ICM45686 IMU support
|
||||
- ICM20602 uses fast reset instead of full reset on bad temperature sample (avoids occasional very high offset)
|
||||
- ICM45686 supports fast sampling
|
||||
- MAX31865 temp sensor support
|
||||
- MB85RS256TY-32k, PB85RS128C and PB85RS2MC FRAM support
|
||||
- MMC3416 compass orientation fix
|
||||
- MPPT battery monitor reliability improvements, enable/disable aux function and less spammy
|
||||
- Multiple USD-D1-CAN radar support
|
||||
- NMEA output rate configurable (see NMEA_RATE_MS)
|
||||
- NMEA output supports PASHR message (see NMEA_MSG_EN)
|
||||
- OSD supports average resting cell voltage (see OSD_ACRVOLT_xxx params)
|
||||
- Rockblock satellite modem support
|
||||
- Serial baud support for 2Mbps (only some hardware supports this speed)
|
||||
- SF45b lidar filtering reduced (allows detecting smaller obstacles
|
||||
- SmartAudio 2.0 learns all VTX power levels)
|
||||
- UAVCAN ESCs report error count using ESC Telemetry
|
||||
- Unicore GPS (e.g. UM982) support
|
||||
- VectorNav 100 external AHRS support
|
||||
- 5 IMUs supported
|
||||
4) EKF related enhancements
|
||||
- Baro compensation using wind estimates works when climbing or descending (see BAROx_WCF_UP/DN)
|
||||
- External AHRS support for enabling only some sensors (e.g. IMU, Baro, Compass) see EAHRS_SENSORS
|
||||
- Magnetic field tables updated
|
||||
- Non-compass initial yaw alignment uses GPS course over GSF (mostly affects Planes and Rover)
|
||||
5) Control and navigation enhancements
|
||||
- AutoTune of attitude control yaw D gain (set AUTOTUNE_AXES=8)
|
||||
- Circle moode and Loiter Turns command supports counter-clockwise rotation (set CIRCLE_RATE to negative number)
|
||||
- DO_SET_ROI_NONE command turns off ROI
|
||||
- JUMP_TAG mission item support
|
||||
- Missions can be stored on SD card (see BRD_SD_MISSION)
|
||||
- NAV_SCRIPT_TIME command accepts floating point arguments
|
||||
- Pause/Resume returns success if mission is already paused or resumed
|
||||
- Payload Place enhancements
|
||||
- Descent speed is configurable (see PLDP_SPEED_DN)
|
||||
- Manual release supported (detects pilot release of gripper)
|
||||
- Post release delay is configurable (see PLDP_DELAY)
|
||||
- Range finder range used to protect against premature release (see PLDP_RNG_MIN)
|
||||
- Touchdown detection threshold is configurable (see PLDP_THRESH)
|
||||
- Position controller angle max adjusted inflight with CH6 Tuning knob (set TUNE=59)
|
||||
- Surface tracking time constant allows tuning response (see SURFTRAK_TC)
|
||||
- Throttle-Gain boost increases attitude control gains when throttle high (see ATC_THR_G_BOOST)
|
||||
- Waypoint navigation cornering acceleration is configurable (see WPNAV_ACCEL_C)
|
||||
- WeatherVane into the wind in Auto and Guided modes (see WVANE_ENABLE)
|
||||
6) TradHeli specific enhancements
|
||||
- Manual autorotation support
|
||||
- Improved collect to yaw compensation
|
||||
7) Filtering enhancements
|
||||
- FFT notch can be run based on filtered data
|
||||
- Warn of motor noise at RPM frequency using FFT
|
||||
- In-flight FFT can better track low frequency noise
|
||||
- In-flight FFT logging improved
|
||||
- IMU data can be read and replayed for FFT analysis
|
||||
8) Camera and gimbal enhancements
|
||||
- BMMCC support included in Servo driver
|
||||
- DJI RS2/RS3-Pro gimbal support
|
||||
- Dual camera support (see CAM2_TYPE)
|
||||
- Gimbal/Mount2 can be moved to retracted or neutral position
|
||||
- Gremsy ZIO support
|
||||
- IMAGE_START_CAPTURE, SET_CAMERA_ZOOM/FOCUS, VIDEO_START/STOP_CAPTURE command support
|
||||
- Paramters renamed and rescaled
|
||||
- CAM_TRIGG_TYPE renamed to CAM1_TYPE and options have changed
|
||||
- CAM_DURATION renamed to CAM1_DURATION and scaled in seconds
|
||||
- CAM_FEEDBACK_PIN/POL renamed to CAM1_FEEBAK_PIN/POL
|
||||
- CAM_MIN_INTERVAL renamed to CAM1_INTRVAL_MIN and scaled in seconds
|
||||
- CAM_TRIGG_DIST renamed to CAMx_TRIGG_DIST and accepts fractional values
|
||||
- RunCam2 4k support
|
||||
- ViewPro camera gimbal support
|
||||
9) Logging changes
|
||||
- BARD msg includes 3-axis dynamic pressure useful for baro compensation of wind estimate
|
||||
- MCU log msg includes main CPU temp and voltage (was part of POWR message)
|
||||
- RCOut banner message always included in Logs
|
||||
- SCR message includes memory usage of all running scripts
|
||||
- CANS message includes CAN bus tx/rx statistics
|
||||
- OFCA (optical flow calibration log message) units added
|
||||
- Home location not logged to CMD message
|
||||
- MOTB message includes throttle output
|
||||
10) Scripting enhancements
|
||||
- Copter deadreckoning upgraded to applet
|
||||
- EFI Skypower driver gets improved telem messages and bug fixes
|
||||
- Generator throttle control example added
|
||||
- Heap max increased by allowing heap to be split across multiple underlying OS heaps
|
||||
- Hexsoon LEDs applet
|
||||
- Logging from scripts supports more formats
|
||||
- Parameters can be removed or reordered
|
||||
- Parameter description support (scripts must be in AP's applet or driver directory)
|
||||
- Rangefinder driver support
|
||||
- Runcam_on_arm applet starts recording when vehicle is armed
|
||||
- Safety switch, E-Stop and motor interlock support
|
||||
- Scripts can restart all scripts
|
||||
- Script_Controller applet supports inflight switching of active scripts
|
||||
11) Custom build server enhancements
|
||||
- AIS support for displaying nearby boats can be included
|
||||
- Battery, Camera and Compass drivers can be included/excluded
|
||||
- EKF3 wind estimation can be included/excluded
|
||||
- PCA9685, ToshibaLED, PLAY_TUNE notify drivers can be included/excluded
|
||||
- Preclanding can be included/excluded
|
||||
- RichenPower generator can be included/excluded
|
||||
- RC SRXL protocol can be excluded
|
||||
- SIRF GPSs can be included/excluded
|
||||
12) Safety related enhancements and fixes
|
||||
- Arming check for high throttle skipped when arming in Auto mode
|
||||
- Arming check for servo outputs skipped when SERVOx_FUNCTION is scripting
|
||||
- Arming check fix if both "All" and other bitmasks are selected (previously only ran the other checks)
|
||||
- "EK3 sources require RangeFinder" pre-arm check fix when user only sets up 2nd rangefinder (e.g. 1st is disabled)
|
||||
- Pre-arm check that low and critical battery failsafe thresholds are different
|
||||
- Pre-arm message fixed if 2nd EKF core unhealthy
|
||||
- Pre-arm check if reboot required to enabled IMU batch sampling (used for vibe analysis)
|
||||
- RC failsafe (aka throttle failsafe) option to change to Brake mode
|
||||
- RC failsafe timeout configurable (see RC_FS_TIMEOUT)
|
||||
- Takeoff check of motor RPM (see TKOFF_RPM_MIN)
|
||||
- Turtle mode warns user to raise throttle to arm
|
||||
13) Minor enhancements
|
||||
- Boot time reduced by improving parameter conversion efficiency
|
||||
- BRD_SAFETYENABLE parameter renamed to BRD_SAFETY_DEFLT
|
||||
- Compass calibration auxiliary switch function (set RCx_OPTION=171)
|
||||
- Disable IMU3 auxiliary switch function (set RCx_OPTION=110)
|
||||
- Frame type sent to GCS defaults to multicopter to ease first time setup
|
||||
- Rangefinder and FS_OPTIONS param conversion code reduced (affects when upgrading from 3.6 or earlier)
|
||||
- MAVFTP supports file renaming
|
||||
- MAVLink in-progress reply to some requests for calibration from GCS
|
||||
14) Bug fixes:
|
||||
- ADSB telemetry and callsign fixes
|
||||
- Battery pct reported to GCS limited to 0% to 100% range
|
||||
- Bi-directional DShot fix on H7 boards after system time wrap (more complete fix than in 4.3.6)
|
||||
- DisplayPort OSD screen reliability improvement on heavily loaded OSDs especially F4 boards
|
||||
- DisplayPort OSD artificial horizon better matches actual horizon
|
||||
- EFI Serial MS bug fix to avoid possible infinite loop
|
||||
- EKF3 Replay fix when COMPASS_LEARN=3
|
||||
- ESC Telemetry external temp reporting fix
|
||||
- Fence upload works even if Auto mode is excluded from firmware
|
||||
- FMT messages logged even when Fence is exncluded from firmware (e.g. unselected when using custom build server)
|
||||
- Guided mode slow yaw fix
|
||||
- Hardfault avoided if user changes INS_LOG_BAT_CNT while batch sampling running
|
||||
- ICM20649 temp sensor tolerate increased to avoid unnecessary FIFO reset
|
||||
- IMU detection bug fix to avoid duplicates
|
||||
- IMU temp cal fix when using auxiliary IMU
|
||||
- Message Interval fix for restoring default rate https://github.com/ArduPilot/ardupilot/pull/21947
|
||||
- RADIO_STATUS messages slow-down feature never completely stops messages from being sent
|
||||
- SERVOx_TRIM value output momentarily if SERVOx_FUNCTION is changed from Disabled to RCPassThru, RCIN1, etc. Avoids momentary divide-by-zero
|
||||
- Scripting file system open fix
|
||||
- Scripting PWM source deletion crash fix
|
||||
- MAVFTP fix for low baudrates (4800 baud and lower)
|
||||
- ModalAI VOXL reset handling fix
|
||||
- MPU6500 IMU fast sampling rate to 4k (was 1K)
|
||||
- NMEA GPGGA output fixed for GPS quality, num sats and hdop
|
||||
- Position control reset avoided even with very uneven main loop rate due to high CPU load
|
||||
- SingleCopter and CoaxCopter fix to fin centering when using DShot
|
||||
- SystemID mode fix to write PID log messages
|
||||
- Terrain offset increased from 15m to 30m (see TERRAIN_OFS_MAX)to reduce chance of "clamping"
|
||||
- Throttle notch FFT tuning param fix
|
||||
- VTX protects against pitmode changes when not enabled or vehicle disarmed
|
||||
15) Developer specific items
|
||||
- DroneCAN replaces UAVCAN
|
||||
- FlighAxis simulator rangefinder fixed
|
||||
- Scripts in applet and drivers directory checked using linter
|
||||
- Simulator supports main loop timing jitter (see SIM_TIME_JITTER)
|
||||
- Simulink model and init scripts
|
||||
- SITL on hardware support (useful to demo servos moving in response to simulated flight)
|
||||
- SITL parameter definitions added (some, not all)
|
||||
- Webots 2023a simulator support
|
||||
- XPlane support for wider range of aircraft
|
||||
------------------------------------------------------------------
|
||||
Copter 4.3.6 05-Apr-2023 / 4.3.6-beta1, 4.3.6--beta2 27-Mar-2023
|
||||
Changes from 4.3.5
|
||||
1) Bi-directional DShot fix for possible motor stop approx 72min after startup
|
||||
------------------------------------------------------------------
|
||||
Copter Copter 4.3.5 14-Mar-2023 / 4.3.5-rc1 01-Mar-2023
|
||||
Changes from 4.3.4
|
||||
1) Bug fixes
|
||||
|
@ -1319,6 +1319,10 @@ public:
|
||||
|
||||
bool use_pilot_yaw() const override;
|
||||
|
||||
bool set_speed_xy(float speed_xy_cms) override;
|
||||
bool set_speed_up(float speed_up_cms) override;
|
||||
bool set_speed_down(float speed_down_cms) override;
|
||||
|
||||
// RTL states
|
||||
enum class SubMode : uint8_t {
|
||||
STARTING,
|
||||
@ -1782,6 +1786,7 @@ public:
|
||||
bool has_manual_throttle() const override { return false; }
|
||||
bool allows_arming(AP_Arming::Method method) const override { return true; }
|
||||
bool is_autopilot() const override { return true; }
|
||||
bool has_user_takeoff(bool must_navigate) const override { return true; }
|
||||
|
||||
// save current position as A or B. If both A and B have been saved move to the one specified
|
||||
void save_or_move_to_destination(Destination ab_dest);
|
||||
|
@ -554,4 +554,22 @@ bool ModeRTL::use_pilot_yaw(void) const
|
||||
return allow_yaw_option || land_repositioning || final_landing;
|
||||
}
|
||||
|
||||
bool ModeRTL::set_speed_xy(float speed_xy_cms)
|
||||
{
|
||||
copter.wp_nav->set_speed_xy(speed_xy_cms);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ModeRTL::set_speed_up(float speed_up_cms)
|
||||
{
|
||||
copter.wp_nav->set_speed_up(speed_up_cms);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ModeRTL::set_speed_down(float speed_down_cms)
|
||||
{
|
||||
copter.wp_nav->set_speed_down(speed_down_cms);
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -29,6 +29,12 @@ void Copter::takeoff_check()
|
||||
|
||||
// check ESCs are sending RPM at expected level
|
||||
uint32_t motor_mask = motors->get_motor_mask();
|
||||
#if HAL_WITH_IO_MCU
|
||||
if (AP_BoardConfig::io_enabled()) {
|
||||
// In 4.4 and earlier ESC telemetry is always indexed from 1 for servo channels 9+
|
||||
motor_mask >>= 8;
|
||||
}
|
||||
#endif
|
||||
const bool telem_active = AP::esc_telem().is_telemetry_active(motor_mask);
|
||||
const bool rpm_adequate = AP::esc_telem().are_motors_running(motor_mask, g2.takeoff_rpm_min);
|
||||
|
||||
|
@ -6,14 +6,14 @@
|
||||
|
||||
#include "ap_version.h"
|
||||
|
||||
#define THISFIRMWARE "ArduCopter V4.4.0-dev"
|
||||
#define THISFIRMWARE "ArduCopter V4.4.4"
|
||||
|
||||
// the following line is parsed by the autotest scripts
|
||||
#define FIRMWARE_VERSION 4,4,0,FIRMWARE_VERSION_TYPE_DEV
|
||||
#define FIRMWARE_VERSION 4,4,4,FIRMWARE_VERSION_TYPE_OFFICIAL
|
||||
|
||||
#define FW_MAJOR 4
|
||||
#define FW_MINOR 4
|
||||
#define FW_PATCH 0
|
||||
#define FW_TYPE FIRMWARE_VERSION_TYPE_DEV
|
||||
#define FW_PATCH 4
|
||||
#define FW_TYPE FIRMWARE_VERSION_TYPE_OFFICIAL
|
||||
|
||||
#include <AP_Common/AP_FWVersionDefine.h>
|
||||
|
@ -203,7 +203,13 @@ void Plane::ahrs_update()
|
||||
*/
|
||||
void Plane::update_speed_height(void)
|
||||
{
|
||||
if (control_mode->does_auto_throttle()) {
|
||||
bool should_run_tecs = control_mode->does_auto_throttle();
|
||||
#if HAL_QUADPLANE_ENABLED
|
||||
if (quadplane.should_disable_TECS()) {
|
||||
should_run_tecs = false;
|
||||
}
|
||||
#endif
|
||||
if (should_run_tecs) {
|
||||
// Call TECS 50Hz update. Note that we call this regardless of
|
||||
// throttle suppressed, as this needs to be running for
|
||||
// takeoff detection
|
||||
@ -543,7 +549,14 @@ void Plane::update_alt()
|
||||
}
|
||||
#endif
|
||||
|
||||
if (control_mode->does_auto_throttle() && !throttle_suppressed) {
|
||||
bool should_run_tecs = control_mode->does_auto_throttle();
|
||||
#if HAL_QUADPLANE_ENABLED
|
||||
if (quadplane.should_disable_TECS()) {
|
||||
should_run_tecs = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (should_run_tecs && !throttle_suppressed) {
|
||||
|
||||
float distance_beyond_land_wp = 0;
|
||||
if (flight_stage == AP_FixedWing::FlightStage::LAND &&
|
||||
|
@ -259,7 +259,7 @@ void Plane::stabilize_stick_mixing_fbw()
|
||||
// non-linear and ends up as 2x the maximum, to ensure that
|
||||
// the user can direct the plane in any direction with stick
|
||||
// mixing.
|
||||
float roll_input = channel_roll->norm_input();
|
||||
float roll_input = channel_roll->norm_input_dz();
|
||||
if (roll_input > 0.5f) {
|
||||
roll_input = (3*roll_input - 1);
|
||||
} else if (roll_input < -0.5f) {
|
||||
@ -273,7 +273,7 @@ void Plane::stabilize_stick_mixing_fbw()
|
||||
return;
|
||||
}
|
||||
|
||||
float pitch_input = channel_pitch->norm_input();
|
||||
float pitch_input = channel_pitch->norm_input_dz();
|
||||
if (pitch_input > 0.5f) {
|
||||
pitch_input = (3*pitch_input - 1);
|
||||
} else if (pitch_input < -0.5f) {
|
||||
|
@ -11,13 +11,14 @@ public:
|
||||
|
||||
using GCS_MAVLINK::GCS_MAVLINK;
|
||||
|
||||
uint8_t sysid_my_gcs() const override;
|
||||
|
||||
protected:
|
||||
|
||||
uint32_t telem_delay() const override;
|
||||
|
||||
void handle_mission_set_current(AP_Mission &mission, const mavlink_message_t &msg) override;
|
||||
|
||||
uint8_t sysid_my_gcs() const override;
|
||||
bool sysid_enforce() const override;
|
||||
|
||||
MAV_RESULT handle_command_preflight_calibration(const mavlink_command_long_t &packet, const mavlink_message_t &msg) override;
|
||||
|
@ -680,6 +680,9 @@ private:
|
||||
|
||||
// The amount of time we should stay in a loiter for the Loiter Time command. Milliseconds.
|
||||
uint32_t time_max_ms;
|
||||
|
||||
// current value of loiter radius in metres used by the controller
|
||||
float radius;
|
||||
} loiter;
|
||||
|
||||
// Conditional command
|
||||
@ -720,6 +723,9 @@ private:
|
||||
// are we trying to follow terrain?
|
||||
bool terrain_following;
|
||||
|
||||
// are we waiting to load terrain data to init terrain following
|
||||
bool terrain_following_pending;
|
||||
|
||||
// target altitude above terrain in cm, valid if terrain_following
|
||||
// is set
|
||||
int32_t terrain_alt_cm;
|
||||
@ -833,7 +839,7 @@ private:
|
||||
void reset_offset_altitude(void);
|
||||
void set_offset_altitude_location(const Location &start_loc, const Location &destination_loc);
|
||||
bool above_location_current(const Location &loc);
|
||||
void setup_terrain_target_alt(Location &loc) const;
|
||||
void setup_terrain_target_alt(Location &loc);
|
||||
int32_t adjusted_altitude_cm(void);
|
||||
int32_t adjusted_relative_altitude_cm(void);
|
||||
float mission_alt_offset(void);
|
||||
|
@ -1,3 +1,430 @@
|
||||
Release 4.4.4 19th December 2023
|
||||
--------------------------------
|
||||
|
||||
Changes from 4.4.3:
|
||||
|
||||
- CubeOrange Sim-on-hardware compilation fix
|
||||
- RADIX2HD supports external I2C compasses
|
||||
- SpeedyBeeF405v4 support
|
||||
- DroneCAN battery monitor with cell monitor SoC reporting fix
|
||||
- ProfiLED output fixed in both Notify and Scripting
|
||||
- NTF_LED_TYPES parameter description fixed (was missing IS31FL3195)
|
||||
- Scripting bug that could cause crash if parameters were added in flight
|
||||
- STAT_BOOTCNT param fix (was not updating in some cases)
|
||||
- don't query hobbywing DroneCAN ESC IDs while armed
|
||||
- clamp empy version to prevent build errors
|
||||
|
||||
Release 4.4.3 14th November 2023
|
||||
--------------------------------
|
||||
|
||||
Changes from 4.4.2:
|
||||
|
||||
- fixed setup of ICM45486 IMU on CubeOrangePlus-BG edition
|
||||
- disable AFSR on IxM42xxx IMUs to prevent gyro bias for "stuck" gyros
|
||||
- fixed AK09916 compass being non-responsive
|
||||
- implement GPS_DRV_OPTION for using ellipsoid height in more GPS drivers
|
||||
- fixed SIYI AP_Mount parsing bug
|
||||
- configuration fixes for BETAFTP-F405 boards
|
||||
- fixed origin versus home relative bug in quadplane landing and guided takeoff
|
||||
- correct mavlink response for no airspeed sensor on preflight calibration
|
||||
- protect against notch filtering with uninitialised RPM source in ESC telemetry
|
||||
- allow lua scripts to populate full ESC telemetry data
|
||||
- added YJUAV_A6SE_H743 support
|
||||
- fixed uBlox M10 GPS support on boards with 1M flash
|
||||
|
||||
Release 4.4.2 23th October 2023
|
||||
-------------------------------
|
||||
|
||||
Changes from 4.4.1
|
||||
|
||||
- BETAFPV-F405 support
|
||||
- MambaF405v2 battery and serial setup corrected
|
||||
- mRo Control Zero OEM H7 bdshot support
|
||||
- SpeedyBee-F405-Wing gets VTX power control
|
||||
- SpeedyBee-F405-Mini support
|
||||
- T-Motor H743 Mini support
|
||||
- EKF3 supports baroless boards
|
||||
- INA battery monitor supports config of shunt resistor used (see BATTx_SHUNT)
|
||||
- BMI088 IMU error value handling fixed to avoid occasional negative spike
|
||||
- Dev environment CI autotest stability improvements
|
||||
- OSD correct DisplayPort BF MSP symbols
|
||||
- OSD option to correct direction arrows for BF font set
|
||||
- Sensor status reporting to GCS fixed for baroless boards
|
||||
- added opendroneid option to auto-store IDs in persistent flash
|
||||
- fixed TECS bug that could cause inability to climb or descend
|
||||
- fixed race condition when starting TECS controlled mode
|
||||
- fixed RTL with rally point and terrain follow
|
||||
- protect against invalid data in SBUS for first 4 channels
|
||||
- added build type to VER message
|
||||
- allow moving baseline rover at 3Hz
|
||||
- use RC deadzones in stick mixing
|
||||
|
||||
|
||||
Release 4.4.1 26th September 2023
|
||||
---------------------------------
|
||||
|
||||
No changes from beta2
|
||||
|
||||
Release 4.4.1-beta2 12th September 2023
|
||||
--------------------------------------
|
||||
|
||||
Changes from 4.4.1-beta1
|
||||
|
||||
- Airbotf4 features minimised to build for 4.4
|
||||
- ChibiOS clock fix for 480Mhz H7 boards (affected FDCAN)
|
||||
- H750 external flash optimisations for to lower CPU load
|
||||
- MambaF405Mini fixes to match manufacturer's recommended wiring
|
||||
- RADIX2 HD support
|
||||
- RPI hardware version check fix
|
||||
- YJUAV_A6SE support
|
||||
|
||||
Release 4.4.1-beta1 5th September 2023
|
||||
--------------------------------------
|
||||
|
||||
Changes from 4.4.1
|
||||
|
||||
- support Himark DroneCAN servos
|
||||
- support Hobbywing DroneCAN ESCs
|
||||
- fixed control surface deflection on quadplanes in VTOL takeoff wait
|
||||
- fixed bug in parameter default handling in SITL
|
||||
- allow selection of mission sdcard storage on custom.ardupilot.org
|
||||
- added support for SDMODELH7V1
|
||||
- fixed battery monitor default for QiotekZealotF427 and QiotekZealotH743
|
||||
- support 8 bit directional dshot channels on KakuteH7-wing
|
||||
- improved handling of high vibration in EKF3 with new EK3_GLITCH_RADIUS options
|
||||
- allow reset of battery SoC for DroneCAN battery monitors
|
||||
- update GPIOs for Navigator board in HAL_Linux
|
||||
- pull RTS lines low on Pixhawk6C on startup
|
||||
- added log_file_content in scripting for aerobatics
|
||||
- added asymmetry factor for skid steering on rovers
|
||||
- updated defaults for luminousbee5 boards
|
||||
|
||||
Happy flying!
|
||||
|
||||
Release 4.4.0 18th August 2023
|
||||
------------------------------
|
||||
|
||||
No changes from beta5
|
||||
|
||||
Release 4.4.0-beta5 11th August 2023
|
||||
------------------------------------
|
||||
|
||||
Changes from 4.4.0-beta4
|
||||
|
||||
- fixed handling of missing DroneCAN airspeed packet
|
||||
- fixed reset of target altitude in plane GUIDED mode
|
||||
- added SIYI N7 flight controller
|
||||
- fixed auto-enable of fence with forced arm
|
||||
- fixed race condition that caused notch filter gyro glitches
|
||||
- fixed bug with RTK injection for DroneCAN
|
||||
|
||||
Release 4.4.0 beta4
|
||||
-------------------
|
||||
|
||||
Changes from 4.4.0-beta3
|
||||
|
||||
1) flight controller specific changes
|
||||
- Diatone-Mamba-MK4-H743v2 uses SPL06 baro (was DPS280)
|
||||
- DMA for I2C disabled on F7 and H7 boards
|
||||
- Foxeer H743v1 default serial protocol config fixes
|
||||
- HeeWing-F405 and F405v2 support
|
||||
- iFlight BlitzF7 support
|
||||
2) Scripts may take action based on VTOL motor loss
|
||||
3) Bug fixes
|
||||
- BLHeli returns battery status requested via MSP (avoids hang when using esc-configurator)
|
||||
- CRSFv3 rescans at baudrates to avoid RX loss
|
||||
- EK3_ABIAS_P_NSE param range fix
|
||||
- Scripting restart memory corruption bug fixed
|
||||
- Siyi A8/ZR10 driver fix to avoid crash if serial port not configured
|
||||
|
||||
Release 4.4.0 beta3
|
||||
-------------------
|
||||
|
||||
This is the third beta of plane 4.4.0. This includes some important
|
||||
fixes since beta2
|
||||
|
||||
1) flight controller specific changes
|
||||
- Holybro KakuteH7-Wing support
|
||||
- JFB100 external watchdog GPIO support added
|
||||
- Pixhawk1-bdshot support
|
||||
- Pixhawk6X-bdshot support
|
||||
- SpeedyBeeF4 loses bdshot support
|
||||
|
||||
3) Camera and Gimbal related changes
|
||||
- DO_SET_ROI_NONE command support added
|
||||
|
||||
4) Bug fixes
|
||||
- ADSB sensor loss of transceiver message less spammy
|
||||
- AutoTune Yaw rate max fixed
|
||||
- EKF vertical velocity reset fixed on loss of GPS
|
||||
- GPS pre-arm failure message clarified
|
||||
- SERVOx_PROTOCOL "SToRM32 Gimbal Serial" value renamed to "Gimbal" because also used by Siyi
|
||||
- SERIALx_OPTION "Swap" renamed to "SwapTXRX" for clarity
|
||||
- SBF GPS ellipsoid height fixed
|
||||
- Ublox M10S GPS auto configuration fixed
|
||||
- ZigZag mode user takeoff fixed (users could not takeoff in ZigZag mode previously)
|
||||
- fixed memory corruption bug with scripting restart
|
||||
|
||||
5) Device drivers
|
||||
- added LP5562 I2C LED driver
|
||||
- added IS31FL3195 LED driver
|
||||
|
||||
6) Applet changes
|
||||
- added QUIK_MAX_REDUCE parameter to VTOL quicktune lua applet
|
||||
|
||||
7) Plane specific changes
|
||||
- fixed takeoff mode to ensure climb to takeoff alt before turning
|
||||
- fixed error in quadplane wait for rudder neutral
|
||||
- improved handling of forward throttle during VTOL landing
|
||||
- fixed TECS state reset in VTOL auto modes
|
||||
- fixed early exit from loiter to alt
|
||||
- fixed display of started airspeed wait on forward transition
|
||||
|
||||
|
||||
Release 4.4.0 beta2
|
||||
-------------------
|
||||
|
||||
This is the second beta of plane 4.4.0. This includes some important
|
||||
fixes since beta1.
|
||||
|
||||
The full list of changes is:
|
||||
|
||||
- added SpeedyBeeF405WING, JSB100 and FoxeerH743
|
||||
- added LOG_DISARMED=3 support and LOG_DARM_RATEMAX
|
||||
- fixed error handling for being out of memory in EKF initialisation
|
||||
- fixed a bug in RC input handling on the IOMCU
|
||||
- fixed a bug handling ICE engine start after altitude reached
|
||||
- adjust EKF3 accel bias process noise for greater robustness
|
||||
- fixed an EKF3 bug in accel bias calculations
|
||||
- cope with compassmot impacting GSF yaw numerical stability
|
||||
- fixed an AUTOTUNE/QAUTOTUNE bug in yaw tuning
|
||||
- support INA228 and INA238 I2C battery monitors
|
||||
- always log rate PID slew limiters even when slew limit is zero
|
||||
- added MambaF4050v2 for new IMU, bdshot and DMA on UART1
|
||||
- update for FoxeerH743v1 GA release
|
||||
- reduced IMU init speed on MatekH743
|
||||
- move LED serial processing to its own thread
|
||||
- fixed parameter documentation for BRD_SAFETYOPTION
|
||||
- don't reject airspeed using EKF innovation if dead-reckoning
|
||||
- fixed USB pass-thru on 2nd USB endpoint
|
||||
|
||||
|
||||
Release 4.4.0 beta1
|
||||
-------------------
|
||||
|
||||
This is the first beta of plane 4.4.0. It is a big release with lots
|
||||
of changes. Many thanks to all the people who have contributed!
|
||||
|
||||
1) New autopilots supported
|
||||
- ESP32
|
||||
- Flywoo Goku F405S AIO
|
||||
- Foxeer H743v1
|
||||
- MambaF405-2022B
|
||||
- PixPilot-V3
|
||||
- PixSurveyA2
|
||||
- rFCU H743
|
||||
- ThePeach K1/R1
|
||||
|
||||
2) Autopilot specific changes
|
||||
- Bi-Directional DShot support for CubeOrangePlus-bdshot, CUAVNora+, MatekF405TE/VTOL-bdshot, MatekL431, Pixhawk6C-bdshot, QioTekZealotH743-bdshot
|
||||
- Bi-Directional DShot up to 8 channels on MatekH743
|
||||
- BlueRobotics Navigator supports baro on I2C bus 6
|
||||
- BMP280 baro only for BeastF7, KakuteF4, KakuteF7Mini, MambaF405, MatekF405, Omnibusf4 to reduce code size (aka "flash")
|
||||
- CSRF and Hott telemetry disabled by default on some low power boards (aka "minimised boards")
|
||||
- Foxeer Reaper F745 supports external compasses
|
||||
- OmnibusF4 support for BMI270 IMU
|
||||
- OmnibusF7V2-bdshot support removed
|
||||
- KakuteF7 regains displayport, frees up DMA from unused serial port
|
||||
- KakuteH7v2 gets second battery sensor
|
||||
- MambaH743v4 supports VTX
|
||||
- MatekF405-Wing supports InvensenseV3 IMUs
|
||||
- PixPilot-V6 heater enabled
|
||||
- Raspberry 64OS startup crash fixed
|
||||
- ReaperF745AIO serial protocol defaults fixed
|
||||
- SkystarsH7HD (non-bdshot) removed as users should always use -bdshot version
|
||||
- Skyviper loses many unnecessary features to save flash
|
||||
- UBlox GPS only for AtomRCF405NAVI, BeastF7, MatekF405, Omnibusf4 to reduce code size (aka "flash")
|
||||
- VRBrain-v52 and VRCore-v10 features reduced to save flash
|
||||
|
||||
3) Driver enhancements
|
||||
- ARK RTK GPS support
|
||||
- BMI088 IMU filtering and timing improved, ignores bad data
|
||||
- CRSF OSD may display disarmed state after flight mode (enabled using RC_OPTIONS)
|
||||
- Daiwa winch baud rate obeys SERIALx_BAUD parameter
|
||||
- EFI supports fuel pressure and ignition voltage reporting and battery failsafe
|
||||
- ICM45686 IMU support
|
||||
- ICM20602 uses fast reset instead of full reset on bad temperature sample (avoids occasional very high offset)
|
||||
- ICM45686 supports fast sampling
|
||||
- MAX31865 temp sensor support
|
||||
- MB85RS256TY-32k, PB85RS128C and PB85RS2MC FRAM support
|
||||
- MMC3416 compass orientation fix
|
||||
- MPPT battery monitor reliability improvements, enable/disable aux function and less spammy
|
||||
- Multiple USD-D1-CAN radar support
|
||||
- NMEA output rate configurable (see NMEA_RATE_MS)
|
||||
- NMEA output supports PASHR message (see NMEA_MSG_EN)
|
||||
- OSD supports average resting cell voltage (see OSD_ACRVOLT_xxx params)
|
||||
- Rockblock satellite modem support
|
||||
- Serial baud support for 2Mbps (only some hardware supports this speed)
|
||||
- SF45b lidar filtering reduced (allows detecting smaller obstacles
|
||||
- SmartAudio 2.0 learns all VTX power levels)
|
||||
- UAVCAN ESCs report error count using ESC Telemetry
|
||||
- Unicore GPS (e.g. UM982) support
|
||||
- VectorNav 100 external AHRS support
|
||||
- 5 IMUs supported
|
||||
|
||||
4) EKF related enhancements
|
||||
- Baro compensation using wind estimates works when climbing or descending (see BAROx_WCF_UP/DN)
|
||||
- External AHRS support for enabling only some sensors (e.g. IMU, Baro, Compass) see EAHRS_SENSORS
|
||||
- Magnetic field tables updated
|
||||
- Non-compass initial yaw alignment uses GPS course over GSF (mostly affects Planes and Rover)
|
||||
|
||||
5) Control and navigation enhancements
|
||||
- AutoTune of attitude control yaw D gain (set AUTOTUNE_AXES=8)
|
||||
- DO_SET_ROI_NONE command turns off ROI
|
||||
- JUMP_TAG mission item support
|
||||
- Missions can be stored on SD card (see BRD_SD_MISSION)
|
||||
- NAV_SCRIPT_TIME command accepts floating point arguments
|
||||
- Pause/Resume returns success if mission is already paused or resumed
|
||||
- Payload Place support via lua script in quadplanes
|
||||
|
||||
7) Filtering enhancements
|
||||
- FFT notch can be run based on filtered data
|
||||
- Warn of motor noise at RPM frequency using FFT
|
||||
- In-flight FFT can better track low frequency noise
|
||||
- In-flight FFT logging improved
|
||||
- IMU data can be read and replayed for FFT analysis
|
||||
|
||||
8) Camera and gimbal enhancements
|
||||
- BMMCC support included in Servo driver
|
||||
- DJI RS2/RS3-Pro gimbal support
|
||||
- Dual camera support (see CAM2_TYPE)
|
||||
- Gimbal/Mount2 can be moved to retracted or neutral position
|
||||
- Gremsy ZIO support
|
||||
- IMAGE_START_CAPTURE, SET_CAMERA_ZOOM/FOCUS, VIDEO_START/STOP_CAPTURE command support
|
||||
- Paramters renamed and rescaled
|
||||
i) CAM_TRIGG_TYPE renamed to CAM1_TYPE and options have changed
|
||||
ii) CAM_DURATION renamed to CAM1_DURATION and scaled in seconds
|
||||
iii) CAM_FEEDBACK_PIN/POL renamed to CAM1_FEEBAK_PIN/POL
|
||||
iv) CAM_MIN_INTERVAL renamed to CAM1_INTRVAL_MIN and scaled in seconds
|
||||
v) CAM_TRIGG_DIST renamed to CAMx_TRIGG_DIST and accepts fractional values
|
||||
- RunCam2 4k support
|
||||
- ViewPro camera gimbal support
|
||||
|
||||
9) Logging changes
|
||||
- BARO msg includes 3-axis dynamic pressure useful for baro compensation of wind estimate
|
||||
- MCU log msg includes main CPU temp and voltage (was part of POWR message)
|
||||
- RCOut banner message always included in Logs
|
||||
- SCR message includes memory usage of all running scripts
|
||||
- CANS message includes CAN bus tx/rx statistics
|
||||
- OFCA (optical flow calibration log message) units added
|
||||
- Home location not logged to CMD message
|
||||
- MOTB message includes throttle output
|
||||
|
||||
10) Scripting enhancements
|
||||
- Generator throttle control example added
|
||||
- Heap max increased by allowing heap to be split across multiple underlying OS heaps
|
||||
- Hexsoon LEDs applet
|
||||
- Logging from scripts supports more formats
|
||||
- Parameters can be removed or reordered
|
||||
- Parameter description support (scripts must be in AP's applet or driver directory)
|
||||
- Rangefinder driver support
|
||||
- Runcam_on_arm applet starts recording when vehicle is armed
|
||||
- Safety switch, E-Stop and motor interlock support
|
||||
- Scripts can restart all scripts
|
||||
- Script_Controller applet supports inflight switching of active scripts
|
||||
|
||||
11) Custom build server enhancements
|
||||
- AIS support for displaying nearby boats can be included
|
||||
- Battery, Camera and Compass drivers can be included/excluded
|
||||
- EKF3 wind estimation can be included/excluded
|
||||
- PCA9685, ToshibaLED, PLAY_TUNE notify drivers can be included/excluded
|
||||
- RichenPower generator can be included/excluded
|
||||
- RC SRXL protocol can be excluded
|
||||
- SIRF GPSs can be included/excluded
|
||||
|
||||
12) Safety related enhancements and fixes
|
||||
- "EK3 sources require RangeFinder" pre-arm check fix when user only sets up 2nd rangefinder (e.g. 1st is disabled)
|
||||
- Pre-arm check that low and critical battery failsafe thresholds are different
|
||||
- Pre-arm message fixed if 2nd EKF core unhealthy
|
||||
- Pre-arm check if reboot required to enabled IMU batch sampling (used for vibe analysis)
|
||||
|
||||
13) Minor enhancements
|
||||
- Boot time reduced by improving parameter conversion efficiency
|
||||
- BRD_SAFETYENABLE parameter renamed to BRD_SAFETY_DEFLT
|
||||
- Compass calibration auxiliary switch function (set RCx_OPTION=171)
|
||||
- Disable IMU3 auxiliary switch function (set RCx_OPTION=110)
|
||||
- MAVFTP supports file renaming
|
||||
- MAVLink in-progress reply to some requests for calibration from GCS
|
||||
|
||||
14) Bug fixes:
|
||||
- ADSB telemetry and callsign fixes
|
||||
- Battery pct reported to GCS limited to 0% to 100% range
|
||||
- Bi-directional DShot fix on H7 boards after system time wrap (more complete fix than in 4.3.6)
|
||||
- DisplayPort OSD screen reliability improvement on heavily loaded OSDs especially F4 boards
|
||||
- DisplayPort OSD artificial horizon better matches actual horizon
|
||||
- EFI Serial MS bug fix to avoid possible infinite loop
|
||||
- EKF3 Replay fix when COMPASS_LEARN=3
|
||||
- ESC Telemetry external temp reporting fix
|
||||
- Fence upload works even if Auto mode is excluded from firmware
|
||||
- FMT messages logged even when Fence is exncluded from firmware (e.g. unselected when using custom build server)
|
||||
- Hardfault avoided if user changes INS_LOG_BAT_CNT while batch sampling running
|
||||
- ICM20649 temp sensor tolerate increased to avoid unnecessary FIFO reset
|
||||
- IMU detection bug fix to avoid duplicates
|
||||
- IMU temp cal fix when using auxiliary IMU
|
||||
- Message Interval fix for restoring default rate https://github.com/ArduPilot/ardupilot/pull/21947
|
||||
- RADIO_STATUS messages slow-down feature never completely stops messages from being sent
|
||||
- SERVOx_TRIM value output momentarily if SERVOx_FUNCTION is changed from Disabled to RCPassThru, RCIN1, etc. Avoids momentary divide-by-zero
|
||||
- Scripting file system open fix
|
||||
- Scripting PWM source deletion crash fix
|
||||
- MAVFTP fix for low baudrates (4800 baud and lower)
|
||||
- ModalAI VOXL reset handling fix
|
||||
- MPU6500 IMU fast sampling rate to 4k (was 1K)
|
||||
- NMEA GPGGA output fixed for GPS quality, num sats and hdop
|
||||
- Position control reset avoided even with very uneven main loop rate due to high CPU load
|
||||
- Terrain offset increased from 15m to 30m (see TERRAIN_OFS_MAX) to reduce chance of "clamping"
|
||||
- Throttle notch FFT tuning param fix
|
||||
|
||||
15) Developer specific items
|
||||
- DroneCAN replaces UAVCAN
|
||||
- FlighAxis simulator rangefinder fixed
|
||||
- Scripts in applet and drivers directory checked using linter
|
||||
- Simulator supports main loop timing jitter (see SIM_TIME_JITTER)
|
||||
- Simulink model and init scripts
|
||||
- SITL on hardware support (useful to demo servos moving in response to simulated flight)
|
||||
- SITL parameter definitions added (some, not all)
|
||||
- Webots 2023a simulator support
|
||||
- XPlane support for wider range of aircraft
|
||||
|
||||
16) Plane specific changes
|
||||
- new aerobatics scripting system with flexible schedules
|
||||
- added plane-3d SITL model
|
||||
- added quadlane landing abort AUX switch
|
||||
- added TKOFF_GND_PITCH for taildragger takeoff
|
||||
- new ACRO_LOCKING=2 mode for quaternion locking with yaw rate controller
|
||||
- allow yaw rate autotune in modes other than AUTOTUNE
|
||||
- use a cone for QRTL climb close to home
|
||||
- added Y4 VTOL config for quadplanes
|
||||
- added throttle scaling for vectored yaw
|
||||
- added turn corrdination to yaw AUTOTUNE
|
||||
- added Q_OPTION for motor tilt when disarmed in fixed wing modes
|
||||
|
||||
|
||||
Release 4.3.5 26th March 2023
|
||||
------------------------------
|
||||
|
||||
- fixed 32 bit microsecond wrap in BDShot code
|
||||
|
||||
This release has a single bug fix for a critical bug for anyone using
|
||||
bi-directional DShot on their vehicle. If using bi-directional DShot
|
||||
and the vehicle is running its motors when 32 bit microsecond time
|
||||
wraps at 71 minutes (or multiples of 71 minutes) then the bug that is
|
||||
fixed in this release has an approximately 1 in 3 chance of causing
|
||||
the motor to stop.
|
||||
|
||||
Note that the time is the time since boot, not the time since arming,
|
||||
so even vehicles flying for a short time could be vulnerable if they
|
||||
sit for a long time on the ground before takeoff.
|
||||
|
||||
Release 4.3.4 1st March 2023
|
||||
-----------------------------
|
||||
|
||||
|
@ -191,6 +191,12 @@ void Plane::set_target_altitude_location(const Location &loc)
|
||||
target_altitude.amsl_cm += home.alt;
|
||||
}
|
||||
#if AP_TERRAIN_AVAILABLE
|
||||
if (target_altitude.terrain_following_pending) {
|
||||
/* we didn't get terrain data to init when we started on this
|
||||
target, retry
|
||||
*/
|
||||
setup_terrain_target_alt(next_WP_loc);
|
||||
}
|
||||
/*
|
||||
if this location has the terrain_alt flag set and we know the
|
||||
terrain altitude of our current location then treat it as a
|
||||
@ -448,12 +454,16 @@ bool Plane::above_location_current(const Location &loc)
|
||||
modify a destination to be setup for terrain following if
|
||||
TERRAIN_FOLLOW is enabled
|
||||
*/
|
||||
void Plane::setup_terrain_target_alt(Location &loc) const
|
||||
void Plane::setup_terrain_target_alt(Location &loc)
|
||||
{
|
||||
#if AP_TERRAIN_AVAILABLE
|
||||
if (terrain_enabled_in_current_mode()) {
|
||||
loc.change_alt_frame(Location::AltFrame::ABOVE_TERRAIN);
|
||||
if (!loc.change_alt_frame(Location::AltFrame::ABOVE_TERRAIN)) {
|
||||
target_altitude.terrain_following_pending = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
target_altitude.terrain_following_pending = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,11 @@ bool Plane::start_command(const AP_Mission::Mission_Command& cmd)
|
||||
// default to non-VTOL loiter
|
||||
auto_state.vtol_loiter = false;
|
||||
|
||||
// log when new commands start
|
||||
#if AP_TERRAIN_AVAILABLE
|
||||
plane.target_altitude.terrain_following_pending = false;
|
||||
#endif
|
||||
|
||||
// log when new commands start
|
||||
if (should_log(MASK_LOG_CMD)) {
|
||||
logger.Write_Mission_Cmd(mission, cmd);
|
||||
}
|
||||
|
@ -56,6 +56,7 @@ bool Mode::enter()
|
||||
plane.guided_state.target_heading_type = GUIDED_HEADING_NONE;
|
||||
plane.guided_state.target_airspeed_cm = -1; // same as above, although an airspeed of -1 is rare on plane.
|
||||
plane.guided_state.target_alt = -1; // same as above, although a target alt of -1 is rare on plane.
|
||||
plane.guided_state.target_alt_time_ms = 0;
|
||||
plane.guided_state.last_target_alt = 0;
|
||||
#endif
|
||||
|
||||
@ -90,6 +91,10 @@ bool Mode::enter()
|
||||
quadplane.mode_enter();
|
||||
#endif
|
||||
|
||||
#if AP_TERRAIN_AVAILABLE
|
||||
plane.target_altitude.terrain_following_pending = false;
|
||||
#endif
|
||||
|
||||
bool enter_result = _enter();
|
||||
|
||||
if (enter_result) {
|
||||
|
@ -42,8 +42,7 @@ bool ModeLoiter::isHeadingLinedUp(const Location loiterCenterLoc, const Location
|
||||
// Return true if current heading is aligned to vector to targetLoc.
|
||||
// Tolerance is initially 10 degrees and grows at 10 degrees for each loiter circle completed.
|
||||
|
||||
const uint16_t loiterRadius = abs(plane.aparm.loiter_radius);
|
||||
if (loiterCenterLoc.get_distance(targetLoc) < loiterRadius + loiterRadius*0.05) {
|
||||
if (loiterCenterLoc.get_distance(targetLoc) < 1.05f * fabsf(plane.loiter.radius)) {
|
||||
/* Whenever next waypoint is within the loiter radius plus 5%,
|
||||
maintaining loiter would prevent us from ever pointing toward the next waypoint.
|
||||
Hence break out of loiter immediately
|
||||
|
@ -40,7 +40,7 @@ const AP_Param::GroupInfo ModeTakeoff::var_info[] = {
|
||||
// @Units: m
|
||||
// @User: Standard
|
||||
AP_GROUPINFO("DIST", 4, ModeTakeoff, target_dist, 200),
|
||||
|
||||
|
||||
// @Param: GND_PITCH
|
||||
// @DisplayName: Takeoff run pitch demand
|
||||
// @Description: Degrees of pitch angle demanded during the takeoff run before speed reaches TKOFF_ROTATE_SPD. For taildraggers set to 3-point ground pitch angle and use TKOFF_TDRAG_ELEV to prevent nose tipover. For nose-wheel steer aircraft set to the ground pitch angle and if a reduction in nose-wheel load is required as speed rises, use a positive offset in TKOFF_GND_PITCH of up to 5 degrees above the angle on ground, starting at the mesured pitch angle and incrementing in 1 degree steps whilst checking for premature rotation and takeoff with each increment. To increase nose-wheel load, use a negative TKOFF_TDRAG_ELEV and refer to notes on TKOFF_TDRAG_ELEV before making adjustments.
|
||||
@ -68,61 +68,75 @@ bool ModeTakeoff::_enter()
|
||||
|
||||
void ModeTakeoff::update()
|
||||
{
|
||||
if (!takeoff_started) {
|
||||
// see if we will skip takeoff as already flying
|
||||
if (plane.is_flying() && (millis() - plane.started_flying_ms > 10000U) && ahrs.groundspeed() > 3) {
|
||||
gcs().send_text(MAV_SEVERITY_INFO, "Takeoff skipped - circling");
|
||||
plane.prev_WP_loc = plane.current_loc;
|
||||
plane.next_WP_loc = plane.current_loc;
|
||||
takeoff_started = true;
|
||||
plane.set_flight_stage(AP_FixedWing::FlightStage::NORMAL);
|
||||
}
|
||||
// don't setup waypoints if we dont have a valid position and home!
|
||||
if (!(plane.current_loc.initialised() && AP::ahrs().home_is_set())) {
|
||||
plane.calc_nav_roll();
|
||||
plane.calc_nav_pitch();
|
||||
SRV_Channels::set_output_scaled(SRV_Channel::k_throttle, 0.0);
|
||||
return;
|
||||
}
|
||||
|
||||
const float alt = target_alt;
|
||||
const float dist = target_dist;
|
||||
if (!takeoff_started) {
|
||||
// setup target location 1.5 times loiter radius from the
|
||||
// takeoff point, at a height of TKOFF_ALT
|
||||
const float dist = target_dist;
|
||||
const float alt = target_alt;
|
||||
const uint16_t altitude = plane.relative_ground_altitude(false,true);
|
||||
const float direction = degrees(ahrs.yaw);
|
||||
// see if we will skip takeoff as already flying
|
||||
if (plane.is_flying() && (millis() - plane.started_flying_ms > 10000U) && ahrs.groundspeed() > 3) {
|
||||
if (altitude >= alt) {
|
||||
gcs().send_text(MAV_SEVERITY_INFO, "Above TKOFF alt - loitering");
|
||||
plane.next_WP_loc = plane.current_loc;
|
||||
takeoff_started = true;
|
||||
plane.set_flight_stage(AP_FixedWing::FlightStage::NORMAL);
|
||||
} else {
|
||||
gcs().send_text(MAV_SEVERITY_INFO, "Climbing to TKOFF alt then loitering");
|
||||
plane.next_WP_loc = plane.current_loc;
|
||||
plane.next_WP_loc.alt += ((alt - altitude) *100);
|
||||
plane.next_WP_loc.offset_bearing(direction, dist);
|
||||
takeoff_started = true;
|
||||
plane.set_flight_stage(AP_FixedWing::FlightStage::NORMAL);
|
||||
}
|
||||
// not flying so do a full takeoff sequence
|
||||
} else {
|
||||
// setup target waypoint and alt for loiter at dist and alt from start
|
||||
|
||||
start_loc = plane.current_loc;
|
||||
plane.prev_WP_loc = plane.current_loc;
|
||||
plane.next_WP_loc = plane.current_loc;
|
||||
plane.next_WP_loc.alt += alt*100.0;
|
||||
plane.next_WP_loc.offset_bearing(direction, dist);
|
||||
start_loc = plane.current_loc;
|
||||
plane.prev_WP_loc = plane.current_loc;
|
||||
plane.next_WP_loc = plane.current_loc;
|
||||
plane.next_WP_loc.alt += alt*100.0;
|
||||
plane.next_WP_loc.offset_bearing(direction, dist);
|
||||
|
||||
plane.crash_state.is_crashed = false;
|
||||
plane.crash_state.is_crashed = false;
|
||||
|
||||
plane.auto_state.takeoff_pitch_cd = level_pitch * 100;
|
||||
plane.auto_state.takeoff_pitch_cd = level_pitch * 100;
|
||||
|
||||
plane.set_flight_stage(AP_FixedWing::FlightStage::TAKEOFF);
|
||||
plane.set_flight_stage(AP_FixedWing::FlightStage::TAKEOFF);
|
||||
|
||||
if (!plane.throttle_suppressed) {
|
||||
gcs().send_text(MAV_SEVERITY_INFO, "Takeoff to %.0fm at %.1fm to %.1f deg",
|
||||
alt, dist, direction);
|
||||
takeoff_started = true;
|
||||
if (!plane.throttle_suppressed) {
|
||||
gcs().send_text(MAV_SEVERITY_INFO, "Takeoff to %.0fm for %.1fm heading %.1f deg",
|
||||
alt, dist, direction);
|
||||
takeoff_started = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// we finish the initial level takeoff if we climb past
|
||||
// TKOFF_LVL_ALT or we pass the target location. The check for
|
||||
// target location prevents us flying forever if we can't climb
|
||||
// reset the loiter waypoint target to be correct bearing and dist
|
||||
// from starting location in case original yaw used to set it was off due to EKF
|
||||
// reset or compass interference from max throttle
|
||||
if (plane.flight_stage == AP_FixedWing::FlightStage::TAKEOFF &&
|
||||
(plane.current_loc.alt - start_loc.alt >= level_alt*100 ||
|
||||
start_loc.get_distance(plane.current_loc) >= target_dist)) {
|
||||
// reached level alt, re-calculate bearing to cope with systems with no compass
|
||||
// or with poor initial compass
|
||||
float direction = start_loc.get_bearing_to(plane.current_loc) * 0.01;
|
||||
float dist_done = start_loc.get_distance(plane.current_loc);
|
||||
const float dist = target_dist;
|
||||
|
||||
plane.next_WP_loc = plane.current_loc;
|
||||
plane.next_WP_loc.offset_bearing(direction, MAX(dist-dist_done, 0));
|
||||
plane.next_WP_loc.alt = start_loc.alt + target_alt*100.0;
|
||||
start_loc.get_distance(plane.current_loc) >= dist)) {
|
||||
// reset the target loiter waypoint using current yaw which should be close to correct starting heading
|
||||
const float direction = start_loc.get_bearing_to(plane.current_loc) * 0.01;
|
||||
plane.next_WP_loc = start_loc;
|
||||
plane.next_WP_loc.offset_bearing(direction, dist);
|
||||
plane.next_WP_loc.alt += alt*100.0;
|
||||
|
||||
plane.set_flight_stage(AP_FixedWing::FlightStage::NORMAL);
|
||||
|
||||
|
||||
#if AP_FENCE_ENABLED
|
||||
plane.fence.auto_enable_fence_after_takeoff();
|
||||
#endif
|
||||
|
@ -344,6 +344,9 @@ void Plane::update_loiter(uint16_t radius)
|
||||
}
|
||||
}
|
||||
|
||||
// the radius actually being used by the controller is required by other functions
|
||||
loiter.radius = (float)radius;
|
||||
|
||||
update_loiter_update_nav(radius);
|
||||
|
||||
if (loiter.start_time_ms == 0) {
|
||||
|
@ -1546,7 +1546,8 @@ void SLT_Transition::update()
|
||||
quadplane.assisted_flight = true;
|
||||
// update transition state for vehicles using airspeed wait
|
||||
if (!in_forced_transition) {
|
||||
if (transition_state != TRANSITION_AIRSPEED_WAIT) {
|
||||
const bool show_message = transition_state != TRANSITION_AIRSPEED_WAIT || transition_start_ms == 0;
|
||||
if (show_message) {
|
||||
gcs().send_text(MAV_SEVERITY_INFO, "Transition started airspeed %.1f", (double)aspeed);
|
||||
}
|
||||
transition_state = TRANSITION_AIRSPEED_WAIT;
|
||||
@ -2406,7 +2407,7 @@ void QuadPlane::vtol_position_controller(void)
|
||||
const float aspeed_threshold = MAX(plane.aparm.airspeed_min-2, assist_speed);
|
||||
|
||||
// run fixed wing navigation
|
||||
plane.nav_controller->update_waypoint(plane.current_loc, loc);
|
||||
plane.nav_controller->update_waypoint(plane.auto_state.crosstrack ? plane.prev_WP_loc : plane.current_loc, loc);
|
||||
|
||||
// use TECS for throttle
|
||||
SRV_Channels::set_output_scaled(SRV_Channel::k_throttle, plane.TECS_controller.get_throttle_demand());
|
||||
@ -2473,10 +2474,11 @@ void QuadPlane::vtol_position_controller(void)
|
||||
const uint32_t min_airbrake_ms = 1000;
|
||||
if (poscontrol.get_state() == QPOS_AIRBRAKE &&
|
||||
poscontrol.time_since_state_start_ms() > min_airbrake_ms &&
|
||||
(aspeed < aspeed_threshold ||
|
||||
fabsf(degrees(closing_vel.angle(desired_closing_vel))) > 60 ||
|
||||
closing_speed > MAX(desired_closing_speed*1.2, desired_closing_speed+2) ||
|
||||
labs(plane.ahrs.roll_sensor - plane.nav_roll_cd) > attitude_error_threshold_cd ||
|
||||
(aspeed < aspeed_threshold || // too low airspeed
|
||||
fabsf(degrees(closing_vel.angle(desired_closing_vel))) > 60 || // wrong direction
|
||||
closing_speed > MAX(desired_closing_speed*1.2, desired_closing_speed+2) || // too fast
|
||||
closing_speed < desired_closing_speed*0.5 || // too slow ground speed
|
||||
labs(plane.ahrs.roll_sensor - plane.nav_roll_cd) > attitude_error_threshold_cd || // bad attitude
|
||||
labs(plane.ahrs.pitch_sensor - plane.nav_pitch_cd) > attitude_error_threshold_cd)) {
|
||||
gcs().send_text(MAV_SEVERITY_INFO,"VTOL position1 v=%.1f d=%.1f h=%.1f dc=%.1f",
|
||||
(double)groundspeed,
|
||||
@ -2488,6 +2490,18 @@ void QuadPlane::vtol_position_controller(void)
|
||||
|
||||
// switch to vfwd for throttle control
|
||||
vel_forward.integrator = SRV_Channels::get_output_scaled(SRV_Channel::k_throttle);
|
||||
|
||||
// adjust the initial forward throttle based on our desired and actual closing speed
|
||||
// this allows for significant initial forward throttle
|
||||
// when we have a strong headwind, but low throttle in the usual case where
|
||||
// we want to slow down ready for POSITION2
|
||||
vel_forward.integrator = linear_interpolate(0, vel_forward.integrator,
|
||||
closing_speed,
|
||||
1.2*desired_closing_speed, 0.5*desired_closing_speed);
|
||||
|
||||
// limit our initial forward throttle in POSITION1 to be 0.5 of cruise throttle
|
||||
vel_forward.integrator = constrain_float(vel_forward.integrator, 0, plane.aparm.throttle_cruise*0.5);
|
||||
|
||||
vel_forward.last_ms = now_ms;
|
||||
}
|
||||
|
||||
@ -2807,7 +2821,7 @@ void QuadPlane::vtol_position_controller(void)
|
||||
if (plane.control_mode == &plane.mode_guided || vtol_loiter_auto) {
|
||||
plane.ahrs.get_location(plane.current_loc);
|
||||
int32_t target_altitude_cm;
|
||||
if (!plane.next_WP_loc.get_alt_cm(Location::AltFrame::ABOVE_HOME,target_altitude_cm)) {
|
||||
if (!plane.next_WP_loc.get_alt_cm(Location::AltFrame::ABOVE_ORIGIN,target_altitude_cm)) {
|
||||
break;
|
||||
}
|
||||
if (poscontrol.slow_descent &&
|
||||
@ -2815,7 +2829,7 @@ void QuadPlane::vtol_position_controller(void)
|
||||
// gradually descend as we approach target
|
||||
plane.auto_state.wp_proportion = plane.current_loc.line_path_proportion(plane.prev_WP_loc, plane.next_WP_loc);
|
||||
int32_t prev_alt;
|
||||
if (plane.prev_WP_loc.get_alt_cm(Location::AltFrame::ABOVE_HOME,prev_alt)) {
|
||||
if (plane.prev_WP_loc.get_alt_cm(Location::AltFrame::ABOVE_ORIGIN,prev_alt)) {
|
||||
target_altitude_cm = linear_interpolate(prev_alt,
|
||||
target_altitude_cm,
|
||||
plane.auto_state.wp_proportion,
|
||||
@ -2932,6 +2946,10 @@ void QuadPlane::setup_target_position(void)
|
||||
*/
|
||||
void QuadPlane::takeoff_controller(void)
|
||||
{
|
||||
// reset fixed wing controller to neutral as base output
|
||||
plane.nav_roll_cd = 0;
|
||||
plane.nav_pitch_cd = 0;
|
||||
|
||||
if (!plane.arming.is_armed_and_safety_off()) {
|
||||
return;
|
||||
}
|
||||
@ -2949,7 +2967,7 @@ void QuadPlane::takeoff_controller(void)
|
||||
// don't takeoff up until rudder is re-centered after rudder arming
|
||||
if (plane.arming.last_arm_method() == AP_Arming::Method::RUDDER &&
|
||||
(takeoff_last_run_ms == 0 ||
|
||||
now - takeoff_last_run_ms < 1000) &&
|
||||
now - takeoff_last_run_ms > 1000) &&
|
||||
!plane.seen_neutral_rudder &&
|
||||
spool_state <= AP_Motors::DesiredSpoolState::GROUND_IDLE) {
|
||||
// start motor spinning if not spinning already so user sees it is armed
|
||||
@ -2993,8 +3011,6 @@ void QuadPlane::takeoff_controller(void)
|
||||
takeoff_last_run_ms = now;
|
||||
|
||||
if (no_navigation) {
|
||||
plane.nav_roll_cd = 0;
|
||||
plane.nav_pitch_cd = 0;
|
||||
pos_control->relax_velocity_controller_xy();
|
||||
} else {
|
||||
pos_control->set_accel_desired_xy_cmss(zero);
|
||||
@ -3227,7 +3243,8 @@ bool QuadPlane::do_vtol_land(const AP_Mission::Mission_Command& cmd)
|
||||
plane.crash_state.is_crashed = false;
|
||||
|
||||
// also update nav_controller for status output
|
||||
plane.nav_controller->update_waypoint(plane.current_loc, plane.next_WP_loc);
|
||||
plane.nav_controller->update_waypoint(plane.auto_state.crosstrack ? plane.prev_WP_loc : plane.current_loc,
|
||||
plane.next_WP_loc);
|
||||
|
||||
poscontrol_init_approach();
|
||||
return true;
|
||||
@ -4098,6 +4115,10 @@ Vector2f QuadPlane::landing_desired_closing_velocity()
|
||||
float tecs_land_airspeed = plane.TECS_controller.get_land_airspeed();
|
||||
if (is_positive(tecs_land_airspeed)) {
|
||||
land_speed = tecs_land_airspeed;
|
||||
} else {
|
||||
// use half way between min airspeed and cruise if
|
||||
// TECS_LAND_AIRSPEED not set
|
||||
land_speed = 0.5*(land_speed+plane.aparm.airspeed_min);
|
||||
}
|
||||
target_speed = MIN(target_speed, eas2tas * land_speed);
|
||||
|
||||
@ -4139,12 +4160,16 @@ float QuadPlane::get_land_airspeed(void)
|
||||
return approach_speed;
|
||||
}
|
||||
|
||||
if (qstate == QPOS_AIRBRAKE) {
|
||||
// during airbraking ask TECS to slow us to stall speed
|
||||
return plane.aparm.airspeed_min;
|
||||
}
|
||||
|
||||
// calculate speed based on landing desired velocity
|
||||
Vector2f vel = landing_desired_closing_velocity();
|
||||
const Vector3f wind = plane.ahrs.wind_estimate();
|
||||
const Vector2f wind = plane.ahrs.wind_estimate().xy();
|
||||
const float eas2tas = plane.ahrs.get_EAS2TAS();
|
||||
vel.x -= wind.x;
|
||||
vel.y -= wind.y;
|
||||
vel -= wind;
|
||||
vel /= eas2tas;
|
||||
return vel.length();
|
||||
}
|
||||
@ -4529,4 +4554,20 @@ bool QuadPlane::abort_landing(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
return true if we should disable TECS in the current flight state
|
||||
this ensures that TECS resets when we change height in a VTOL mode
|
||||
*/
|
||||
bool QuadPlane::should_disable_TECS() const
|
||||
{
|
||||
if (in_vtol_land_descent()) {
|
||||
return true;
|
||||
}
|
||||
if (plane.control_mode == &plane.mode_guided &&
|
||||
plane.auto_state.vtol_loiter) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif // HAL_QUADPLANE_ENABLED
|
||||
|
@ -180,6 +180,12 @@ public:
|
||||
*/
|
||||
bool in_vtol_land_descent(void) const;
|
||||
|
||||
/*
|
||||
should we disable the TECS controller?
|
||||
only called when in an auto-throttle mode
|
||||
*/
|
||||
bool should_disable_TECS() const;
|
||||
|
||||
private:
|
||||
AP_AHRS &ahrs;
|
||||
|
||||
|
@ -6,14 +6,14 @@
|
||||
|
||||
#include "ap_version.h"
|
||||
|
||||
#define THISFIRMWARE "ArduPlane V4.4.0-dev"
|
||||
#define THISFIRMWARE "ArduPlane V4.4.4"
|
||||
|
||||
// the following line is parsed by the autotest scripts
|
||||
#define FIRMWARE_VERSION 4,4,0,FIRMWARE_VERSION_TYPE_DEV
|
||||
#define FIRMWARE_VERSION 4,4,4,FIRMWARE_VERSION_TYPE_OFFICIAL
|
||||
|
||||
#define FW_MAJOR 4
|
||||
#define FW_MINOR 4
|
||||
#define FW_PATCH 0
|
||||
#define FW_TYPE FIRMWARE_VERSION_TYPE_DEV
|
||||
#define FW_PATCH 4
|
||||
#define FW_TYPE FIRMWARE_VERSION_TYPE_OFFICIAL
|
||||
|
||||
#include <AP_Common/AP_FWVersionDefine.h>
|
||||
|
@ -8,6 +8,7 @@ public:
|
||||
|
||||
using GCS_MAVLINK::GCS_MAVLINK;
|
||||
|
||||
uint8_t sysid_my_gcs() const override;
|
||||
protected:
|
||||
|
||||
uint32_t telem_delay() const override {
|
||||
@ -16,8 +17,6 @@ protected:
|
||||
|
||||
MAV_RESULT handle_flight_termination(const mavlink_command_long_t &packet) override;
|
||||
|
||||
uint8_t sysid_my_gcs() const override;
|
||||
|
||||
MAV_RESULT handle_command_do_set_roi(const Location &roi_loc) override;
|
||||
MAV_RESULT _handle_command_preflight_calibration_baro(const mavlink_message_t &msg) override;
|
||||
MAV_RESULT _handle_command_preflight_calibration(const mavlink_command_long_t &packet, const mavlink_message_t &msg) override;
|
||||
|
@ -25,10 +25,10 @@ public:
|
||||
|
||||
bool vehicle_initialised() const override;
|
||||
|
||||
protected:
|
||||
|
||||
uint8_t sysid_this_mav() const override;
|
||||
|
||||
protected:
|
||||
|
||||
// minimum amount of time (in microseconds) that must remain in
|
||||
// the main scheduler loop before we are allowed to send any
|
||||
// mavlink messages. We want to prioritise the main flight
|
||||
|
@ -27,7 +27,7 @@ const AP_Param::Info Rover::var_info[] = {
|
||||
// @Param: INITIAL_MODE
|
||||
// @DisplayName: Initial driving mode
|
||||
// @Description: This selects the mode to start in on boot. This is useful for when you want to start in AUTO mode on boot without a receiver. Usually used in combination with when AUTO_TRIGGER_PIN or AUTO_KICKSTART.
|
||||
// @Values: 0:Manual,1:Acro,3:Steering,4:Hold,5:Loiter,6:Follow,7:Simple,10:Auto,11:RTL,12:SmartRTL,15:Guided
|
||||
// @CopyValuesFrom: MODE1
|
||||
// @User: Advanced
|
||||
GSCALAR(initial_mode, "INITIAL_MODE", Mode::Number::MANUAL),
|
||||
|
||||
@ -171,7 +171,7 @@ const AP_Param::Info Rover::var_info[] = {
|
||||
|
||||
// @Param: MODE1
|
||||
// @DisplayName: Mode1
|
||||
// @Values: 0:Manual,1:Acro,3:Steering,4:Hold,5:Loiter,6:Follow,7:Simple,10:Auto,11:RTL,12:SmartRTL,15:Guided
|
||||
// @Values: 0:Manual,1:Acro,3:Steering,4:Hold,5:Loiter,6:Follow,7:Simple,8:Dock,9:Circle,10:Auto,11:RTL,12:SmartRTL,15:Guided
|
||||
// @User: Standard
|
||||
// @Description: Driving mode for switch position 1 (910 to 1230 and above 2049)
|
||||
GSCALAR(mode1, "MODE1", Mode::Number::MANUAL),
|
||||
@ -692,6 +692,10 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = {
|
||||
// @User: Standard
|
||||
AP_GROUPINFO("FS_GCS_TIMEOUT", 56, ParametersG2, fs_gcs_timeout, 5),
|
||||
|
||||
// @Group: CIRC
|
||||
// @Path: mode_circle.cpp
|
||||
AP_SUBGROUPINFO(mode_circle, "CIRC", 57, ParametersG2, ModeCircle),
|
||||
|
||||
AP_GROUPEND
|
||||
};
|
||||
|
||||
|
@ -436,6 +436,8 @@ public:
|
||||
|
||||
// FS GCS timeout trigger time
|
||||
AP_Float fs_gcs_timeout;
|
||||
|
||||
class ModeCircle mode_circle;
|
||||
};
|
||||
|
||||
extern const AP_Param::Info var_info[];
|
||||
|
@ -204,6 +204,14 @@ bool Rover::set_steering_and_throttle(float steering, float throttle)
|
||||
return true;
|
||||
}
|
||||
|
||||
// get steering and throttle (-1 to +1) (for use by scripting)
|
||||
bool Rover::get_steering_and_throttle(float& steering, float& throttle)
|
||||
{
|
||||
steering = g2.motors.get_steering() / 4500.0;
|
||||
throttle = g2.motors.get_throttle() * 0.01;
|
||||
return true;
|
||||
}
|
||||
|
||||
// set desired turn rate (degrees/sec) and speed (m/s). Used for scripting
|
||||
bool Rover::set_desired_turn_rate_and_speed(float turn_rate, float speed)
|
||||
{
|
||||
|
@ -82,6 +82,7 @@ public:
|
||||
friend class Mode;
|
||||
friend class ModeAcro;
|
||||
friend class ModeAuto;
|
||||
friend class ModeCircle;
|
||||
friend class ModeGuided;
|
||||
friend class ModeHold;
|
||||
friend class ModeLoiter;
|
||||
@ -256,6 +257,7 @@ private:
|
||||
bool set_target_location(const Location& target_loc) override;
|
||||
bool set_target_velocity_NED(const Vector3f& vel_ned) override;
|
||||
bool set_steering_and_throttle(float steering, float throttle) override;
|
||||
bool get_steering_and_throttle(float& steering, float& throttle) override;
|
||||
// set desired turn rate (degrees/sec) and speed (m/s). Used for scripting
|
||||
bool set_desired_turn_rate_and_speed(float turn_rate, float speed) override;
|
||||
bool set_desired_speed(float speed) override;
|
||||
|
@ -537,6 +537,9 @@ Mode *Rover::mode_from_mode_num(const enum Mode::Number num)
|
||||
case Mode::Number::SIMPLE:
|
||||
ret = &mode_simple;
|
||||
break;
|
||||
case Mode::Number::CIRCLE:
|
||||
ret = &g2.mode_circle;
|
||||
break;
|
||||
case Mode::Number::AUTO:
|
||||
ret = &mode_auto;
|
||||
break;
|
||||
|
99
Rover/mode.h
99
Rover/mode.h
@ -22,6 +22,7 @@ public:
|
||||
#if MODE_DOCK_ENABLED == ENABLED
|
||||
DOCK = 8,
|
||||
#endif
|
||||
CIRCLE = 9,
|
||||
AUTO = 10,
|
||||
RTL = 11,
|
||||
SMART_RTL = 12,
|
||||
@ -252,6 +253,12 @@ public:
|
||||
// return if external control is allowed in this mode (Guided or Guided-within-Auto)
|
||||
bool in_guided_mode() const override { return _submode == Auto_Guided || _submode == Auto_NavScriptTime; }
|
||||
|
||||
// return heading (in degrees) and cross track error (in meters) for reporting to ground station (NAV_CONTROLLER_OUTPUT message)
|
||||
float wp_bearing() const override;
|
||||
float nav_bearing() const override;
|
||||
float crosstrack_error() const override;
|
||||
float get_desired_lat_accel() const override;
|
||||
|
||||
// return distance (in meters) to destination
|
||||
float get_distance_to_destination() const override;
|
||||
|
||||
@ -295,6 +302,7 @@ protected:
|
||||
Auto_Guided, // handover control to external navigation system from within auto mode
|
||||
Auto_Stop, // stop the vehicle as quickly as possible
|
||||
Auto_NavScriptTime, // accept targets from lua scripts while NAV_SCRIPT_TIME commands are executing
|
||||
Auto_Circle, // circle a given location
|
||||
} _submode;
|
||||
|
||||
private:
|
||||
@ -322,6 +330,8 @@ private:
|
||||
bool verify_loiter_time(const AP_Mission::Mission_Command& cmd);
|
||||
bool verify_nav_guided_enable(const AP_Mission::Mission_Command& cmd);
|
||||
bool verify_nav_set_yaw_speed();
|
||||
bool do_circle(const AP_Mission::Mission_Command& cmd);
|
||||
bool verify_circle(const AP_Mission::Mission_Command& cmd);
|
||||
void do_wait_delay(const AP_Mission::Mission_Command& cmd);
|
||||
void do_within_distance(const AP_Mission::Mission_Command& cmd);
|
||||
bool verify_wait_delay();
|
||||
@ -385,6 +395,95 @@ private:
|
||||
AP_Mission_ChangeDetector mis_change_detector;
|
||||
};
|
||||
|
||||
class ModeCircle : public Mode
|
||||
{
|
||||
public:
|
||||
|
||||
// need a constructor for parameters
|
||||
ModeCircle();
|
||||
|
||||
// Does not allow copies
|
||||
CLASS_NO_COPY(ModeCircle);
|
||||
|
||||
uint32_t mode_number() const override { return CIRCLE; }
|
||||
const char *name4() const override { return "CIRC"; }
|
||||
|
||||
// initialise with specific center location, radius (in meters) and direction
|
||||
// replaces use of _enter when initialised from within Auto mode
|
||||
bool set_center(const Location& center_loc, float radius_m, bool dir_ccw);
|
||||
|
||||
// methods that affect movement of the vehicle in this mode
|
||||
void update() override;
|
||||
|
||||
bool is_autopilot_mode() const override { return true; }
|
||||
|
||||
// return desired heading (in degrees) and cross track error (in meters) for reporting to ground station (NAV_CONTROLLER_OUTPUT message)
|
||||
float wp_bearing() const override;
|
||||
float nav_bearing() const override;
|
||||
float crosstrack_error() const override { return dist_to_edge_m; }
|
||||
float get_desired_lat_accel() const override;
|
||||
|
||||
// set desired speed in m/s
|
||||
bool set_desired_speed(float speed_ms) override;
|
||||
|
||||
// return distance (in meters) to destination
|
||||
float get_distance_to_destination() const override { return _distance_to_destination; }
|
||||
|
||||
// get or set desired location
|
||||
bool get_desired_location(Location& destination) const override WARN_IF_UNUSED;
|
||||
|
||||
// return total angle in radians that vehicle has circled
|
||||
// fabsf is used so that full rotations in either direction are counted
|
||||
float get_angle_total_rad() const { return fabsf(angle_total_rad); }
|
||||
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
protected:
|
||||
|
||||
AP_Float radius; // circle radius in meters
|
||||
AP_Float speed; // vehicle speed in m/s. If zero uses WP_SPEED
|
||||
AP_Int8 direction; // direction 0:clockwise, 1:counter-clockwise
|
||||
|
||||
// initialise mode
|
||||
bool _enter() override;
|
||||
|
||||
// initialise target_yaw_rad using the vehicle's position and yaw
|
||||
// if there is no current position estimate target_yaw_rad is set to vehicle yaw
|
||||
void init_target_yaw_rad();
|
||||
|
||||
// limit config speed so that lateral acceleration is within limits
|
||||
// outputs warning to user if speed is reduced
|
||||
void check_config_speed();
|
||||
|
||||
// ensure config radius is no smaller then vehicle's TURN_RADIUS
|
||||
// radius is increased if necessary and warning is output to the user
|
||||
void check_config_radius();
|
||||
|
||||
// enum for Direction parameter
|
||||
enum class Direction {
|
||||
CW = 0,
|
||||
CCW = 1
|
||||
};
|
||||
|
||||
// local members
|
||||
struct {
|
||||
Location center_loc; // circle center as a Location
|
||||
Vector2f center_pos; // circle center as an offset (in meters) from the EKF origin
|
||||
float radius; // circle radius
|
||||
float speed; // desired speed around circle in m/s
|
||||
Direction dir; // direction, 0:clockwise, 1:counter-clockwise
|
||||
} config;
|
||||
struct {
|
||||
float speed; // vehicle's target speed around circle in m/s
|
||||
float yaw_rad; // earth-frame angle of tarrget point on the circle
|
||||
Vector2p pos; // latest position target sent to position controller
|
||||
Vector2f vel; // latest velocity target sent to position controller
|
||||
Vector2f accel; // latest accel target sent to position controller
|
||||
} target;
|
||||
float angle_total_rad; // total angle in radians that vehicle has circled
|
||||
bool reached_edge; // true once vehicle has reached edge of circle
|
||||
float dist_to_edge_m; // distance to edge of circle in meters (equivalent to crosstrack error)
|
||||
};
|
||||
|
||||
class ModeGuided : public Mode
|
||||
{
|
||||
|
@ -76,21 +76,15 @@ void ModeAuto::update()
|
||||
switch (_submode) {
|
||||
case Auto_WP:
|
||||
{
|
||||
// check if we've reached the destination
|
||||
if (!g2.wp_nav.reached_destination() || g2.wp_nav.is_fast_waypoint()) {
|
||||
// update navigation controller
|
||||
// boats loiter once the waypoint is reached
|
||||
bool keep_navigating = true;
|
||||
if (rover.is_boat() && g2.wp_nav.reached_destination() && !g2.wp_nav.is_fast_waypoint()) {
|
||||
keep_navigating = !start_loiter();
|
||||
}
|
||||
|
||||
// update navigation controller
|
||||
if (keep_navigating) {
|
||||
navigate_to_waypoint();
|
||||
} else {
|
||||
// we have reached the destination so stay here
|
||||
if (rover.is_boat()) {
|
||||
if (!start_loiter()) {
|
||||
start_stop();
|
||||
}
|
||||
} else {
|
||||
start_stop();
|
||||
}
|
||||
// update distance to destination
|
||||
_distance_to_destination = rover.current_loc.get_distance(g2.wp_nav.get_destination());
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -139,6 +133,10 @@ void ModeAuto::update()
|
||||
case Auto_NavScriptTime:
|
||||
rover.mode_guided.update();
|
||||
break;
|
||||
|
||||
case Auto_Circle:
|
||||
rover.g2.mode_circle.update();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -152,6 +150,102 @@ void ModeAuto::calc_throttle(float target_speed, bool avoidance_enabled)
|
||||
Mode::calc_throttle(target_speed, avoidance_enabled);
|
||||
}
|
||||
|
||||
// return heading (in degrees) to target destination (aka waypoint)
|
||||
float ModeAuto::wp_bearing() const
|
||||
{
|
||||
switch (_submode) {
|
||||
case Auto_WP:
|
||||
return g2.wp_nav.wp_bearing_cd() * 0.01f;
|
||||
case Auto_HeadingAndSpeed:
|
||||
case Auto_Stop:
|
||||
return 0.0f;
|
||||
case Auto_RTL:
|
||||
return rover.mode_rtl.wp_bearing();
|
||||
case Auto_Loiter:
|
||||
return rover.mode_loiter.wp_bearing();
|
||||
case Auto_Guided:
|
||||
case Auto_NavScriptTime:
|
||||
return rover.mode_guided.wp_bearing();
|
||||
case Auto_Circle:
|
||||
return rover.g2.mode_circle.wp_bearing();
|
||||
}
|
||||
|
||||
// this line should never be reached
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
// return short-term target heading in degrees (i.e. target heading back to line between waypoints)
|
||||
float ModeAuto::nav_bearing() const
|
||||
{
|
||||
switch (_submode) {
|
||||
case Auto_WP:
|
||||
return g2.wp_nav.nav_bearing_cd() * 0.01f;
|
||||
case Auto_HeadingAndSpeed:
|
||||
case Auto_Stop:
|
||||
return 0.0f;
|
||||
case Auto_RTL:
|
||||
return rover.mode_rtl.nav_bearing();
|
||||
case Auto_Loiter:
|
||||
return rover.mode_loiter.nav_bearing();
|
||||
case Auto_Guided:
|
||||
case Auto_NavScriptTime:
|
||||
return rover.mode_guided.nav_bearing();
|
||||
case Auto_Circle:
|
||||
return rover.g2.mode_circle.nav_bearing();
|
||||
}
|
||||
|
||||
// this line should never be reached
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
// return cross track error (i.e. vehicle's distance from the line between waypoints)
|
||||
float ModeAuto::crosstrack_error() const
|
||||
{
|
||||
switch (_submode) {
|
||||
case Auto_WP:
|
||||
return g2.wp_nav.crosstrack_error();
|
||||
case Auto_HeadingAndSpeed:
|
||||
case Auto_Stop:
|
||||
return 0.0f;
|
||||
case Auto_RTL:
|
||||
return rover.mode_rtl.crosstrack_error();
|
||||
case Auto_Loiter:
|
||||
return rover.mode_loiter.crosstrack_error();
|
||||
case Auto_Guided:
|
||||
case Auto_NavScriptTime:
|
||||
return rover.mode_guided.crosstrack_error();
|
||||
case Auto_Circle:
|
||||
return rover.g2.mode_circle.crosstrack_error();
|
||||
}
|
||||
|
||||
// this line should never be reached
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
// return desired lateral acceleration
|
||||
float ModeAuto::get_desired_lat_accel() const
|
||||
{
|
||||
switch (_submode) {
|
||||
case Auto_WP:
|
||||
return g2.wp_nav.get_lat_accel();
|
||||
case Auto_HeadingAndSpeed:
|
||||
case Auto_Stop:
|
||||
return 0.0f;
|
||||
case Auto_RTL:
|
||||
return rover.mode_rtl.get_desired_lat_accel();
|
||||
case Auto_Loiter:
|
||||
return rover.mode_loiter.get_desired_lat_accel();
|
||||
case Auto_Guided:
|
||||
case Auto_NavScriptTime:
|
||||
return rover.mode_guided.get_desired_lat_accel();
|
||||
case Auto_Circle:
|
||||
return rover.g2.mode_circle.get_desired_lat_accel();
|
||||
}
|
||||
|
||||
// this line should never be reached
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
// return distance (in meters) to destination
|
||||
float ModeAuto::get_distance_to_destination() const
|
||||
{
|
||||
@ -169,6 +263,8 @@ float ModeAuto::get_distance_to_destination() const
|
||||
case Auto_Guided:
|
||||
case Auto_NavScriptTime:
|
||||
return rover.mode_guided.get_distance_to_destination();
|
||||
case Auto_Circle:
|
||||
return rover.g2.mode_circle.get_distance_to_destination();
|
||||
}
|
||||
|
||||
// this line should never be reached
|
||||
@ -195,7 +291,9 @@ bool ModeAuto::get_desired_location(Location& destination) const
|
||||
return rover.mode_loiter.get_desired_location(destination);
|
||||
case Auto_Guided:
|
||||
case Auto_NavScriptTime:
|
||||
return rover.mode_guided.get_desired_location(destination);\
|
||||
return rover.mode_guided.get_desired_location(destination);
|
||||
case Auto_Circle:
|
||||
return rover.g2.mode_circle.get_desired_location(destination);
|
||||
}
|
||||
|
||||
// we should never reach here but just in case
|
||||
@ -236,7 +334,8 @@ bool ModeAuto::reached_destination() const
|
||||
case Auto_Guided:
|
||||
case Auto_NavScriptTime:
|
||||
return rover.mode_guided.reached_destination();
|
||||
break;
|
||||
case Auto_Circle:
|
||||
return rover.g2.mode_circle.reached_destination();
|
||||
}
|
||||
|
||||
// we should never reach here but just in case, return true to allow missions to continue
|
||||
@ -260,6 +359,8 @@ bool ModeAuto::set_desired_speed(float speed)
|
||||
case Auto_Guided:
|
||||
case Auto_NavScriptTime:
|
||||
return rover.mode_guided.set_desired_speed(speed);
|
||||
case Auto_Circle:
|
||||
return rover.g2.mode_circle.set_desired_speed(speed);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -422,6 +523,9 @@ bool ModeAuto::start_command(const AP_Mission::Mission_Command& cmd)
|
||||
case MAV_CMD_NAV_LOITER_TIME: // Loiter for specified time
|
||||
return do_nav_wp(cmd, true);
|
||||
|
||||
case MAV_CMD_NAV_LOITER_TURNS:
|
||||
return do_circle(cmd);
|
||||
|
||||
case MAV_CMD_NAV_GUIDED_ENABLE: // accept navigation commands from external nav computer
|
||||
do_nav_guided_enable(cmd);
|
||||
break;
|
||||
@ -564,6 +668,9 @@ bool ModeAuto::verify_command(const AP_Mission::Mission_Command& cmd)
|
||||
case MAV_CMD_NAV_LOITER_UNLIM:
|
||||
return verify_loiter_unlimited(cmd);
|
||||
|
||||
case MAV_CMD_NAV_LOITER_TURNS:
|
||||
return verify_circle(cmd);
|
||||
|
||||
case MAV_CMD_NAV_LOITER_TIME:
|
||||
return verify_loiter_time(cmd);
|
||||
|
||||
@ -802,6 +909,34 @@ bool ModeAuto::verify_nav_set_yaw_speed()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ModeAuto::do_circle(const AP_Mission::Mission_Command& cmd)
|
||||
{
|
||||
// retrieve and sanitize target location
|
||||
Location circle_center = cmd.content.location;
|
||||
circle_center.sanitize(rover.current_loc);
|
||||
|
||||
// calculate radius
|
||||
uint16_t circle_radius_m = HIGHBYTE(cmd.p1); // circle radius held in high byte of p1
|
||||
if (cmd.id == MAV_CMD_NAV_LOITER_TURNS &&
|
||||
cmd.type_specific_bits & (1U << 0)) {
|
||||
// special storage handling allows for larger radii
|
||||
circle_radius_m *= 10;
|
||||
}
|
||||
|
||||
// initialise circle mode
|
||||
if (g2.mode_circle.set_center(circle_center, circle_radius_m, cmd.content.location.loiter_ccw)) {
|
||||
_submode = Auto_Circle;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ModeAuto::verify_circle(const AP_Mission::Mission_Command& cmd)
|
||||
{
|
||||
// check if we have completed circling
|
||||
return ((g2.mode_circle.get_angle_total_rad() / M_2PI) >= LOWBYTE(cmd.p1));
|
||||
}
|
||||
|
||||
/********************************************************************************/
|
||||
// Condition (May) commands
|
||||
/********************************************************************************/
|
||||
|
273
Rover/mode_circle.cpp
Normal file
273
Rover/mode_circle.cpp
Normal file
@ -0,0 +1,273 @@
|
||||
#include "Rover.h"
|
||||
|
||||
#define AR_CIRCLE_ACCEL_DEFAULT 1.0 // default acceleration in m/s/s if not specified by user
|
||||
#define AR_CIRCLE_RADIUS_MIN 0.5 // minimum radius in meters
|
||||
#define AR_CIRCLE_REACHED_EDGE_DIST 0.2 // vehicle has reached edge if within 0.2m
|
||||
|
||||
const AP_Param::GroupInfo ModeCircle::var_info[] = {
|
||||
|
||||
// @Param: _RADIUS
|
||||
// @DisplayName: Circle Radius
|
||||
// @Description: Vehicle will circle the center at this distance
|
||||
// @Units: m
|
||||
// @Range: 0 100
|
||||
// @Increment: 1
|
||||
// @User: Standard
|
||||
AP_GROUPINFO("_RADIUS", 1, ModeCircle, radius, 20),
|
||||
|
||||
// @Param: _SPEED
|
||||
// @DisplayName: Circle Speed
|
||||
// @Description: Vehicle will move at this speed around the circle. If set to zero WP_SPEED will be used
|
||||
// @Units: m/s
|
||||
// @Range: 0 10
|
||||
// @Increment: 0.1
|
||||
// @User: Standard
|
||||
AP_GROUPINFO("_SPEED", 2, ModeCircle, speed, 0),
|
||||
|
||||
// @Param: _DIR
|
||||
// @DisplayName: Circle Direction
|
||||
// @Description: Circle Direction
|
||||
// @Values: 0:Clockwise, 1:Counter-Clockwise
|
||||
// @User: Standard
|
||||
AP_GROUPINFO("_DIR", 3, ModeCircle, direction, 0),
|
||||
|
||||
AP_GROUPEND
|
||||
};
|
||||
|
||||
ModeCircle::ModeCircle() : Mode()
|
||||
{
|
||||
AP_Param::setup_object_defaults(this, var_info);
|
||||
}
|
||||
|
||||
// initialise with specific center location, radius (in meters) and direction
|
||||
// replaces use of _enter when initialised from within Auto mode
|
||||
bool ModeCircle::set_center(const Location& center_loc, float radius_m, bool dir_ccw)
|
||||
{
|
||||
Vector2f center_pos_cm;
|
||||
if (!center_loc.get_vector_xy_from_origin_NE(center_pos_cm)) {
|
||||
return false;
|
||||
}
|
||||
if (!_enter()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// convert center position from cm to m
|
||||
config.center_pos = center_pos_cm * 0.01;
|
||||
|
||||
// set radius
|
||||
config.radius = MAX(fabsf(radius_m), AR_CIRCLE_RADIUS_MIN);
|
||||
check_config_radius();
|
||||
|
||||
// set direction
|
||||
config.dir = dir_ccw ? Direction::CCW : Direction::CW;
|
||||
|
||||
// set target yaw rad (target point on circle)
|
||||
init_target_yaw_rad();
|
||||
|
||||
// record center as location (only used for reporting)
|
||||
config.center_loc = center_loc;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// initialize dock mode
|
||||
bool ModeCircle::_enter()
|
||||
{
|
||||
// capture starting point and yaw
|
||||
if (!AP::ahrs().get_relative_position_NE_origin(config.center_pos)) {
|
||||
return false;
|
||||
}
|
||||
config.radius = MAX(fabsf(radius), AR_CIRCLE_RADIUS_MIN);
|
||||
check_config_radius();
|
||||
|
||||
config.dir = (direction == 1) ? Direction::CCW : Direction::CW;
|
||||
config.speed = is_positive(speed) ? speed : g2.wp_nav.get_default_speed();
|
||||
target.yaw_rad = AP::ahrs().get_yaw();
|
||||
target.speed = 0;
|
||||
|
||||
// check speed around circle does not lead to excessive lateral acceleration
|
||||
check_config_speed();
|
||||
|
||||
// calculate speed, accel and jerk limits
|
||||
// otherwise the vehicle uses wp_nav default speed limit
|
||||
float atc_accel_max = MIN(g2.attitude_control.get_accel_max(), g2.attitude_control.get_decel_max());
|
||||
if (!is_positive(atc_accel_max)) {
|
||||
atc_accel_max = AR_CIRCLE_ACCEL_DEFAULT;
|
||||
}
|
||||
const float accel_max = is_positive(g2.wp_nav.get_default_accel()) ? MIN(g2.wp_nav.get_default_accel(), atc_accel_max) : atc_accel_max;
|
||||
const float jerk_max = is_positive(g2.wp_nav.get_default_jerk()) ? g2.wp_nav.get_default_jerk() : accel_max;
|
||||
|
||||
// initialise position controller
|
||||
g2.pos_control.set_limits(config.speed, accel_max, g2.attitude_control.get_turn_lat_accel_max(), jerk_max);
|
||||
g2.pos_control.init();
|
||||
|
||||
// initialise angles covered and reached_edge state
|
||||
angle_total_rad = 0;
|
||||
reached_edge = false;
|
||||
dist_to_edge_m = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// initialise target_yaw_rad using the vehicle's position and yaw
|
||||
// if there is no current position estimate target_yaw_rad is set to 0
|
||||
void ModeCircle::init_target_yaw_rad()
|
||||
{
|
||||
// if no position estimate use vehicle yaw
|
||||
Vector2f curr_pos_NE;
|
||||
if (!AP::ahrs().get_relative_position_NE_origin(curr_pos_NE)) {
|
||||
target.yaw_rad = AP::ahrs().yaw;
|
||||
return;
|
||||
}
|
||||
|
||||
// calc vector from circle center to vehicle
|
||||
Vector2f center_to_veh = (curr_pos_NE - config.center_pos);
|
||||
float dist_m = center_to_veh.length();
|
||||
|
||||
// if current position is exactly at the center of the circle return vehicle yaw
|
||||
if (is_zero(dist_m)) {
|
||||
target.yaw_rad = AP::ahrs().yaw;
|
||||
} else {
|
||||
target.yaw_rad = center_to_veh.angle();
|
||||
}
|
||||
}
|
||||
|
||||
void ModeCircle::update()
|
||||
{
|
||||
// get current position
|
||||
Vector2f curr_pos;
|
||||
const bool position_ok = AP::ahrs().get_relative_position_NE_origin(curr_pos);
|
||||
|
||||
// if no position estimate stop vehicle
|
||||
if (!position_ok) {
|
||||
stop_vehicle();
|
||||
return;
|
||||
}
|
||||
|
||||
// check if vehicle has reached edge of circle
|
||||
const Vector2f center_to_veh = curr_pos - config.center_pos;
|
||||
_distance_to_destination = center_to_veh.length();
|
||||
dist_to_edge_m = fabsf(_distance_to_destination - config.radius);
|
||||
if (!reached_edge) {
|
||||
const float dist_thresh_m = MAX(rover.g2.turn_radius, AR_CIRCLE_REACHED_EDGE_DIST);
|
||||
reached_edge = dist_to_edge_m <= dist_thresh_m;
|
||||
}
|
||||
|
||||
// accelerate speed up to desired speed
|
||||
const float speed_max = reached_edge ? config.speed : 0.0;
|
||||
const float speed_change_max = (g2.pos_control.get_accel_max() * 0.5 * rover.G_Dt);
|
||||
const float accel_fb = constrain_float(speed_max - target.speed, -speed_change_max, speed_change_max);
|
||||
target.speed += accel_fb;
|
||||
|
||||
// calculate angular rate and update target angle
|
||||
const float circumference = 2.0 * M_PI * config.radius;
|
||||
const float angular_rate_rad = (target.speed / circumference) * M_2PI * (config.dir == Direction::CW ? 1.0 : -1.0);
|
||||
const float angle_dt = angular_rate_rad * rover.G_Dt;
|
||||
target.yaw_rad = wrap_PI(target.yaw_rad + angle_dt);
|
||||
angle_total_rad += angle_dt;
|
||||
|
||||
// calculate target point's position, velocity and acceleration
|
||||
target.pos = config.center_pos.topostype();
|
||||
target.pos.offset_bearing(degrees(target.yaw_rad), config.radius);
|
||||
|
||||
// velocity is perpendicular to angle from the circle's center to the target point on the edge of the circle
|
||||
target.vel = Vector2f(target.speed, 0);
|
||||
target.vel.rotate(target.yaw_rad + radians(90));
|
||||
|
||||
// acceleration is towards center of circle and is speed^2 / radius
|
||||
target.accel = Vector2f(-sq(target.speed) / config.radius, accel_fb / rover.G_Dt);
|
||||
target.accel.rotate(target.yaw_rad);
|
||||
|
||||
g2.pos_control.set_pos_vel_accel_target(target.pos, target.vel, target.accel);
|
||||
g2.pos_control.update(rover.G_Dt);
|
||||
|
||||
// get desired speed and turn rate from pos_control
|
||||
const float desired_speed = g2.pos_control.get_desired_speed();
|
||||
const float desired_turn_rate = g2.pos_control.get_desired_turn_rate_rads();
|
||||
|
||||
// run steering and throttle controllers
|
||||
calc_steering_from_turn_rate(desired_turn_rate);
|
||||
calc_throttle(desired_speed, true);
|
||||
}
|
||||
|
||||
// return desired heading (in degrees) and cross track error (in meters) for reporting to ground station (NAV_CONTROLLER_OUTPUT message)
|
||||
float ModeCircle::wp_bearing() const
|
||||
{
|
||||
Vector2f curr_pos_NE;
|
||||
if (!AP::ahrs().get_relative_position_NE_origin(curr_pos_NE)) {
|
||||
return 0;
|
||||
}
|
||||
// calc vector from circle center to vehicle
|
||||
Vector2f veh_to_center = (config.center_pos - curr_pos_NE);
|
||||
if (veh_to_center.is_zero()) {
|
||||
return 0;
|
||||
}
|
||||
return degrees(veh_to_center.angle());
|
||||
}
|
||||
|
||||
float ModeCircle::nav_bearing() const
|
||||
{
|
||||
// get position error as a vector from the current position to the target position
|
||||
const Vector2p pos_error = g2.pos_control.get_pos_error();
|
||||
if (pos_error.is_zero()) {
|
||||
return 0;
|
||||
}
|
||||
return degrees(pos_error.angle());
|
||||
}
|
||||
|
||||
float ModeCircle::get_desired_lat_accel() const
|
||||
{
|
||||
return g2.pos_control.get_desired_lat_accel();
|
||||
}
|
||||
|
||||
// set desired speed in m/s
|
||||
bool ModeCircle::set_desired_speed(float speed_ms)
|
||||
{
|
||||
if (is_positive(speed_ms)) {
|
||||
config.speed = speed_ms;
|
||||
|
||||
// check desired speed does not lead to excessive lateral acceleration
|
||||
check_config_speed();
|
||||
|
||||
// update position controller limits if required
|
||||
if (config.speed > g2.pos_control.get_speed_max()) {
|
||||
g2.pos_control.set_limits(config.speed, g2.pos_control.get_accel_max(), g2.pos_control.get_lat_accel_max(), g2.pos_control.get_jerk_max());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// return desired location
|
||||
bool ModeCircle::get_desired_location(Location& destination) const
|
||||
{
|
||||
destination = config.center_loc;
|
||||
return true;
|
||||
}
|
||||
|
||||
// limit config speed so that lateral acceleration is within limits
|
||||
// assumes that config.radius and attitude controller lat accel max have been set
|
||||
// outputs warning to user if speed is reduced
|
||||
void ModeCircle::check_config_speed()
|
||||
{
|
||||
// calculate maximum speed based on radius and max lateral acceleration max
|
||||
const float speed_max = MAX(safe_sqrt(g2.attitude_control.get_turn_lat_accel_max() * config.radius), 0);
|
||||
|
||||
if (config.speed > speed_max) {
|
||||
config.speed = speed_max;
|
||||
gcs().send_text(MAV_SEVERITY_WARNING, "Circle: max speed is %4.1f", (double)config.speed);
|
||||
}
|
||||
}
|
||||
|
||||
// ensure config radius is no smaller then vehicle's TURN_RADIUS
|
||||
// assumes that config.radius has been set
|
||||
// radius is increased if necessary and warning is output to the user
|
||||
void ModeCircle::check_config_radius()
|
||||
{
|
||||
// ensure radius is at least as large as vehicle's turn radius
|
||||
if (config.radius < rover.g2.turn_radius) {
|
||||
config.radius = rover.g2.turn_radius;
|
||||
gcs().send_text(MAV_SEVERITY_WARNING, "Circle: radius increased to TURN_RADIUS (%4.1f)", (double)rover.g2.turn_radius);
|
||||
}
|
||||
}
|
@ -1,5 +1,352 @@
|
||||
Rover Release Notes:
|
||||
------------------------------------------------------------------
|
||||
Rover 4.4.0 19-Dec-2023 / Rover 4.4.0-beta11 05-Dec-2023
|
||||
Changes from 4.4.0-beta10
|
||||
1) Autopilot related enhancement and fixes
|
||||
- CubeOrange Sim-on-hardware compilation fix
|
||||
- RADIX2HD supports external I2C compasses
|
||||
- SpeedyBeeF405v4 support
|
||||
2) Bug fixes
|
||||
- DroneCAN battery monitor with cell monitor SoC reporting fix
|
||||
- NTF_LED_TYPES parameter description fixed (was missing IS31FL3195)
|
||||
- ProfiLED output fixed in both Notify and Scripting
|
||||
- Scripting bug that could cause crash if parameters were added in flight
|
||||
- STAT_BOOTCNT param fix (was not updating in some cases)
|
||||
- don't query hobbywing DroneCAN ESC IDs while armed
|
||||
3) Rover specific changes
|
||||
- Auto mode keeps navigating while paused at waypoints (reduces overshoot)
|
||||
- QuikTune script simplification (only tunes rate and speed controllers)
|
||||
- Torqeedo battery nearly empty reporting fix
|
||||
------------------------------------------------------------------
|
||||
Rover 4.4.0-beta10 14-Nov-2023
|
||||
Changes from 4.4.0-beta9
|
||||
1) AP_GPS: correct uBlox M10 configuration on low flash boards
|
||||
------------------------------------------------------------------
|
||||
Rover 4.4.0-beta9 07-Nov-2023
|
||||
Changes from 4.4.0-beta8
|
||||
1) Autopilot related enhancements and fixes
|
||||
- BETAFTP-F405 board configuration fixes
|
||||
- CubeOrangePlus-BG edition ICM45486 IMU setup fixed
|
||||
- YJUAV_A6SE_H743 support
|
||||
2) Minor enhancements
|
||||
- GPS_DRV_OPTION allows using ellipsoid height in more GPS drivers
|
||||
- Lua script support for fully populating ESC telemetry data
|
||||
3) Bug fixes
|
||||
- AK09916 compass being non-responsive fixed
|
||||
- IxM42xxx IMUs "stuck" gyros fixed
|
||||
- Notch filtering protection when using uninitialised RPM source in ESC telemetry
|
||||
- SIYI gimbal driver parsing bug fixed (was causing lost packets)
|
||||
------------------------------------------------------------------
|
||||
Rover 4.4.0-beta8 13-Oct-2023
|
||||
Changes from 4.4.0-beta7
|
||||
1) Autopilot related enhancements and fixes
|
||||
- BETAFPV-F405 support
|
||||
- MambaF405v2 battery and serial setup corrected
|
||||
- mRo Control Zero OEM H7 bdshot support
|
||||
- SpeedyBee-F405-Wing gets VTX power control
|
||||
- SpeedyBee-F405-Mini support
|
||||
- T-Motor H743 Mini support
|
||||
2) EKF3 supports baroless boards
|
||||
3) GPS-for-yaw allows base GPS to update at only 3Hz
|
||||
4) INA battery monitor supports config of shunt resistor used (see BATTx_SHUNT)
|
||||
5) Log VER message includes vehicle type
|
||||
6) OpenDroneId option to auto-store IDs in persistent flash
|
||||
7) RC SBUS protection against invalid data in first 4 channels
|
||||
8) Bug fixes
|
||||
- BMI088 IMU error value handling fixed to avoid occasional negative spike
|
||||
- Dev environment CI autotest stability improvements
|
||||
- OSD correct DisplayPort BF MSP symbols
|
||||
- OSD option to correct direction arrows for BF font set
|
||||
- Sensor status reporting to GCS fixed for baroless boards
|
||||
------------------------------------------------------------------
|
||||
Rover 4.4.0-beta7 14-Sep-2023
|
||||
Changes from 4.4.0-beta6
|
||||
1) Autopilot related enhancements
|
||||
- H750 external flash optimisations for to lower CPU load
|
||||
- MambaF405Mini fixes to match manufacturer's recommended wiring
|
||||
- RADIX2 HD support
|
||||
- YJUAV_A6SE support
|
||||
2) Bug fixes
|
||||
- Airbotf4 features minimised to build for 4.4
|
||||
- ChibiOS clock fix for 480Mhz H7 boards (affected FDCAN)
|
||||
- RPI hardware version check fix
|
||||
------------------------------------------------------------------
|
||||
Rover 4.4.0-beta6 05-Sep-2023
|
||||
Changes from 4.4.0-beta5
|
||||
1) Autopilot related fixes and enhancements
|
||||
- KakuteH7-wing get 8 bit directional dshot channel support
|
||||
- Luminousbee5 boards defaults updated
|
||||
- Navigator autopilot GPIOs fix (PWM output was broken)
|
||||
- Pixhawk6C Serial RTS lines pulled low on startup
|
||||
- QiotekZealotF427 and QiotekZealotH743 battery monitor default fixed
|
||||
- SDMODELH7V1 supporta
|
||||
2) Driver enhancements
|
||||
- DroneCAN battery monitors allow reset of battery SoC
|
||||
- Himark DroneCAN servo support
|
||||
- Hobbywing DroneCAN ESC support
|
||||
3) Asymmetrical thrust support for skid steering rovers (see MOT_THST_ASYM)
|
||||
4) EKF3 high vibration handling improved with EK3_GLITCH_RADIUS option
|
||||
5) Custom build server gets mission storage on SDCard selection
|
||||
6) SITL default parameter handling bug fix
|
||||
------------------------------------------------------------------
|
||||
Rover 4.4.0-beta5 12-Aug-2023
|
||||
Changes from 4.4.0-beta4
|
||||
1) Autopilots specific changes
|
||||
- SIYI N7 support
|
||||
2) Bug fixes
|
||||
- DroneCAN airspeed sensor fix to handle missing packets
|
||||
- DroneCAN GPS RTK injection fix
|
||||
- Notch filter gyro glitch caused by race condition fixed
|
||||
------------------------------------------------------------------
|
||||
Rover 4.4.0-beta4 27-July-2023
|
||||
Changes from 4.4.0-beta3
|
||||
1) Autopilots specific changes
|
||||
- Diatone-Mamba-MK4-H743v2 uses SPL06 baro (was DPS280)
|
||||
- DMA for I2C disabled on F7 and H7 boards
|
||||
- Foxeer H743v1 default serial protocol config fixes
|
||||
- HeeWing-F405 and F405v2 support
|
||||
- iFlight BlitzF7 support
|
||||
2) Rover specific enhancements
|
||||
- QuikTune Lua script
|
||||
- Circle mode safety improvements including handling when CIRC_SPEED set too high
|
||||
- Velocity controller I-term build-up avoided when steering reaches limits
|
||||
3) Bug fixes
|
||||
- BLHeli returns battery status requested via MSP (avoids hang when using esc-configurator)
|
||||
- CRSFv3 rescans at baudrates to avoid RX loss
|
||||
- EK3_ABIAS_P_NSE param range fix
|
||||
- Scripting restart memory corruption bug fixed
|
||||
- Siyi A8/ZR10 driver fix to avoid crash if serial port not configured
|
||||
------------------------------------------------------------------
|
||||
Rover 4.4.0-beta3 03-July-2023
|
||||
Changes from 4.4.0-beta2
|
||||
1) Autopilots specific changes
|
||||
- Holybro KakuteH7-Wing support
|
||||
- JFB100 external watchdog GPIO support added
|
||||
- Pixhawk1-bdshot support
|
||||
- Pixhawk6X-bdshot support
|
||||
- SpeedyBeeF4 loses bdshot support
|
||||
2) Device drivers
|
||||
- added LP5562 I2C LED driver
|
||||
- added IS31FL3195 LED driver
|
||||
3) Circle mode accuracy improvement
|
||||
4) Camera and Gimbal related changes
|
||||
- DO_SET_ROI_NONE command support added
|
||||
5) Bug fixes
|
||||
- ADSB sensor loss of transceiver message less spammy
|
||||
- EKF vertical velocity reset fixed on loss of GPS
|
||||
- GPS pre-arm failure message clarified
|
||||
- SERVOx_PROTOCOL "SToRM32 Gimbal Serial" value renamed to "Gimbal" because also used by Siyi
|
||||
- SERIALx_OPTION "Swap" renamed to "SwapTXRX" for clarity
|
||||
- SBF GPS ellipsoid height fixed
|
||||
- Ublox M10S GPS auto configuration fixed
|
||||
------------------------------------------------------------------
|
||||
Rover 4.4.0-beta2 05-Jun-2023
|
||||
Changes from 4.4.0-beta1
|
||||
1) Autopilots specific changes
|
||||
- FlywooF745 update to motor pin output mapping and baro
|
||||
- FoxeerH743 support
|
||||
- JFB100 support
|
||||
- Mamba-F405v2 supports ICM42688
|
||||
- Matek-F405-TE/VTOL support
|
||||
- Matek-H743 IMU SPI slowed to 1Mhz to avoid init issues
|
||||
- SpeedyBee-405-Wing support
|
||||
2) Rover specific changes
|
||||
- Circle mode and Auto mode LOITER_TURNS support
|
||||
- Dock mode added to INITIAL_MODE and MODE1 parameter list
|
||||
3) AHRS/EKF related fixes and Enhancements
|
||||
- EKF allocation failure handled to avoid watchdog
|
||||
- EKF3 accel bias calculation fix and tuning for greater robustness
|
||||
- Airspeed sensor remains enabled during dead-reckoning (few copters have airspeed sensors)
|
||||
- Wind speed estimates updates reduced while dead-reckoning
|
||||
4) Other Enhancements
|
||||
- Attitude control slew limits always calculated (helps tuning reporting and analysis)
|
||||
- INA228 and INA238 I2C battery monitor support
|
||||
- LOG_DISARMED=3 logs while disarmed but discards log if never eventually armed
|
||||
- LOG_DARM_RATEMAX reduces logging while disarmed
|
||||
- Serial LEDs threading enhancement to support longer lengths without dshot interference
|
||||
4) Bug fixes
|
||||
- Analog battery monitor2 current parameter default fixed
|
||||
- AutoTune fix for loading Yaw Rate D gains
|
||||
- BRD_SAFETYOPTION parameter documentation fix (ActiveForSafetyEnable and Disable were reversed)
|
||||
- Compassmot fix to protect against bad gyro biases from GSF yaw
|
||||
- ICE engine fix for starting after reaching a specified altitude
|
||||
- LED thread locking fix to avoid watchdog
|
||||
- Logging rotation on disarm disabled if Replay logging active (avoids gaps in logs)
|
||||
- RC input on IOMCU bug fix (RC might not be regained if lost)
|
||||
- Serial passthrough fixed
|
||||
5) Custom build server fix to which features are included/excluded
|
||||
------------------------------------------------------------------
|
||||
Rover 4.4.0-beta1 19-Apr-2023
|
||||
Changes from 4.3.0-beta12
|
||||
1) New autopilots supported
|
||||
- ESP32
|
||||
- Flywoo Goku F405S AIO
|
||||
- Foxeer H743v1
|
||||
- MambaF405-2022B
|
||||
- PixPilot-V3
|
||||
- PixSurveyA2
|
||||
- rFCU H743
|
||||
- ThePeach K1/R1
|
||||
2) Autopilot specific changes
|
||||
- Bi-Directional DShot support for CubeOrangePlus-bdshot, CUAVNora+, MatekF405TE/VTOL-bdshot, MatekL431, Pixhawk6C-bdshot, QioTekZealotH743-bdshot
|
||||
- Bi-Directional DShot up to 8 channels on MatekH743
|
||||
- BlueRobotics Navigator supports baro on I2C bus 6
|
||||
- BMP280 baro only for BeastF7, KakuteF4, KakuteF7Mini, MambaF405, MatekF405, Omnibusf4 to reduce code size (aka "flash")
|
||||
- CSRF and Hott telemetry disabled by default on some low power boards (aka "minimised boards")
|
||||
- Foxeer Reaper F745 supports external compasses
|
||||
- OmnibusF4 support for BMI270 IMU
|
||||
- OmnibusF7V2-bdshot support removed
|
||||
- KakuteF7 regains displayport, frees up DMA from unused serial port
|
||||
- KakuteH7v2 gets second battery sensor
|
||||
- MambaH743v4 supports VTX
|
||||
- MatekF405-Wing supports InvensenseV3 IMUs
|
||||
- PixPilot-V6 heater enabled
|
||||
- Raspberry 64OS startup crash fixed
|
||||
- ReaperF745AIO serial protocol defaults fixed
|
||||
- SkystarsH7HD (non-bdshot) removed as users should always use -bdshot version
|
||||
- Skyviper loses many unnecessary features to save flash
|
||||
- UBlox GPS only for AtomRCF405NAVI, BeastF7, MatekF405, Omnibusf4 to reduce code size (aka "flash")
|
||||
- VRBrain-v52 and VRCore-v10 features reduced to save flash
|
||||
3) Driver enhancements
|
||||
- ARK RTK GPS support
|
||||
- BMI088 IMU filtering and timing improved, ignores bad data
|
||||
- CRSF OSD may display disarmed state after flight mode (enabled using RC_OPTIONS)
|
||||
- Daiwa winch baud rate obeys SERIALx_BAUD parameter
|
||||
- EFI supports fuel pressure and ignition voltage reporting and battery failsafe
|
||||
- ICM45686 IMU support
|
||||
- ICM20602 uses fast reset instead of full reset on bad temperature sample (avoids occasional very high offset)
|
||||
- ICM45686 supports fast sampling
|
||||
- MAX31865 temp sensor support
|
||||
- MB85RS256TY-32k, PB85RS128C and PB85RS2MC FRAM support
|
||||
- MMC3416 compass orientation fix
|
||||
- MPPT battery monitor reliability improvements, enable/disable aux function and less spammy
|
||||
- Multiple USD-D1-CAN radar support
|
||||
- NMEA output rate configurable (see NMEA_RATE_MS)
|
||||
- NMEA output supports PASHR message (see NMEA_MSG_EN)
|
||||
- OSD supports average resting cell voltage (see OSD_ACRVOLT_xxx params)
|
||||
- Rockblock satellite modem support
|
||||
- Serial baud support for 2Mbps (only some hardware supports this speed)
|
||||
- SF45b lidar filtering reduced (allows detecting smaller obstacles
|
||||
- SmartAudio 2.0 learns all VTX power levels)
|
||||
- UAVCAN ESCs report error count using ESC Telemetry
|
||||
- Unicore GPS (e.g. UM982) support
|
||||
- VectorNav 100 external AHRS support
|
||||
- 5 IMUs supported
|
||||
4) EKF related enhancements
|
||||
- Baro compensation using wind estimates works when climbing or descending (see BAROx_WCF_UP/DN)
|
||||
- External AHRS support for enabling only some sensors (e.g. IMU, Baro, Compass) see EAHRS_SENSORS
|
||||
- Magnetic field tables updated
|
||||
- Non-compass initial yaw alignment uses GPS course over GSF (mostly affects Planes and Rover)
|
||||
5) Control and navigation enhancements
|
||||
- DO_SET_ROI_NONE command turns off ROI
|
||||
- JUMP_TAG mission item support
|
||||
- Manual mode steering expo configurable (see MANUAL_STR_EXPO)
|
||||
- Missions can be stored on SD card (see BRD_SD_MISSION)
|
||||
- NAV_SCRIPT_TIME command accepts floating point arguments
|
||||
- Pause/Resume returns success if mission is already paused or resumed
|
||||
8) Camera and gimbal enhancements
|
||||
- BMMCC support included in Servo driver
|
||||
- DJI RS2/RS3-Pro gimbal support
|
||||
- Dual camera support (see CAM2_TYPE)
|
||||
- Gimbal/Mount2 can be moved to retracted or neutral position
|
||||
- Gremsy ZIO support
|
||||
- IMAGE_START_CAPTURE, SET_CAMERA_ZOOM/FOCUS, VIDEO_START/STOP_CAPTURE command support
|
||||
- Paramters renamed and rescaled
|
||||
- CAM_TRIGG_TYPE renamed to CAM1_TYPE and options have changed
|
||||
- CAM_DURATION renamed to CAM1_DURATION and scaled in seconds
|
||||
- CAM_FEEDBACK_PIN/POL renamed to CAM1_FEEBAK_PIN/POL
|
||||
- CAM_MIN_INTERVAL renamed to CAM1_INTRVAL_MIN and scaled in seconds
|
||||
- CAM_TRIGG_DIST renamed to CAMx_TRIGG_DIST and accepts fractional values
|
||||
- RunCam2 4k support
|
||||
- ViewPro camera gimbal support
|
||||
8) Logging changes
|
||||
- BARD msg includes 3-axis dynamic pressure useful for baro compensation of wind estimate
|
||||
- MCU log msg includes main CPU temp and voltage (was part of POWR message)
|
||||
- RCOut banner message always included in Logs
|
||||
- SCR message includes memory usage of all running scripts
|
||||
- CANS message includes CAN bus tx/rx statistics
|
||||
- Home location not logged to CMD message
|
||||
- MOTB message includes throttle output
|
||||
9) Scripting enhancements
|
||||
- EFI Skypower driver gets improved telem messages and bug fixes
|
||||
- Generator throttle control example added
|
||||
- Heap max increased by allowing heap to be split across multiple underlying OS heaps
|
||||
- Hexsoon LEDs applet
|
||||
- Logging from scripts supports more formats
|
||||
- Parameters can be removed or reordered
|
||||
- Parameter description support (scripts must be in AP's applet or driver directory)
|
||||
- Rangefinder driver support
|
||||
- Runcam_on_arm applet starts recording when vehicle is armed
|
||||
- Safety switch, E-Stop and motor interlock support
|
||||
- Scripts can restart all scripts
|
||||
- Script_Controller applet supports inflight switching of active scripts
|
||||
10) Custom build server enhancements
|
||||
- AIS support for displaying nearby boats can be included
|
||||
- Battery, Camera and Compass drivers can be included/excluded
|
||||
- EKF3 wind estimation can be included/excluded
|
||||
- PCA9685, ToshibaLED, PLAY_TUNE notify drivers can be included/excluded
|
||||
- RichenPower generator can be included/excluded
|
||||
- RC SRXL protocol can be excluded
|
||||
- SIRF GPSs can be included/excluded
|
||||
11) Safety related enhancements and fixes
|
||||
- Arming check for servo outputs skipped when SERVOx_FUNCTION is scripting
|
||||
- Arming check fix if both "All" and other bitmasks are selected (previously only ran the other checks)
|
||||
- GCS failsafe timeout is configurable (see FS_GCS_TIMEOUT)
|
||||
- "EK3 sources require RangeFinder" pre-arm check fix when user only sets up 2nd rangefinder (e.g. 1st is disabled)
|
||||
- Pre-arm check that low and critical battery failsafe thresholds are different
|
||||
- Pre-arm message fixed if 2nd EKF core unhealthy
|
||||
- Pre-arm check if reboot required to enabled IMU batch sampling (used for vibe analysis)
|
||||
- RC failsafe timeout configurable (see RC_FS_TIMEOUT)
|
||||
12) Minor enhancements
|
||||
- Boot time reduced by improving parameter conversion efficiency
|
||||
- BRD_SAFETYENABLE parameter renamed to BRD_SAFETY_DEFLT
|
||||
- Compass calibration auxiliary switch function (set RCx_OPTION=171)
|
||||
- Disable IMU3 auxiliary switch function (set RCx_OPTION=110)
|
||||
- Rangefinder and FS_OPTIONS param conversion code reduced (affects when upgrading from 3.6 or earlier)
|
||||
- MAVFTP supports file renaming
|
||||
- MAVLink in-progress reply to some requests for calibration from GCS
|
||||
13) Bug fixes:
|
||||
- ADSB telemetry and callsign fixes
|
||||
- Battery pct reported to GCS limited to 0% to 100% range
|
||||
- Bi-directional DShot fix on H7 boards after system time wrap (more complete fix than in 4.3.6)
|
||||
- DisplayPort OSD screen reliability improvement on heavily loaded OSDs especially F4 boards
|
||||
- DisplayPort OSD artificial horizon better matches actual horizon
|
||||
- EFI Serial MS bug fix to avoid possible infinite loop
|
||||
- EKF3 Replay fix when COMPASS_LEARN=3
|
||||
- ESC Telemetry external temp reporting fix
|
||||
- Fence upload works even if Auto mode is excluded from firmware
|
||||
- FMT messages logged even when Fence is exncluded from firmware (e.g. unselected when using custom build server)
|
||||
- Hardfault avoided if user changes INS_LOG_BAT_CNT while batch sampling running
|
||||
- ICM20649 temp sensor tolerate increased to avoid unnecessary FIFO reset
|
||||
- IMU detection bug fix to avoid duplicates
|
||||
- IMU temp cal fix when using auxiliary IMU
|
||||
- Message Interval fix for restoring default rate https://github.com/ArduPilot/ardupilot/pull/21947
|
||||
- RADIO_STATUS messages slow-down feature never completely stops messages from being sent
|
||||
- SERVOx_TRIM value output momentarily if SERVOx_FUNCTION is changed from Disabled to RCPassThru, RCIN1, etc. Avoids momentary divide-by-zero
|
||||
- Scripting file system open fix
|
||||
- Scripting PWM source deletion crash fix
|
||||
- MAVFTP fix for low baudrates (4800 baud and lower)
|
||||
- ModalAI VOXL reset handling fix
|
||||
- MPU6500 IMU fast sampling rate to 4k (was 1K)
|
||||
- NMEA GPGGA output fixed for GPS quality, num sats and hdop
|
||||
- Position control reset avoided even with very uneven main loop rate due to high CPU load
|
||||
- Throttle notch FFT tuning param fix
|
||||
- VTX protects against pitmode changes when not enabled or vehicle disarmed
|
||||
14) Developer specific items
|
||||
- DroneCAN replaces UAVCAN
|
||||
- FlighAxis simulator rangefinder fixed
|
||||
- Scripts in applet and drivers directory checked using linter
|
||||
- Simulator supports main loop timing jitter (see SIM_TIME_JITTER)
|
||||
- Simulink model and init scripts
|
||||
- SITL on hardware support (useful to demo servos moving in response to simulated flight)
|
||||
- SITL parameter definitions added (some, not all)
|
||||
- Webots 2023a simulator support
|
||||
- XPlane support for wider range of aircraft
|
||||
------------------------------------------------------------------
|
||||
Rover 4.3.0-beta11/beta12 27-Mar-2023
|
||||
Changes from 4.3.0-beta10
|
||||
1) Bi-directional DShot fix for possible motor stop approx 72min after startup
|
||||
------------------------------------------------------------------
|
||||
Rover 4.3.0-beta10 01-Mar-2023
|
||||
Changes from 4.3.0-beta9
|
||||
1) Bug fixes
|
||||
|
@ -6,14 +6,14 @@
|
||||
|
||||
#include "ap_version.h"
|
||||
|
||||
#define THISFIRMWARE "ArduRover V4.4.0-dev"
|
||||
#define THISFIRMWARE "ArduRover V4.4.0"
|
||||
|
||||
// the following line is parsed by the autotest scripts
|
||||
#define FIRMWARE_VERSION 4,4,0,FIRMWARE_VERSION_TYPE_DEV
|
||||
#define FIRMWARE_VERSION 4,4,0,FIRMWARE_VERSION_TYPE_OFFICIAL
|
||||
|
||||
#define FW_MAJOR 4
|
||||
#define FW_MINOR 4
|
||||
#define FW_PATCH 0
|
||||
#define FW_TYPE FIRMWARE_VERSION_TYPE_DEV
|
||||
#define FW_TYPE FIRMWARE_VERSION_TYPE_OFFICIAL
|
||||
|
||||
#include <AP_Common/AP_FWVersionDefine.h>
|
||||
|
@ -216,6 +216,20 @@ AP_HW_rFCU 1102
|
||||
AP_HW_rGNSS 1103
|
||||
AP_HW_AEROFOX_AIRSPEED_DLVR 1104
|
||||
AP_HW_KakuteH7-Wing 1105
|
||||
AP_HW_SpeedyBeeF405WING 1106
|
||||
AP_HW_PixSurveyA-IND 1107
|
||||
AP_HW_SPRACINGH7RF 1108
|
||||
AP_HW_AEROFOX_GNSS_F9P 1109
|
||||
AP_HW_JFB110 1110
|
||||
AP_HW_SDMODELH7V1 1111
|
||||
AP_HW_FlyingMoonH743 1112
|
||||
AP_HW_YJUAV_A6 1113
|
||||
AP_HW_YJUAV_A6Nano 1114
|
||||
AP_HW_ACNS_CM4PILOT 1115
|
||||
AP_HW_ACNS_F405AIO 1116
|
||||
AP_HW_BLITZF7 1117
|
||||
AP_HW_YJUAV_A6SE 1127
|
||||
AP_HW_YJUAV_A6SE_H743 1141
|
||||
|
||||
AP_HW_ESP32_PERIPH 1205
|
||||
AP_HW_ESP32S3_PERIPH 1206
|
||||
|
@ -32,11 +32,10 @@ private:
|
||||
void handleMessage(const mavlink_message_t &msg) override { handle_common_message(msg); }
|
||||
bool handle_guided_request(AP_Mission::Mission_Command &cmd) override { return true; }
|
||||
MAV_RESULT handle_preflight_reboot(const mavlink_command_long_t &packet, const mavlink_message_t &msg) override;
|
||||
uint8_t sysid_my_gcs() const override;
|
||||
|
||||
protected:
|
||||
|
||||
uint8_t sysid_my_gcs() const override;
|
||||
|
||||
// Periph information:
|
||||
MAV_MODE base_mode() const override { return (MAV_MODE)MAV_MODE_FLAG_CUSTOM_MODE_ENABLED; }
|
||||
MAV_STATE vehicle_system_status() const override { return MAV_STATE_CALIBRATING; }
|
||||
|
@ -7,7 +7,7 @@ import sys
|
||||
try:
|
||||
import em
|
||||
except ImportError:
|
||||
print("you need to install empy with 'python -m pip install empy'")
|
||||
print("you need to install empy with 'python -m pip install empy==3.3.4'")
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
|
BIN
Tools/IO_Firmware/iofirmware_f103_8MHz_highpolh.bin
generated
BIN
Tools/IO_Firmware/iofirmware_f103_8MHz_highpolh.bin
generated
Binary file not shown.
BIN
Tools/IO_Firmware/iofirmware_f103_8MHz_lowpolh.bin
generated
BIN
Tools/IO_Firmware/iofirmware_f103_8MHz_lowpolh.bin
generated
Binary file not shown.
BIN
Tools/IO_Firmware/iofirmware_highpolh.bin
generated
BIN
Tools/IO_Firmware/iofirmware_highpolh.bin
generated
Binary file not shown.
BIN
Tools/IO_Firmware/iofirmware_lowpolh.bin
generated
BIN
Tools/IO_Firmware/iofirmware_lowpolh.bin
generated
Binary file not shown.
@ -40,7 +40,7 @@ def check_log(logfile, progress=print, ekf2_only=False, ekf3_only=False, verbose
|
||||
if not hasattr(m,'C'):
|
||||
continue
|
||||
mtype = m.get_type()
|
||||
if not mtype in counts:
|
||||
if mtype not in counts:
|
||||
counts[mtype] = 0
|
||||
base_counts[mtype] = 0
|
||||
core = m.C
|
||||
|
@ -261,6 +261,10 @@ class Board:
|
||||
env.DEFINES.update(
|
||||
HAL_DEBUG_BUILD = 1,
|
||||
)
|
||||
elif cfg.options.g:
|
||||
env.CFLAGS += [
|
||||
'-g',
|
||||
]
|
||||
if cfg.env.COVERAGE:
|
||||
env.CFLAGS += [
|
||||
'-fprofile-arcs',
|
||||
|
@ -112,7 +112,7 @@ class upload_fw(Task.Task):
|
||||
and make sure to add it to your path during the installation. Once installed, run this
|
||||
command in Powershell or Command Prompt to install some packages:
|
||||
|
||||
pip.exe install empy pyserial
|
||||
pip.exe install empy==3.3.4 pyserial
|
||||
****************************************
|
||||
****************************************
|
||||
""" % error_msg)
|
||||
@ -231,7 +231,7 @@ def sign_firmware(image, private_keyfile):
|
||||
try:
|
||||
import monocypher
|
||||
except ImportError:
|
||||
Logs.error("Please install monocypher with: python3 -m pip install pymonocypher")
|
||||
Logs.error("Please install monocypher with: python3 -m pip install pymonocypher==3.1.3.2")
|
||||
return None
|
||||
try:
|
||||
key = open(private_keyfile, 'r').read()
|
||||
@ -496,6 +496,8 @@ def load_env_vars(env):
|
||||
env.CHIBIOS_BUILD_FLAGS += ' ENABLE_STATS=yes'
|
||||
if env.ENABLE_DFU_BOOT and env.BOOTLOADER:
|
||||
env.CHIBIOS_BUILD_FLAGS += ' USE_ASXOPT=-DCRT0_ENTRY_HOOK=TRUE'
|
||||
if env.AP_BOARD_START_TIME:
|
||||
env.CHIBIOS_BUILD_FLAGS += ' AP_BOARD_START_TIME=0x%x' % env.AP_BOARD_START_TIME
|
||||
|
||||
|
||||
def setup_optimization(env):
|
||||
@ -697,6 +699,7 @@ def build(bld):
|
||||
'fopen', 'fflush', 'fwrite', 'fread', 'fputs', 'fgets',
|
||||
'clearerr', 'fseek', 'ferror', 'fclose', 'tmpfile', 'getc', 'ungetc', 'feof',
|
||||
'ftell', 'freopen', 'remove', 'vfprintf', 'fscanf',
|
||||
'_gettimeofday', '_times', '_times_r', '_gettimeofday_r', 'time', 'clock' ]
|
||||
'_gettimeofday', '_times', '_times_r', '_gettimeofday_r', 'time', 'clock',
|
||||
'_sbrk_r', '_malloc_r', '_calloc_r', '_free_r']
|
||||
for w in wraplist:
|
||||
bld.env.LINKFLAGS += ['-Wl,--wrap,%s' % w]
|
||||
|
@ -11,7 +11,6 @@ import os
|
||||
import shutil
|
||||
import time
|
||||
import numpy
|
||||
import operator
|
||||
|
||||
from pymavlink import quaternion
|
||||
from pymavlink import mavutil
|
||||
@ -135,7 +134,7 @@ class AutoTestCopter(AutoTest):
|
||||
0, # param6
|
||||
alt_min # param7
|
||||
)
|
||||
self.wait_for_alt(alt_min, timeout=timeout, max_err=max_err)
|
||||
self.wait_altitude(alt_min-1, alt_min+max_err, relative=True, timeout=timeout)
|
||||
|
||||
def takeoff(self,
|
||||
alt_min=30,
|
||||
@ -155,17 +154,10 @@ class AutoTestCopter(AutoTest):
|
||||
self.user_takeoff(alt_min=alt_min, timeout=timeout, max_err=max_err)
|
||||
else:
|
||||
self.set_rc(3, takeoff_throttle)
|
||||
self.wait_for_alt(alt_min=alt_min, timeout=timeout, max_err=max_err)
|
||||
self.wait_altitude(alt_min-1, alt_min+max_err, relative=True, timeout=timeout)
|
||||
self.hover()
|
||||
self.progress("TAKEOFF COMPLETE")
|
||||
|
||||
def wait_for_alt(self, alt_min=30, timeout=30, max_err=5):
|
||||
"""Wait for minimum altitude to be reached."""
|
||||
self.wait_altitude(alt_min - 1,
|
||||
(alt_min + max_err),
|
||||
relative=True,
|
||||
timeout=timeout)
|
||||
|
||||
def land_and_disarm(self, timeout=60):
|
||||
"""Land the quad."""
|
||||
self.progress("STARTING LANDING")
|
||||
@ -177,7 +169,7 @@ class AutoTestCopter(AutoTest):
|
||||
m = self.mav.recv_match(type='GLOBAL_POSITION_INT', blocking=True)
|
||||
alt = m.relative_alt / 1000.0 # mm -> m
|
||||
if alt > min_alt:
|
||||
self.wait_for_alt(min_alt, timeout=timeout)
|
||||
self.wait_altitude(min_alt-1, min_alt+5, relative=True, timeout=timeout)
|
||||
# self.wait_statustext("SIM Hit ground", timeout=timeout)
|
||||
self.wait_disarmed()
|
||||
|
||||
@ -1119,7 +1111,7 @@ class AutoTestCopter(AutoTest):
|
||||
self.change_mode("LAND")
|
||||
|
||||
# check vehicle descends to 2m or less within 40 seconds
|
||||
self.wait_altitude(-5, 2, timeout=40, relative=True)
|
||||
self.wait_altitude(-5, 2, timeout=50, relative=True)
|
||||
|
||||
# force disarm of vehicle (it will likely not automatically disarm)
|
||||
self.disarm_vehicle(force=True)
|
||||
@ -2087,7 +2079,7 @@ class AutoTestCopter(AutoTest):
|
||||
|
||||
self.progress("Regaining altitude")
|
||||
self.change_mode('ALT_HOLD')
|
||||
self.wait_for_alt(20, max_err=40)
|
||||
self.wait_altitude(19, 60, relative=True)
|
||||
|
||||
self.progress("Flipping in pitch")
|
||||
self.set_rc(2, 1700)
|
||||
@ -2427,7 +2419,7 @@ class AutoTestCopter(AutoTest):
|
||||
raise NotAchievedException("AUTOTUNE gains not present in pilot testing")
|
||||
# land without changing mode
|
||||
self.set_rc(3, 1000)
|
||||
self.wait_for_alt(0)
|
||||
self.wait_altitude(-1, 5, relative=True)
|
||||
self.wait_disarmed()
|
||||
# Check gains are still there after disarm
|
||||
if (rlld == self.get_parameter("ATC_RAT_RLL_D") or
|
||||
@ -2678,7 +2670,7 @@ class AutoTestCopter(AutoTest):
|
||||
0,
|
||||
timeout=10,
|
||||
want_result=mavutil.mavlink.MAV_RESULT_FAILED)
|
||||
self.wait_statustext("Node {} unhealthy".format(gps1_nodeid), check_context=True)
|
||||
self.wait_statustext(".*Node .* unhealthy", check_context=True, regex=True)
|
||||
self.stop_sup_program(instance=0)
|
||||
self.start_sup_program(instance=0)
|
||||
self.context_stop_collecting('STATUSTEXT')
|
||||
@ -3851,7 +3843,7 @@ class AutoTestCopter(AutoTest):
|
||||
new_pos = self.mav.location()
|
||||
delta = self.get_distance(target, new_pos)
|
||||
self.progress("Landed %f metres from target position" % delta)
|
||||
max_delta = 1
|
||||
max_delta = 1.5
|
||||
if delta > max_delta:
|
||||
raise NotAchievedException("Did not land close enough to target position (%fm > %fm" % (delta, max_delta))
|
||||
|
||||
@ -4568,7 +4560,7 @@ class AutoTestCopter(AutoTest):
|
||||
# determine if we've successfully navigated to close to
|
||||
# where we should be:
|
||||
dist = math.sqrt(delta_ef.x * delta_ef.x + delta_ef.y * delta_ef.y)
|
||||
dist_max = 0.15
|
||||
dist_max = 1
|
||||
self.progress("dist=%f want <%f" % (dist, dist_max))
|
||||
if dist < dist_max:
|
||||
# success! We've gotten within our target distance
|
||||
@ -4646,6 +4638,7 @@ class AutoTestCopter(AutoTest):
|
||||
|
||||
except Exception as e:
|
||||
self.print_exception_caught(e)
|
||||
self.disarm_vehicle(force=True)
|
||||
ex = e
|
||||
|
||||
self.context_pop()
|
||||
@ -6826,6 +6819,7 @@ class AutoTestCopter(AutoTest):
|
||||
failed = False
|
||||
wants = []
|
||||
gots = []
|
||||
epsilon = 20
|
||||
while True:
|
||||
if self.get_sim_time_cached() - tstart > 30:
|
||||
raise AutoTestTimeoutException("Failed to get distances")
|
||||
@ -6838,7 +6832,7 @@ class AutoTestCopter(AutoTest):
|
||||
want = expected_distances_copy[m.orientation]
|
||||
wants.append(want)
|
||||
gots.append(got)
|
||||
if abs(want - got) > 5:
|
||||
if abs(want - got) > epsilon:
|
||||
failed = True
|
||||
del expected_distances_copy[m.orientation]
|
||||
if failed:
|
||||
@ -6857,9 +6851,11 @@ class AutoTestCopter(AutoTest):
|
||||
})
|
||||
self.set_analog_rangefinder_parameters()
|
||||
self.reboot_sitl()
|
||||
tstart = self.get_sim_time()
|
||||
|
||||
self.change_mode('LOITER')
|
||||
self.wait_ekf_happy()
|
||||
|
||||
tstart = self.get_sim_time()
|
||||
while True:
|
||||
if self.armed():
|
||||
break
|
||||
@ -6910,7 +6906,7 @@ class AutoTestCopter(AutoTest):
|
||||
if self.get_sim_time_cached() - tstart > 10:
|
||||
break
|
||||
vel = self.get_body_frame_velocity()
|
||||
if vel.length() > 0.3:
|
||||
if vel.length() > 0.5:
|
||||
raise NotAchievedException("Moved too much (%s)" %
|
||||
(str(vel),))
|
||||
shove(None, None)
|
||||
@ -8338,7 +8334,7 @@ class AutoTestCopter(AutoTest):
|
||||
def verify_yaw(mav, m):
|
||||
if m.get_type() != 'ATTITUDE':
|
||||
return
|
||||
yawspeed_thresh_rads = math.radians(10)
|
||||
yawspeed_thresh_rads = math.radians(20)
|
||||
if m.yawspeed > yawspeed_thresh_rads:
|
||||
raise NotAchievedException("Excessive yaw on takeoff: %f deg/s > %f deg/s (frame=%s)" %
|
||||
(math.degrees(m.yawspeed), math.degrees(yawspeed_thresh_rads), frame))
|
||||
@ -8810,10 +8806,10 @@ class AutoTestCopter(AutoTest):
|
||||
'''Refind the GPS and attempt to RTL rather than continue to land'''
|
||||
# https://github.com/ArduPilot/ardupilot/issues/14236
|
||||
self.progress("arm the vehicle and takeoff in Guided")
|
||||
self.takeoff(20, mode='GUIDED')
|
||||
self.takeoff(50, mode='GUIDED')
|
||||
self.progress("fly 50m North (or whatever)")
|
||||
old_pos = self.mav.recv_match(type='GLOBAL_POSITION_INT', blocking=True)
|
||||
self.fly_guided_move_global_relative_alt(50, 0, 20)
|
||||
self.fly_guided_move_global_relative_alt(50, 0, 50)
|
||||
self.set_parameter('GPS_TYPE', 0)
|
||||
self.drain_mav()
|
||||
tstart = self.get_sim_time()
|
||||
@ -9467,111 +9463,118 @@ class AutoTestCopter(AutoTest):
|
||||
def Sprayer(self):
|
||||
"""Test sprayer functionality."""
|
||||
self.context_push()
|
||||
ex = None
|
||||
try:
|
||||
rc_ch = 9
|
||||
pump_ch = 5
|
||||
spinner_ch = 6
|
||||
pump_ch_min = 1050
|
||||
pump_ch_trim = 1520
|
||||
pump_ch_max = 1950
|
||||
spinner_ch_min = 975
|
||||
spinner_ch_trim = 1510
|
||||
spinner_ch_max = 1975
|
||||
|
||||
self.set_parameters({
|
||||
"SPRAY_ENABLE": 1,
|
||||
rc_ch = 9
|
||||
pump_ch = 5
|
||||
spinner_ch = 6
|
||||
pump_ch_min = 1050
|
||||
pump_ch_trim = 1520
|
||||
pump_ch_max = 1950
|
||||
spinner_ch_min = 975
|
||||
spinner_ch_trim = 1510
|
||||
spinner_ch_max = 1975
|
||||
|
||||
"SERVO%u_FUNCTION" % pump_ch: 22,
|
||||
"SERVO%u_MIN" % pump_ch: pump_ch_min,
|
||||
"SERVO%u_TRIM" % pump_ch: pump_ch_trim,
|
||||
"SERVO%u_MAX" % pump_ch: pump_ch_max,
|
||||
self.set_parameters({
|
||||
"SPRAY_ENABLE": 1,
|
||||
|
||||
"SERVO%u_FUNCTION" % spinner_ch: 23,
|
||||
"SERVO%u_MIN" % spinner_ch: spinner_ch_min,
|
||||
"SERVO%u_TRIM" % spinner_ch: spinner_ch_trim,
|
||||
"SERVO%u_MAX" % spinner_ch: spinner_ch_max,
|
||||
"SERVO%u_FUNCTION" % pump_ch: 22,
|
||||
"SERVO%u_MIN" % pump_ch: pump_ch_min,
|
||||
"SERVO%u_TRIM" % pump_ch: pump_ch_trim,
|
||||
"SERVO%u_MAX" % pump_ch: pump_ch_max,
|
||||
|
||||
"SIM_SPR_ENABLE": 1,
|
||||
"SIM_SPR_PUMP": pump_ch,
|
||||
"SIM_SPR_SPIN": spinner_ch,
|
||||
"SERVO%u_FUNCTION" % spinner_ch: 23,
|
||||
"SERVO%u_MIN" % spinner_ch: spinner_ch_min,
|
||||
"SERVO%u_TRIM" % spinner_ch: spinner_ch_trim,
|
||||
"SERVO%u_MAX" % spinner_ch: spinner_ch_max,
|
||||
|
||||
"RC%u_OPTION" % rc_ch: 15,
|
||||
"LOG_DISARMED": 1,
|
||||
})
|
||||
"SIM_SPR_ENABLE": 1,
|
||||
"SIM_SPR_PUMP": pump_ch,
|
||||
"SIM_SPR_SPIN": spinner_ch,
|
||||
|
||||
self.reboot_sitl()
|
||||
"RC%u_OPTION" % rc_ch: 15,
|
||||
"LOG_DISARMED": 1,
|
||||
})
|
||||
|
||||
self.wait_ready_to_arm()
|
||||
self.arm_vehicle()
|
||||
self.reboot_sitl()
|
||||
|
||||
self.progress("test bootup state - it's zero-output!")
|
||||
self.wait_servo_channel_value(spinner_ch, 0)
|
||||
self.wait_servo_channel_value(pump_ch, 0)
|
||||
self.wait_ready_to_arm()
|
||||
self.arm_vehicle()
|
||||
|
||||
self.progress("Enable sprayer")
|
||||
self.set_rc(rc_ch, 2000)
|
||||
self.progress("test bootup state - it's zero-output!")
|
||||
self.wait_servo_channel_value(spinner_ch, 0)
|
||||
self.wait_servo_channel_value(pump_ch, 0)
|
||||
|
||||
self.progress("Testing zero-speed state")
|
||||
self.wait_servo_channel_value(spinner_ch, spinner_ch_min)
|
||||
self.wait_servo_channel_value(pump_ch, pump_ch_min)
|
||||
self.progress("Enable sprayer")
|
||||
self.set_rc(rc_ch, 2000)
|
||||
|
||||
self.progress("Testing turning it off")
|
||||
self.set_rc(rc_ch, 1000)
|
||||
self.wait_servo_channel_value(spinner_ch, spinner_ch_min)
|
||||
self.wait_servo_channel_value(pump_ch, pump_ch_min)
|
||||
self.progress("Testing zero-speed state")
|
||||
self.wait_servo_channel_value(spinner_ch, spinner_ch_min)
|
||||
self.wait_servo_channel_value(pump_ch, pump_ch_min)
|
||||
|
||||
self.progress("Testing turning it back on")
|
||||
self.set_rc(rc_ch, 2000)
|
||||
self.wait_servo_channel_value(spinner_ch, spinner_ch_min)
|
||||
self.wait_servo_channel_value(pump_ch, pump_ch_min)
|
||||
self.progress("Testing turning it off")
|
||||
self.set_rc(rc_ch, 1000)
|
||||
self.wait_servo_channel_value(spinner_ch, spinner_ch_min)
|
||||
self.wait_servo_channel_value(pump_ch, pump_ch_min)
|
||||
|
||||
self.takeoff(30, mode='LOITER')
|
||||
self.progress("Testing turning it back on")
|
||||
self.set_rc(rc_ch, 2000)
|
||||
self.wait_servo_channel_value(spinner_ch, spinner_ch_min)
|
||||
self.wait_servo_channel_value(pump_ch, pump_ch_min)
|
||||
|
||||
self.progress("Testing speed-ramping")
|
||||
self.set_rc(1, 1700) # start driving forward
|
||||
self.takeoff(30, mode='LOITER')
|
||||
|
||||
# this is somewhat empirical...
|
||||
self.wait_servo_channel_value(pump_ch, 1458, timeout=60)
|
||||
self.progress("Testing speed-ramping")
|
||||
self.set_rc(1, 1700) # start driving forward
|
||||
|
||||
self.progress("Turning it off again")
|
||||
self.set_rc(rc_ch, 1000)
|
||||
self.wait_servo_channel_value(spinner_ch, spinner_ch_min)
|
||||
self.wait_servo_channel_value(pump_ch, pump_ch_min)
|
||||
# this is somewhat empirical...
|
||||
self.wait_servo_channel_value(
|
||||
pump_ch,
|
||||
1458,
|
||||
timeout=60,
|
||||
comparator=lambda x, y : abs(x-y) < 5
|
||||
)
|
||||
|
||||
self.start_subtest("Checking mavlink commands")
|
||||
self.progress("Starting Sprayer")
|
||||
self.run_cmd(mavutil.mavlink.MAV_CMD_DO_SPRAYER,
|
||||
1, # p1
|
||||
0, # p2
|
||||
0, # p3
|
||||
0, # p4
|
||||
0, # p5
|
||||
0, # p6
|
||||
0) # p7
|
||||
self.progress("Turning it off again")
|
||||
self.set_rc(rc_ch, 1000)
|
||||
self.wait_servo_channel_value(spinner_ch, spinner_ch_min)
|
||||
self.wait_servo_channel_value(pump_ch, pump_ch_min)
|
||||
|
||||
self.progress("Testing speed-ramping")
|
||||
self.wait_servo_channel_value(pump_ch, 1458, timeout=60, comparator=operator.gt)
|
||||
self.start_subtest("Stopping Sprayer")
|
||||
self.run_cmd(mavutil.mavlink.MAV_CMD_DO_SPRAYER,
|
||||
0, # p1
|
||||
0, # p2
|
||||
0, # p3
|
||||
0, # p4
|
||||
0, # p5
|
||||
0, # p6
|
||||
0) # p7
|
||||
self.wait_servo_channel_value(pump_ch, pump_ch_min)
|
||||
self.start_subtest("Checking mavlink commands")
|
||||
self.progress("Starting Sprayer")
|
||||
self.run_cmd(mavutil.mavlink.MAV_CMD_DO_SPRAYER,
|
||||
1, # p1
|
||||
0, # p2
|
||||
0, # p3
|
||||
0, # p4
|
||||
0, # p5
|
||||
0, # p6
|
||||
0) # p7
|
||||
|
||||
self.progress("Testing speed-ramping")
|
||||
self.wait_servo_channel_value(
|
||||
pump_ch,
|
||||
1458,
|
||||
timeout=60,
|
||||
comparator=lambda x, y : abs(x-y) < 5
|
||||
)
|
||||
|
||||
self.start_subtest("Stopping Sprayer")
|
||||
self.run_cmd(mavutil.mavlink.MAV_CMD_DO_SPRAYER,
|
||||
0, # p1
|
||||
0, # p2
|
||||
0, # p3
|
||||
0, # p4
|
||||
0, # p5
|
||||
0, # p6
|
||||
0) # p7
|
||||
self.wait_servo_channel_value(pump_ch, pump_ch_min)
|
||||
|
||||
self.progress("Sprayer OK")
|
||||
except Exception as e:
|
||||
self.print_exception_caught(e)
|
||||
ex = e
|
||||
self.context_pop()
|
||||
|
||||
self.disarm_vehicle(force=True)
|
||||
self.reboot_sitl()
|
||||
if ex:
|
||||
raise ex
|
||||
|
||||
self.progress("Sprayer OK")
|
||||
|
||||
def tests1a(self):
|
||||
'''return list of all tests'''
|
||||
@ -9749,7 +9752,7 @@ class AutoTestCopter(AutoTest):
|
||||
self.reboot_sitl()
|
||||
self.wait_ready_to_arm()
|
||||
self.takeoff(alt_min=20, mode='LOITER')
|
||||
self.land_and_disarm()
|
||||
self.do_RTL()
|
||||
self.context_pop()
|
||||
self.reboot_sitl()
|
||||
|
||||
|
@ -20,6 +20,8 @@ from common import AutoTestTimeoutException
|
||||
from common import NotAchievedException
|
||||
from common import PreconditionFailedException
|
||||
from common import WaitModeTimeout
|
||||
from common import Test
|
||||
|
||||
from pymavlink.rotmat import Vector3
|
||||
from pysim import vehicleinfo
|
||||
|
||||
@ -625,18 +627,18 @@ class AutoTestPlane(AutoTest):
|
||||
self.change_mode("AUTO")
|
||||
self.wait_ready_to_arm()
|
||||
self.arm_vehicle()
|
||||
self.progress("Waiting for deepstall messages")
|
||||
|
||||
# note that the following two don't necessarily happen in this
|
||||
# order, but at very high speedups we may miss the elevator
|
||||
# PWM if we first look for the text (due to the get_sim_time()
|
||||
# in wait_servo_channel_value)
|
||||
self.context_collect('STATUSTEXT')
|
||||
self.wait_current_waypoint(4)
|
||||
|
||||
# assume elevator is on channel 2:
|
||||
self.wait_servo_channel_value(2, deepstall_elevator_pwm, timeout=240)
|
||||
|
||||
self.wait_text("Deepstall: Entry: ", check_context=True)
|
||||
self.progress("Waiting for stage DEEPSTALL_STAGE_LAND")
|
||||
self.assert_receive_message(
|
||||
'DEEPSTALL',
|
||||
condition='DEEPSTALL.stage==6',
|
||||
timeout=240,
|
||||
)
|
||||
self.progress("Reached stage DEEPSTALL_STAGE_LAND")
|
||||
|
||||
self.disarm_wait(timeout=120)
|
||||
self.set_current_waypoint(0, check_afterwards=False)
|
||||
@ -780,6 +782,7 @@ class AutoTestPlane(AutoTest):
|
||||
0,
|
||||
0)
|
||||
self.wait_airspeed(new_target_airspeed-0.5, new_target_airspeed+0.5)
|
||||
self.context_push()
|
||||
self.progress("Adding some wind, hoping groundspeed increases/decreases")
|
||||
self.set_parameters({
|
||||
"SIM_WIND_SPD": 7,
|
||||
@ -797,6 +800,7 @@ class AutoTestPlane(AutoTest):
|
||||
self.progress("groundspeed and airspeed should be different (have=%f want=%f)" % (delta, want_delta))
|
||||
if delta > want_delta:
|
||||
break
|
||||
self.context_pop()
|
||||
self.fly_home_land_and_disarm(timeout=240)
|
||||
|
||||
def fly_home_land_and_disarm(self, timeout=120):
|
||||
@ -994,7 +998,7 @@ class AutoTestPlane(AutoTest):
|
||||
self.context_collect("HEARTBEAT")
|
||||
self.set_parameter("SIM_RC_FAIL", 2) # throttle-to-950
|
||||
self.wait_mode('RTL') # long failsafe
|
||||
if (not self.get_mode_from_mode_mapping("CIRCLE") in
|
||||
if (self.get_mode_from_mode_mapping("CIRCLE") not in
|
||||
[x.custom_mode for x in self.context_stop_collecting("HEARTBEAT")]):
|
||||
raise NotAchievedException("Did not go via circle mode")
|
||||
self.progress("Ensure we've had our throttle squashed to 950")
|
||||
@ -1032,7 +1036,7 @@ class AutoTestPlane(AutoTest):
|
||||
self.context_collect("HEARTBEAT")
|
||||
self.set_parameter("SIM_RC_FAIL", 1) # no-pulses
|
||||
self.wait_mode('RTL') # long failsafe
|
||||
if (not self.get_mode_from_mode_mapping("CIRCLE") in
|
||||
if (self.get_mode_from_mode_mapping("CIRCLE") not in
|
||||
[x.custom_mode for x in self.context_stop_collecting("HEARTBEAT")]):
|
||||
raise NotAchievedException("Did not go via circle mode")
|
||||
self.do_timesync_roundtrip()
|
||||
@ -1169,29 +1173,28 @@ class AutoTestPlane(AutoTest):
|
||||
'''Ensure Long-Failsafe works on GCS loss'''
|
||||
self.start_subtest("Test Failsafe: RTL")
|
||||
self.load_sample_mission()
|
||||
self.set_parameter("RTL_AUTOLAND", 1)
|
||||
self.change_mode("AUTO")
|
||||
self.takeoff()
|
||||
self.set_parameters({
|
||||
"FS_GCS_ENABL": 1,
|
||||
"FS_LONG_ACTN": 1,
|
||||
"RTL_AUTOLAND": 1,
|
||||
"SYSID_MYGCS": self.mav.source_system,
|
||||
})
|
||||
self.takeoff()
|
||||
self.change_mode('LOITER')
|
||||
self.progress("Disconnecting GCS")
|
||||
self.set_heartbeat_rate(0)
|
||||
self.wait_mode("RTL", timeout=5)
|
||||
self.wait_mode("RTL", timeout=10)
|
||||
self.set_heartbeat_rate(self.speedup)
|
||||
self.end_subtest("Completed RTL Failsafe test")
|
||||
|
||||
self.start_subtest("Test Failsafe: FBWA Glide")
|
||||
self.set_parameters({
|
||||
"RTL_AUTOLAND": 1,
|
||||
"FS_LONG_ACTN": 2,
|
||||
})
|
||||
self.change_mode("AUTO")
|
||||
self.takeoff()
|
||||
self.change_mode('AUTO')
|
||||
self.progress("Disconnecting GCS")
|
||||
self.set_heartbeat_rate(0)
|
||||
self.wait_mode("FBWA", timeout=5)
|
||||
self.wait_mode("FBWA", timeout=10)
|
||||
self.set_heartbeat_rate(self.speedup)
|
||||
self.end_subtest("Completed FBWA Failsafe test")
|
||||
|
||||
@ -1844,6 +1847,7 @@ class AutoTestPlane(AutoTest):
|
||||
self.fly_home_land_and_disarm()
|
||||
|
||||
def deadreckoning_main(self, disable_airspeed_sensor=False):
|
||||
self.reboot_sitl()
|
||||
self.wait_ready_to_arm()
|
||||
self.gpi = None
|
||||
self.simstate = None
|
||||
@ -2414,11 +2418,6 @@ class AutoTestPlane(AutoTest):
|
||||
|
||||
self.load_mission('CMAC-soar.txt', strict=False)
|
||||
|
||||
self.set_current_waypoint(1)
|
||||
self.change_mode('AUTO')
|
||||
self.wait_ready_to_arm()
|
||||
self.arm_vehicle()
|
||||
|
||||
# Enable thermalling RC
|
||||
rc_chan = 0
|
||||
for i in range(8):
|
||||
@ -2432,15 +2431,22 @@ class AutoTestPlane(AutoTest):
|
||||
|
||||
self.set_rc_from_map({
|
||||
rc_chan: 1900,
|
||||
3: 1500, # Use trim airspeed.
|
||||
})
|
||||
|
||||
self.set_parameters({
|
||||
"SOAR_VSPEED": 0.55,
|
||||
"SOAR_MIN_THML_S": 25,
|
||||
})
|
||||
|
||||
self.set_current_waypoint(1)
|
||||
self.change_mode('AUTO')
|
||||
self.wait_ready_to_arm()
|
||||
self.arm_vehicle()
|
||||
|
||||
# Wait to detect thermal
|
||||
self.progress("Waiting for thermal")
|
||||
self.wait_mode('THERMAL', timeout=600)
|
||||
|
||||
self.set_parameter("SOAR_VSPEED", 0.6)
|
||||
|
||||
# Wait to climb to SOAR_ALT_MAX
|
||||
self.progress("Waiting for climb to max altitude")
|
||||
alt_max = self.get_parameter('SOAR_ALT_MAX')
|
||||
@ -2913,7 +2919,7 @@ class AutoTestPlane(AutoTest):
|
||||
self.wait_and_maintain_wind_estimate(
|
||||
5, 45,
|
||||
speed_tolerance=1,
|
||||
timeout=20
|
||||
timeout=30
|
||||
)
|
||||
self.fly_home_land_and_disarm()
|
||||
|
||||
@ -4569,7 +4575,7 @@ class AutoTestPlane(AutoTest):
|
||||
self.AltResetBadGPS,
|
||||
self.AirspeedCal,
|
||||
self.MissionJumpTags,
|
||||
self.GCSFailsafe,
|
||||
Test(self.GCSFailsafe, speedup=8),
|
||||
self.SDCardWPTest,
|
||||
])
|
||||
return ret
|
||||
|
@ -33,7 +33,6 @@ import helicopter
|
||||
|
||||
import examples
|
||||
from pysim import util
|
||||
from pymavlink import mavutil
|
||||
from pymavlink.generator import mavtemplate
|
||||
|
||||
from common import Test
|
||||
@ -58,47 +57,6 @@ def buildlogs_path(path):
|
||||
return os.path.join(*bits)
|
||||
|
||||
|
||||
def get_default_params(atype, binary):
|
||||
"""Get default parameters."""
|
||||
# use rover simulator so SITL is not starved of input
|
||||
HOME = mavutil.location(40.071374969556928,
|
||||
-105.22978898137808,
|
||||
1583.702759,
|
||||
246)
|
||||
if "plane" in binary or "rover" in binary:
|
||||
frame = "rover"
|
||||
else:
|
||||
frame = "+"
|
||||
|
||||
home = "%f,%f,%u,%u" % (HOME.lat, HOME.lng, HOME.alt, HOME.heading)
|
||||
mavproxy_master = 'tcp:127.0.0.1:5760'
|
||||
sitl = util.start_SITL(binary,
|
||||
wipe=True,
|
||||
model=frame,
|
||||
home=home,
|
||||
speedup=10,
|
||||
unhide_parameters=True)
|
||||
mavproxy = util.start_MAVProxy_SITL(atype,
|
||||
master=mavproxy_master)
|
||||
print("Dumping defaults")
|
||||
idx = mavproxy.expect([r'Saved [0-9]+ parameters to (\S+)'])
|
||||
if idx == 0:
|
||||
# we need to restart it after eeprom erase
|
||||
util.pexpect_close(mavproxy)
|
||||
util.pexpect_close(sitl)
|
||||
sitl = util.start_SITL(binary, model=frame, home=home, speedup=10)
|
||||
mavproxy = util.start_MAVProxy_SITL(atype,
|
||||
master=mavproxy_master)
|
||||
mavproxy.expect(r'Saved [0-9]+ parameters to (\S+)')
|
||||
parmfile = mavproxy.match.group(1)
|
||||
dest = buildlogs_path('%s-defaults.parm' % atype)
|
||||
shutil.copy(parmfile, dest)
|
||||
util.pexpect_close(mavproxy)
|
||||
util.pexpect_close(sitl)
|
||||
print("Saved defaults for %s to %s" % (atype, dest))
|
||||
return True
|
||||
|
||||
|
||||
def build_all_filepath():
|
||||
"""Get build_all.sh path."""
|
||||
return util.reltopdir('Tools/scripts/build_all.sh')
|
||||
@ -484,6 +442,11 @@ def run_step(step):
|
||||
return util.build_replay(board='SITL')
|
||||
|
||||
if vehicle_binary is not None:
|
||||
try:
|
||||
binary = binary_path(step, debug=opts.debug)
|
||||
os.unlink(binary)
|
||||
except (FileNotFoundError, ValueError):
|
||||
pass
|
||||
if len(vehicle_binary.split(".")) == 1:
|
||||
return util.build_SITL(vehicle_binary, **build_opts)
|
||||
else:
|
||||
@ -495,9 +458,6 @@ def run_step(step):
|
||||
|
||||
binary = binary_path(step, debug=opts.debug)
|
||||
|
||||
if step.startswith("defaults"):
|
||||
vehicle = step[9:]
|
||||
return get_default_params(vehicle, binary)
|
||||
supplementary_binaries = []
|
||||
if step in suplementary_test_binary_map:
|
||||
for supplementary_test_binary in suplementary_test_binary_map[step]:
|
||||
@ -690,9 +650,10 @@ def write_fullresults():
|
||||
results.addglob("GPX track", '*.gpx')
|
||||
|
||||
# results common to all vehicles:
|
||||
vehicle_files = [('{vehicle} defaults', '{vehicle}-defaults.parm'),
|
||||
('{vehicle} core', '{vehicle}.core'),
|
||||
('{vehicle} ELF', '{vehicle}.elf'), ]
|
||||
vehicle_files = [
|
||||
('{vehicle} core', '{vehicle}.core'),
|
||||
('{vehicle} ELF', '{vehicle}.elf'),
|
||||
]
|
||||
vehicle_globs = [('{vehicle} log', '{vehicle}-*.BIN'), ]
|
||||
for vehicle in all_vehicles():
|
||||
subs = {'vehicle': vehicle}
|
||||
@ -1082,33 +1043,28 @@ if __name__ == "__main__":
|
||||
'run.examples',
|
||||
|
||||
'build.Plane',
|
||||
'defaults.Plane',
|
||||
'test.Plane',
|
||||
'test.QuadPlane',
|
||||
|
||||
'build.Rover',
|
||||
'defaults.Rover',
|
||||
'test.Rover',
|
||||
'test.BalanceBot',
|
||||
'test.Sailboat',
|
||||
|
||||
'build.Copter',
|
||||
'defaults.Copter',
|
||||
'test.Copter',
|
||||
|
||||
'build.Helicopter',
|
||||
'test.Helicopter',
|
||||
|
||||
'build.Tracker',
|
||||
'defaults.Tracker',
|
||||
'test.Tracker',
|
||||
|
||||
'build.Sub',
|
||||
'defaults.Sub',
|
||||
'test.Sub',
|
||||
|
||||
'build.Blimp',
|
||||
'defaults.Blimp',
|
||||
'test.Blimp',
|
||||
|
||||
'build.SITLPeriphGPS',
|
||||
'test.CAN',
|
||||
@ -1149,11 +1105,6 @@ if __name__ == "__main__":
|
||||
"drive.balancebot": "test.BalanceBot",
|
||||
"fly.CopterAVC": "test.Helicopter",
|
||||
"test.AntennaTracker": "test.Tracker",
|
||||
"defaults.ArduCopter": "defaults.Copter",
|
||||
"defaults.ArduPlane": "defaults.Plane",
|
||||
"defaults.ArduSub": "defaults.Sub",
|
||||
"defaults.APMrover2": "defaults.Rover",
|
||||
"defaults.AntennaTracker": "defaults.Tracker",
|
||||
"fly.ArduCopterTests1a": "test.CopterTests1a",
|
||||
"fly.ArduCopterTests1b": "test.CopterTests1b",
|
||||
"fly.ArduCopterTests1c": "test.CopterTests1c",
|
||||
|
@ -1984,7 +1984,8 @@ class AutoTest(ABC):
|
||||
self.progress("Rebooting SITL")
|
||||
self.reboot_sitl_mav(required_bootcount=required_bootcount, force=force)
|
||||
self.do_heartbeats(force=True)
|
||||
self.assert_simstate_location_is_at_startup_location()
|
||||
if self.frame != 'sailboat': # sailboats drift with wind!
|
||||
self.assert_simstate_location_is_at_startup_location()
|
||||
|
||||
def reboot_sitl_mavproxy(self, required_bootcount=None):
|
||||
"""Reboot SITL instance using MAVProxy and wait for it to reconnect."""
|
||||
@ -2038,6 +2039,7 @@ class AutoTest(ABC):
|
||||
|
||||
def set_streamrate(self, streamrate, timeout=20, stream=mavutil.mavlink.MAV_DATA_STREAM_ALL):
|
||||
'''set MAV_DATA_STREAM_ALL; timeout is wallclock time'''
|
||||
self.do_timesync_roundtrip(timeout_in_wallclock=True)
|
||||
tstart = time.time()
|
||||
while True:
|
||||
if time.time() - tstart > timeout:
|
||||
@ -3363,17 +3365,19 @@ class AutoTest(ABC):
|
||||
self.progress("Received: %s" % str(m))
|
||||
if m is None:
|
||||
continue
|
||||
if m.tc1 == 0:
|
||||
self.progress("this is a timesync request, which we don't answer")
|
||||
continue
|
||||
if m.ts1 % 1000 != self.mav.source_system:
|
||||
self.progress("this isn't a response to our timesync (%s)" % (m.ts1 % 1000))
|
||||
continue
|
||||
if m.tc1 == 0:
|
||||
# this should also not happen:
|
||||
self.progress("this is a timesync request, which we don't answer")
|
||||
continue
|
||||
if int(m.ts1 / 1000) != self.timesync_number:
|
||||
self.progress("this isn't the one we just sent")
|
||||
continue
|
||||
if m.get_srcSystem() != self.mav.target_system:
|
||||
self.progress("response from system other than our target")
|
||||
self.progress("response from system other than our target (want=%u got=%u" %
|
||||
(self.mav.target_system, m.get_srcSystem()))
|
||||
continue
|
||||
# no component check ATM because we send broadcast...
|
||||
# if m.get_srcComponent() != self.mav.target_component:
|
||||
@ -4473,13 +4477,14 @@ class AutoTest(ABC):
|
||||
raise ValueError("count %u not handled" % count)
|
||||
self.progress("Rally content same")
|
||||
|
||||
def load_rally(self, filename):
|
||||
def load_rally_using_mavproxy(self, filename):
|
||||
"""Load rally points from a file to flight controller."""
|
||||
self.progress("Loading rally points (%s)" % filename)
|
||||
path = os.path.join(testdir, self.current_test_name_directory, filename)
|
||||
mavproxy = self.start_mavproxy()
|
||||
mavproxy.send('rally load %s\n' % path)
|
||||
mavproxy.expect("Loaded")
|
||||
self.delay_sim_time(10) # allow transfer to complete
|
||||
self.stop_mavproxy(mavproxy)
|
||||
|
||||
def load_sample_mission(self):
|
||||
@ -6379,10 +6384,13 @@ class AutoTest(ABC):
|
||||
**kwargs
|
||||
)
|
||||
|
||||
def wait_altitude(self, altitude_min, altitude_max, relative=False, timeout=30, **kwargs):
|
||||
def wait_altitude(self, altitude_min, altitude_max, relative=False, timeout=None, **kwargs):
|
||||
"""Wait for a given altitude range."""
|
||||
assert altitude_min <= altitude_max, "Minimum altitude should be less than maximum altitude."
|
||||
|
||||
if timeout is None:
|
||||
timeout = 30
|
||||
|
||||
def validator(value2, target2=None):
|
||||
if altitude_min <= value2 <= altitude_max:
|
||||
return True
|
||||
@ -6767,11 +6775,12 @@ class AutoTest(ABC):
|
||||
return Vector3(msg.vx, msg.vy, msg.vz)
|
||||
|
||||
"""Wait for a given speed vector."""
|
||||
def wait_speed_vector(self, speed_vector, accuracy=0.2, timeout=30, **kwargs):
|
||||
def wait_speed_vector(self, speed_vector, accuracy=0.3, timeout=30, **kwargs):
|
||||
def validator(value2, target2):
|
||||
return (math.fabs(value2.x - target2.x) <= accuracy and
|
||||
math.fabs(value2.y - target2.y) <= accuracy and
|
||||
math.fabs(value2.z - target2.z) <= accuracy)
|
||||
for (want, got) in (target2.x, value2.x), (target2.y, value2.y), (target2.z, value2.z):
|
||||
if want != float("nan") and (math.fabs(got - want) > accuracy):
|
||||
return False
|
||||
return True
|
||||
|
||||
self.wait_and_maintain(
|
||||
value_name="SpeedVector",
|
||||
@ -7205,7 +7214,7 @@ class AutoTest(ABC):
|
||||
|
||||
def wait_gps_sys_status_not_present_or_enabled_and_healthy(self, timeout=30):
|
||||
self.progress("Waiting for GPS health")
|
||||
tstart = self.get_sim_time_cached()
|
||||
tstart = self.get_sim_time()
|
||||
while True:
|
||||
now = self.get_sim_time_cached()
|
||||
if now - tstart > timeout:
|
||||
@ -7646,6 +7655,10 @@ Also, ignores heartbeats not from our target system'''
|
||||
self.mav.mav.set_send_callback(self.send_message_hook, self)
|
||||
self.mav.idle_hooks.append(self.idle_hook)
|
||||
|
||||
# we need to wait for a heartbeat here. If we don't then
|
||||
# self.mav.target_system will be zero because it hasn't
|
||||
# "locked on" to a target system yet.
|
||||
self.wait_heartbeat()
|
||||
self.set_streamrate(self.sitl_streamrate())
|
||||
|
||||
def show_test_timings_key_sorter(self, t):
|
||||
@ -7855,6 +7868,9 @@ Also, ignores heartbeats not from our target system'''
|
||||
passed = False
|
||||
reset_needed = True
|
||||
|
||||
# if we haven't already reset ArduPilot because it's dead,
|
||||
# then ensure the vehicle was disarmed at the end of the test.
|
||||
# If it wasn't then the test is considered failed:
|
||||
if ardupilot_alive and self.armed() and not self.is_tracker():
|
||||
if ex is None:
|
||||
ex = ArmedAtEndOfTestException("Still armed at end of test")
|
||||
@ -7871,6 +7887,9 @@ Also, ignores heartbeats not from our target system'''
|
||||
self.progress("Force-rebooting SITL")
|
||||
self.reboot_sitl() # that'll learn it
|
||||
passed = False
|
||||
elif not passed: # implicit reboot after a failed test:
|
||||
self.progress("Test failed but ArduPilot process alive; rebooting")
|
||||
self.reboot_sitl() # that'll learn it
|
||||
|
||||
if self._mavproxy is not None:
|
||||
self.progress("Stopping auto-started mavproxy")
|
||||
@ -8014,6 +8033,11 @@ Also, ignores heartbeats not from our target system'''
|
||||
self.sup_prog.append(sup_prog_link)
|
||||
self.expect_list_add(sup_prog_link)
|
||||
|
||||
# mavlink will have disconnected here. Explicitly reconnect,
|
||||
# or the first packet we send will be lost:
|
||||
if self.mav is not None:
|
||||
self.mav.reconnect()
|
||||
|
||||
def get_suplementary_programs(self):
|
||||
return self.sup_prog
|
||||
|
||||
@ -8374,11 +8398,11 @@ Also, ignores heartbeats not from our target system'''
|
||||
start_loc = self.sitl_start_location()
|
||||
self.progress("SITL start loc: %s" % str(start_loc))
|
||||
delta = abs(orig_home.latitude * 1.0e-7 - start_loc.lat)
|
||||
if delta > 0.000001:
|
||||
if delta > 0.000006:
|
||||
raise ValueError("homes differ in lat got=%f vs want=%f delta=%f" %
|
||||
(orig_home.latitude * 1.0e-7, start_loc.lat, delta))
|
||||
delta = abs(orig_home.longitude * 1.0e-7 - start_loc.lng)
|
||||
if delta > 0.000001:
|
||||
if delta > 0.000006:
|
||||
raise ValueError("homes differ in lon got=%f vs want=%f delta=%f" %
|
||||
(orig_home.longitude * 1.0e-7, start_loc.lng, delta))
|
||||
if self.is_rover():
|
||||
@ -9569,6 +9593,8 @@ Also, ignores heartbeats not from our target system'''
|
||||
self.set_rc(interlock_channel, 1000)
|
||||
|
||||
self.start_subtest("Test all mode arming")
|
||||
self.wait_ready_to_arm()
|
||||
|
||||
if self.arming_test_mission() is not None:
|
||||
self.load_mission(self.arming_test_mission())
|
||||
|
||||
@ -12980,6 +13006,7 @@ switch value'''
|
||||
(msg, m.alt, gpi_alt))
|
||||
introduced_error = 10 # in metres
|
||||
self.set_parameter("SIM_GPS2_ALT_OFS", introduced_error)
|
||||
self.do_timesync_roundtrip()
|
||||
m = self.assert_receive_message("GPS2_RAW")
|
||||
if abs((m.alt-introduced_error*1000) - gpi_alt) > 100:
|
||||
raise NotAchievedException("skewed Alt (%s) discrepancy; %d+%d vs %d" %
|
||||
@ -12998,9 +13025,11 @@ switch value'''
|
||||
if abs(new_gpi_alt2 - m.alt) > 100:
|
||||
raise NotAchievedException("Failover not detected")
|
||||
|
||||
def fetch_file_via_ftp(self, path):
|
||||
def fetch_file_via_ftp(self, path, timeout=20):
|
||||
'''returns the content of the FTP'able file at path'''
|
||||
self.progress("Retrieving (%s) using MAVProxy" % path)
|
||||
mavproxy = self.start_mavproxy()
|
||||
mavproxy.expect("Saved .* parameters to")
|
||||
ex = None
|
||||
tmpfile = tempfile.NamedTemporaryFile(mode='r', delete=False)
|
||||
try:
|
||||
@ -13009,9 +13038,18 @@ switch value'''
|
||||
mavproxy.send("ftp set debug 1\n") # so we get the "Terminated session" message
|
||||
mavproxy.send("ftp get %s %s\n" % (path, tmpfile.name))
|
||||
mavproxy.expect("Getting")
|
||||
self.delay_sim_time(2)
|
||||
mavproxy.send("ftp status\n")
|
||||
mavproxy.expect("No transfer in progress")
|
||||
tstart = self.get_sim_time()
|
||||
while True:
|
||||
now = self.get_sim_time()
|
||||
if now - tstart > timeout:
|
||||
raise NotAchievedException("expected complete transfer")
|
||||
self.progress("Polling status")
|
||||
mavproxy.send("ftp status\n")
|
||||
try:
|
||||
mavproxy.expect("No transfer in progress", timeout=1)
|
||||
break
|
||||
except Exception:
|
||||
continue
|
||||
# terminate the connection, or it may still be in progress the next time an FTP is attempted:
|
||||
mavproxy.send("ftp cancel\n")
|
||||
mavproxy.expect("Terminated session")
|
||||
|
@ -1 +1,2 @@
|
||||
Q_OPTIONS 64
|
||||
ICE_RPM_THRESH 50 # idles at 70 (1% thrust)
|
||||
|
@ -161,7 +161,7 @@ class AutoTestHelicopter(AutoTestCopter):
|
||||
self.user_takeoff(alt_min=alt_min)
|
||||
else:
|
||||
self.set_rc(3, takeoff_throttle)
|
||||
self.wait_for_alt(alt_min=alt_min, timeout=timeout)
|
||||
self.wait_altitude(alt_min-1, alt_min+5, relative=True, timeout=timeout)
|
||||
self.hover()
|
||||
self.progress("TAKEOFF COMPLETE")
|
||||
|
||||
|
@ -124,6 +124,8 @@ known_units = {
|
||||
'RPM' : 'Revolutions Per Minute',
|
||||
'kg/m/m' : 'kilograms per square meter', # metre is the SI unit name, meter is the american spelling of it
|
||||
'kg/m/m/m': 'kilograms per cubic meter',
|
||||
'litres' : 'litres',
|
||||
'Ohm' : 'Ohm',
|
||||
}
|
||||
|
||||
required_param_fields = [
|
||||
|
@ -393,6 +393,31 @@ class FakeMacOSXSpawn(object):
|
||||
return True
|
||||
|
||||
|
||||
class PSpawnStdPrettyPrinter(object):
|
||||
'''a fake filehandle-like object which prefixes a string to all lines
|
||||
before printing to stdout/stderr. To be used to pass to
|
||||
pexpect.spawn's logfile argument
|
||||
'''
|
||||
def __init__(self, output=sys.stdout, prefix="stdout"):
|
||||
self.output = output
|
||||
self.prefix = prefix
|
||||
self.buffer = ""
|
||||
|
||||
def close(self):
|
||||
self.print_prefixed_line(self.buffer)
|
||||
|
||||
def write(self, data):
|
||||
self.buffer += data
|
||||
for line in self.buffer.split("\n"):
|
||||
self.print_prefixed_line(line)
|
||||
|
||||
def print_prefixed_line(self, line):
|
||||
print("%s: %s" % (self.prefix, line), file=self.output)
|
||||
|
||||
def flush(self):
|
||||
pass
|
||||
|
||||
|
||||
def start_SITL(binary,
|
||||
valgrind=False,
|
||||
callgrind=False,
|
||||
@ -411,7 +436,8 @@ def start_SITL(binary,
|
||||
customisations=[],
|
||||
lldb=False,
|
||||
enable_fgview_output=False,
|
||||
supplementary=False):
|
||||
supplementary=False,
|
||||
stdout_prefix=None):
|
||||
|
||||
if model is None and not supplementary:
|
||||
raise ValueError("model must not be None")
|
||||
@ -513,6 +539,11 @@ def start_SITL(binary,
|
||||
|
||||
cmd.extend(customisations)
|
||||
|
||||
pexpect_logfile_prefix = stdout_prefix
|
||||
if pexpect_logfile_prefix is None:
|
||||
pexpect_logfile_prefix = os.path.basename(binary)
|
||||
pexpect_logfile = PSpawnStdPrettyPrinter(prefix=pexpect_logfile_prefix)
|
||||
|
||||
if (gdb or lldb) and sys.platform == "darwin" and os.getenv('DISPLAY'):
|
||||
global windowID
|
||||
# on MacOS record the window IDs so we can close them later
|
||||
@ -550,7 +581,7 @@ def start_SITL(binary,
|
||||
# AP gets a redirect-stdout-to-filehandle option. So, in the
|
||||
# meantime, return a dummy:
|
||||
return pexpect.spawn("true", ["true"],
|
||||
logfile=sys.stdout,
|
||||
logfile=pexpect_logfile,
|
||||
encoding=ENCODING,
|
||||
timeout=5)
|
||||
else:
|
||||
@ -558,7 +589,7 @@ def start_SITL(binary,
|
||||
|
||||
first = cmd[0]
|
||||
rest = cmd[1:]
|
||||
child = pexpect.spawn(first, rest, logfile=sys.stdout, encoding=ENCODING, timeout=5)
|
||||
child = pexpect.spawn(first, rest, logfile=pexpect_logfile, encoding=ENCODING, timeout=5)
|
||||
pexpect_autoclose(child)
|
||||
# give time for parameters to properly setup
|
||||
time.sleep(3)
|
||||
|
@ -946,7 +946,7 @@ class AutoTestQuadPlane(AutoTest):
|
||||
self.wait_rpm(1, 6500, 7500, minimum_duration=30, timeout=40)
|
||||
self.progress("Setting min-throttle")
|
||||
self.set_rc(3, 1000)
|
||||
self.wait_rpm(1, 300, 400, minimum_duration=1)
|
||||
self.wait_rpm(1, 65, 75, minimum_duration=1)
|
||||
self.progress("Setting engine-start RC switch to LOW")
|
||||
self.set_rc(rc_engine_start_chan, 1000)
|
||||
self.wait_rpm(1, 0, 0, minimum_duration=1)
|
||||
|
@ -1290,22 +1290,27 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
|
||||
|
||||
def Rally(self):
|
||||
'''Test Rally Points'''
|
||||
self.load_rally("rover-test-rally.txt")
|
||||
self.load_rally_using_mavproxy("rover-test-rally.txt")
|
||||
self.assert_parameter_value('RALLY_TOTAL', 2)
|
||||
|
||||
self.wait_ready_to_arm()
|
||||
self.arm_vehicle()
|
||||
|
||||
# calculate early to avoid round-trips while vehicle is moving:
|
||||
accuracy = self.get_parameter("WP_RADIUS")
|
||||
|
||||
self.reach_heading_manual(10)
|
||||
self.reach_distance_manual(50)
|
||||
|
||||
self.change_mode("RTL")
|
||||
|
||||
# location copied in from rover-test-rally.txt:
|
||||
loc = mavutil.location(40.071553,
|
||||
-105.229401,
|
||||
0,
|
||||
0)
|
||||
accuracy = self.get_parameter("WP_RADIUS")
|
||||
self.wait_location(loc, accuracy=accuracy, minimum_duration=10)
|
||||
|
||||
self.wait_location(loc, accuracy=accuracy, minimum_duration=10, timeout=45)
|
||||
self.disarm_vehicle()
|
||||
|
||||
def fence_with_bad_frame(self, target_system=1, target_component=1):
|
||||
@ -6289,7 +6294,6 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
|
||||
self.DriveRTL,
|
||||
self.SmartRTL,
|
||||
self.DriveSquare,
|
||||
self.DriveMaxRCIN,
|
||||
self.DriveMission,
|
||||
# self.DriveBrake, # disabled due to frequent failures
|
||||
self.GetBanner,
|
||||
|
BIN
Tools/bootloaders/BETAFPV-F405_bl.bin
generated
Normal file
BIN
Tools/bootloaders/BETAFPV-F405_bl.bin
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/BETAFPV-F405_bl.hex
generated
Normal file
BIN
Tools/bootloaders/BETAFPV-F405_bl.hex
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/BlitzF745AIO_bl.bin
generated
Normal file
BIN
Tools/bootloaders/BlitzF745AIO_bl.bin
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/BlitzF745AIO_bl.hex
generated
Normal file
BIN
Tools/bootloaders/BlitzF745AIO_bl.hex
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/CubeOrangePlus-bdshot_bl.bin
generated
Executable file
BIN
Tools/bootloaders/CubeOrangePlus-bdshot_bl.bin
generated
Executable file
Binary file not shown.
BIN
Tools/bootloaders/CubeOrangePlus-bdshot_bl.hex
generated
Normal file
BIN
Tools/bootloaders/CubeOrangePlus-bdshot_bl.hex
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/DevEBoxH7v2_bl.bin
generated
BIN
Tools/bootloaders/DevEBoxH7v2_bl.bin
generated
Binary file not shown.
BIN
Tools/bootloaders/DevEBoxH7v2_bl.hex
generated
BIN
Tools/bootloaders/DevEBoxH7v2_bl.hex
generated
Binary file not shown.
BIN
Tools/bootloaders/HEEWING-F405_bl.bin
generated
Normal file
BIN
Tools/bootloaders/HEEWING-F405_bl.bin
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/HEEWING-F405_bl.hex
generated
Normal file
BIN
Tools/bootloaders/HEEWING-F405_bl.hex
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/HEEWING-F405v2_bl.bin
generated
Normal file
BIN
Tools/bootloaders/HEEWING-F405v2_bl.bin
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/HEEWING-F405v2_bl.hex
generated
Normal file
BIN
Tools/bootloaders/HEEWING-F405v2_bl.hex
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/JFB100_bl.bin
generated
Normal file
BIN
Tools/bootloaders/JFB100_bl.bin
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/JFB100_bl.hex
generated
Normal file
BIN
Tools/bootloaders/JFB100_bl.hex
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/KakuteH7-Wing_bl.bin
generated
Executable file
BIN
Tools/bootloaders/KakuteH7-Wing_bl.bin
generated
Executable file
Binary file not shown.
BIN
Tools/bootloaders/KakuteH7-Wing_bl.hex
generated
Normal file
BIN
Tools/bootloaders/KakuteH7-Wing_bl.hex
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/MatekF405-TE-bdshot_bl.bin
generated
Normal file
BIN
Tools/bootloaders/MatekF405-TE-bdshot_bl.bin
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/MatekF405-TE-bdshot_bl.hex
generated
Normal file
BIN
Tools/bootloaders/MatekF405-TE-bdshot_bl.hex
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/SDMODELH7V1_bl.bin
generated
Executable file
BIN
Tools/bootloaders/SDMODELH7V1_bl.bin
generated
Executable file
Binary file not shown.
BIN
Tools/bootloaders/SDMODELH7V1_bl.elf
generated
Executable file
BIN
Tools/bootloaders/SDMODELH7V1_bl.elf
generated
Executable file
Binary file not shown.
BIN
Tools/bootloaders/SDMODELH7V1_bl.hex
generated
Normal file
BIN
Tools/bootloaders/SDMODELH7V1_bl.hex
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/SIYI_N7_bl.bin
generated
Executable file
BIN
Tools/bootloaders/SIYI_N7_bl.bin
generated
Executable file
Binary file not shown.
BIN
Tools/bootloaders/SPRacingH7_bl.bin
generated
BIN
Tools/bootloaders/SPRacingH7_bl.bin
generated
Binary file not shown.
BIN
Tools/bootloaders/SPRacingH7_bl.hex
generated
BIN
Tools/bootloaders/SPRacingH7_bl.hex
generated
Binary file not shown.
BIN
Tools/bootloaders/SpeedyBeeF405Mini_bl.bin
generated
Normal file
BIN
Tools/bootloaders/SpeedyBeeF405Mini_bl.bin
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/SpeedyBeeF405Mini_bl.hex
generated
Normal file
BIN
Tools/bootloaders/SpeedyBeeF405Mini_bl.hex
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/SpeedyBeeF405WING_bl.bin
generated
Executable file
BIN
Tools/bootloaders/SpeedyBeeF405WING_bl.bin
generated
Executable file
Binary file not shown.
BIN
Tools/bootloaders/TMotorH743_bl.bin
generated
Normal file
BIN
Tools/bootloaders/TMotorH743_bl.bin
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/TMotorH743_bl.hex
generated
Normal file
BIN
Tools/bootloaders/TMotorH743_bl.hex
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/YJUAV_A6SE_H743_bl.bin
generated
Normal file
BIN
Tools/bootloaders/YJUAV_A6SE_H743_bl.bin
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/YJUAV_A6SE_H743_bl.hex
generated
Normal file
BIN
Tools/bootloaders/YJUAV_A6SE_H743_bl.hex
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/YJUAV_A6SE_bl.bin
generated
Normal file
BIN
Tools/bootloaders/YJUAV_A6SE_bl.bin
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/YJUAV_A6SE_bl.hex
generated
Normal file
BIN
Tools/bootloaders/YJUAV_A6SE_bl.hex
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/mRoCZeroOEMH7-bdshot_bl.bin
generated
Executable file
BIN
Tools/bootloaders/mRoCZeroOEMH7-bdshot_bl.bin
generated
Executable file
Binary file not shown.
BIN
Tools/bootloaders/mRoCZeroOEMH7-bdshot_bl.hex
generated
Normal file
BIN
Tools/bootloaders/mRoCZeroOEMH7-bdshot_bl.hex
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/speedybeef4v4_bl.bin
generated
Normal file
BIN
Tools/bootloaders/speedybeef4v4_bl.bin
generated
Normal file
Binary file not shown.
BIN
Tools/bootloaders/speedybeef4v4_bl.hex
generated
Normal file
BIN
Tools/bootloaders/speedybeef4v4_bl.hex
generated
Normal file
Binary file not shown.
@ -26,7 +26,7 @@ BASE_PKGS="base-devel ccache git gsfonts tk wget gcc"
|
||||
SITL_PKGS="python-pip python-setuptools python-wheel python-wxpython opencv python-numpy python-scipy"
|
||||
PX4_PKGS="lib32-glibc zip zlib ncurses"
|
||||
|
||||
PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect argparse matplotlib pyparsing geocoder pyserial empy dronecan"
|
||||
PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect argparse matplotlib pyparsing geocoder pyserial empy==3.3.4 dronecan"
|
||||
|
||||
# GNU Tools for ARM Embedded Processors
|
||||
# (see https://launchpad.net/gcc-arm-embedded/)
|
||||
|
@ -159,7 +159,7 @@ if [[ $DO_AP_STM_ENV -eq 1 ]]; then
|
||||
install_arm_none_eabi_toolchain
|
||||
fi
|
||||
|
||||
PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect geocoder flake8 empy dronecan"
|
||||
PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect geocoder flake8 empy==3.3.4 dronecan"
|
||||
# add some Python packages required for commonly-used MAVProxy modules and hex file generation:
|
||||
if [[ $SKIP_AP_EXT_ENV -ne 1 ]]; then
|
||||
PYTHON_PKGS="$PYTHON_PKGS intelhex gnureadline"
|
||||
|
@ -144,9 +144,9 @@ fi
|
||||
BASE_PKGS="build-essential ccache g++ gawk git make wget"
|
||||
if [ ${RELEASE_CODENAME} == 'bionic' ]; then
|
||||
# use fixed version for package that drop python2 support
|
||||
PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect flake8==3.7.9 requests==2.27.1 monotonic==1.6 geocoder empy configparser==4.0.2 click==7.1.2 decorator==4.4.2 dronecan"
|
||||
PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect flake8==3.7.9 requests==2.27.1 monotonic==1.6 geocoder empy==3.3.4 configparser==4.0.2 click==7.1.2 decorator==4.4.2 dronecan"
|
||||
else
|
||||
PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect flake8 geocoder empy dronecan"
|
||||
PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect flake8 geocoder empy==3.3.4 dronecan"
|
||||
fi
|
||||
|
||||
# add some Python packages required for commonly-used MAVProxy modules and hex file generation:
|
||||
|
@ -19,7 +19,7 @@ Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -
|
||||
Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'ln -sf /usr/bin/pip3.7 /usr/bin/pip'"
|
||||
|
||||
Write-Output "Downloading extra Python packages (5/8)"
|
||||
Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'pip install empy pyserial pymavlink intelhex dronecan pexpect'"
|
||||
Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'pip install empy==3.3.4 pyserial pymavlink intelhex dronecan pexpect'"
|
||||
|
||||
Write-Output "Downloading APM source (6/8)"
|
||||
Copy-Item "APM_install.sh" -Destination "C:\cygwin64\home"
|
||||
|
@ -19,7 +19,7 @@ Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -
|
||||
Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'ln -sf /usr/bin/pip3.7 /usr/bin/pip'"
|
||||
|
||||
Write-Output "Downloading extra Python packages (5/7)"
|
||||
Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'pip install empy pyserial pymavlink intelhex dronecan pexpect'"
|
||||
Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'pip install empy==3.3.4 pyserial pymavlink intelhex dronecan pexpect'"
|
||||
|
||||
Write-Output "Installing ARM GCC Compiler 10-2020-Q4-Major (6/7)"
|
||||
& $PSScriptRoot\gcc-arm-none-eabi-10-2020-q4-major-win32.exe /S /P /R
|
||||
|
@ -35,16 +35,27 @@ else:
|
||||
running_python3 = True
|
||||
|
||||
|
||||
def topdir():
|
||||
'''return path to ardupilot checkout directory. This is to cope with
|
||||
running on developer's machines (where autotest is typically
|
||||
invoked from the root directory), and on the autotest server where
|
||||
it is invoked in the checkout's parent directory.
|
||||
'''
|
||||
for path in [
|
||||
os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", ".."),
|
||||
"",
|
||||
]:
|
||||
if os.path.exists(os.path.join(path, "libraries", "AP_HAL_ChibiOS")):
|
||||
return path
|
||||
raise Exception("Unable to find ardupilot checkout dir")
|
||||
|
||||
|
||||
def is_chibios_build(board):
|
||||
'''see if a board is using HAL_ChibiOS'''
|
||||
# cope with both running from Tools/scripts or running from cwd
|
||||
hwdef_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", "libraries", "AP_HAL_ChibiOS", "hwdef")
|
||||
if os.path.exists(os.path.join(hwdef_dir, board, "hwdef.dat")):
|
||||
return True
|
||||
hwdef_dir = os.path.join("libraries", "AP_HAL_ChibiOS", "hwdef")
|
||||
if os.path.exists(os.path.join(hwdef_dir, board, "hwdef.dat")):
|
||||
return True
|
||||
return False
|
||||
hwdef_dir = os.path.join(topdir(), "libraries", "AP_HAL_ChibiOS", "hwdef")
|
||||
|
||||
return os.path.exists(os.path.join(hwdef_dir, board, "hwdef.dat"))
|
||||
|
||||
|
||||
def get_required_compiler(vehicle, tag, board):
|
||||
@ -491,6 +502,20 @@ is bob we will attempt to checkout bob-AVR'''
|
||||
files_to_copy.append((filepath, os.path.basename(filepath)))
|
||||
if not os.path.exists(bare_path):
|
||||
raise Exception("No elf file?!")
|
||||
|
||||
# attempt to run an extract_features.py to create features.txt:
|
||||
features_text = None
|
||||
ef_path = os.path.join(topdir(), "Tools", "scripts", "extract_features.py")
|
||||
if os.path.exists(ef_path):
|
||||
try:
|
||||
features_text = self.run_program("EF", [ef_path, bare_path], show_output=False)
|
||||
except Exception as e:
|
||||
self.print_exception_caught(e)
|
||||
self.progress("Failed to extract features")
|
||||
pass
|
||||
else:
|
||||
self.progress("Not extracting features as (%s) does not exist" % (ef_path,))
|
||||
|
||||
# only rename the elf if we have have other files to
|
||||
# copy. So linux gets "arducopter" and stm32 gets
|
||||
# "arducopter.elf"
|
||||
@ -512,6 +537,9 @@ is bob we will attempt to checkout bob-AVR'''
|
||||
if not os.path.exists(ddir):
|
||||
self.mkpath(ddir)
|
||||
self.addfwversion(ddir, vehicle)
|
||||
features_filepath = os.path.join(ddir, "features.txt",)
|
||||
self.progress("Writing (%s)" % features_filepath)
|
||||
self.write_string_to_filepath(features_text, features_filepath)
|
||||
self.progress("Copying %s to %s" % (path, ddir,))
|
||||
shutil.copy(path, os.path.join(ddir, target_filename))
|
||||
# the most recent build of every tag is kept around:
|
||||
@ -521,10 +549,13 @@ is bob we will attempt to checkout bob-AVR'''
|
||||
# must addfwversion even if path already
|
||||
# exists as we re-use the "beta" directories
|
||||
self.addfwversion(tdir, vehicle)
|
||||
features_filepath = os.path.join(tdir, "features.txt")
|
||||
self.progress("Writing (%s)" % features_filepath)
|
||||
self.write_string_to_filepath(features_text, features_filepath)
|
||||
shutil.copy(path, os.path.join(tdir, target_filename))
|
||||
except Exception as e:
|
||||
self.print_exception_caught(e)
|
||||
self.progress("Failed to copy %s to %s: %s" % (path, ddir, str(e)))
|
||||
self.progress("Failed to copy %s to %s: %s" % (path, tdir, str(e)))
|
||||
# why is touching this important? -pb20170816
|
||||
self.touch_filepath(os.path.join(self.binaries,
|
||||
vehicle_binaries_subdir, tag))
|
||||
|
@ -366,7 +366,7 @@ for t in $CI_BUILD_TARGET; do
|
||||
echo "Building signed firmwares"
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python3-dev
|
||||
python3 -m pip install pymonocypher
|
||||
python3 -m pip install pymonocypher==3.1.3.2
|
||||
./Tools/scripts/signing/generate_keys.py testkey
|
||||
$waf configure --board CubeOrange-ODID --signed-fw --private-key testkey_private_key.dat
|
||||
$waf copter
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user