Commit Graph
1275 Commits
Author SHA1 Message Date
Iampete1 b9c177c363 AP_Scripting: check channel is valid before trying to send on it 2025-09-16 11:00:05 +01:00
Iampete1 a0452ba1d4 AP_Scripting: examples: add TraxxasVelineon ESC telem script 2025-09-15 18:18:55 -05:00
Iampete1 3048a04f6b AP_Scripting: Luacheck: allow unused arguments prefixed with a underscore 2025-09-15 18:18:55 -05:00
Iampete1 064655cb4a AP_Scripting: add binding for UART set_unbuffered_writes 2025-09-15 18:18:55 -05:00
Iampete1 5f33bc7af8 AP_Scripting: update esc_telem:update_rpm method to use float 2025-09-15 18:18:55 -05:00
Andrew Tridgell 3393fa2ed9 AP_Scripting: added is_pending() method on sockets
allows for non-blocking TCP connections
2025-09-03 15:17:39 +01:00
Andrew Tridgell 03494bd938 AP_Scripting: added pcall wrapper to LTE_modem 2025-08-31 17:05:52 +01:00
Andrew Tridgell 15d176cc88 AP_Scripting: fixed RSRQ/RSRP mixup 2025-08-31 17:05:52 +01:00
Andrew Tridgell 7d2f8a9190 AP_Scripting: LTE_modem reliability improvements 2025-08-31 17:05:52 +01:00
Andrew Tridgell a080f62bd8 AP_Scripting: added LTE BG95 support
nice modem with good CAT-M support
2025-08-31 17:05:52 +01:00
timtuxworth 435ae628fb AP_Scripting: quadplane terrain avoidance with can't make that climb 2025-08-19 22:23:08 -05:00
Tim Tuxworth cc0b8164d2 AP_Scripting: scripted arming checks 2025-08-16 19:55:15 +01:00
Tim Tuxworth 012fc280a8 Tools: tests for scripted arming checks 2025-08-16 19:55:15 +01:00
Peter Barker 4e7e417dc3 AP_Scripting: add test for NAMED_VALUE_STRING 2025-08-10 08:38:08 +10:00
Andrew Tridgell 7e0daa6609 AP_Scripting: added MOT slew rates to revert_params.lua 2025-08-06 08:25:44 +10:00
Peter Barker 55277a339e AP_Scripting: copter_terrain_brake: read aloud activation message 2025-07-29 21:23:39 +10:00
Andy Piper 7fbdfcee0a AP_Scripting: add stop method 2025-07-23 18:13:36 +10:00
Peter Barker ae48665948 AP_Scripting: add example which prints checksum of @SYS/flash.bin 2025-07-23 10:50:55 +10:00
Andrew Tridgell 318e6b9190 AP_Scripting: update HFE EFI driver script
added option to log all CAN frames for debugging new protocols
2025-07-22 13:02:52 +10:00
Peter Barker 3708936c62 global: correct shebang lines to refernce python3
also remove the odd encoding line which is not required in Py3
2025-07-22 10:45:57 +10:00
Joseph Stewart d9f1287c8b AP_Scripting: Use unified regex pattern for parameter parsing 2025-07-22 09:31:59 +10:00
Joseph Stewart c4ba818ca5 AP_Scripting: write full param lists without timeout 2025-07-22 09:31:59 +10:00
Joseph Stewart ada20e5224 AP_Scripting: Added comma delimited parameter files in param controller 2025-07-22 09:31:59 +10:00
Andrew Tridgell 90700977c5 AP_Scripting: added EFI_DLA64 driver
new protocol for updated EFI engine from DLA
2025-07-21 20:43:33 +10:00
Andrew Tridgell 55c8eee5a5 AP_Scripting: added BTAG_CUR_CYCLES
this can be used by another battery estimation lua script to adjust
for max number of cycles across all batteries
2025-07-17 21:15:30 +10:00
Thomas Watson 3e76fd681c AP_Scripting: drop utf8 string parsing and formatting
Difficult to imagine a use-case and substitutable with raw hex
characters.
2025-07-15 09:58:44 +10:00
Thomas Watson 81fdbae3ea AP_Scripting: remove utf8 library
Difficult to imagine a use-case and easy to re-implement.

Saves 1280 bytes.
2025-07-15 09:58:44 +10:00
Thomas Watson 6b3e37698f AP_Scripting: use native implementation of luaO_ceillog2
Using a builtin instruction (on Cortex M3/M4/M7) saves 268 bytes.

Tested that the result is the same for all values:

  ```c
  #include <stdio.h>
  #include <limits.h>
  #include <inttypes.h>

  int cl2_new(unsigned int x) {
    const int bitwidth = CHAR_BIT*sizeof(x);
    x--;
    const int clz = x ? __builtin_clz(x) : bitwidth; // clz(0) is undefined
    return bitwidth-clz;
  }

  int cl2_old(unsigned int x) {
    static const uint8_t log_2[256] = {  /* log_2[i] = ceil(log2(i - 1)) */
      0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
      6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
      7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
      7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
      8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
      8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
      8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
      8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
    };
    int l = 0;
    x--;
    while (x >= 256) { l += 8; x >>= 8; }
    return l + log_2[x];
  }

  int main(int argc, char** argv) {
      for (unsigned int i=1; i!=0; i++) { // 0 is not in the domain
          int v_new = cl2_new(i);
          int v_old = cl2_old(i);
          if (v_new != v_old) {
              printf("%u: %d != %d\n", i, v_new, v_old);
              break;
          }
      }
  }
  ```
2025-07-14 15:58:32 -05:00
Christian Clauss 7351a858b5 AP_Scripting: Fix ‘buff’ may be used uninitialized
Fixes: #30623
* #30623

Initialized the `buff` to remove a frequent warning in our GitHub Actions.
```diff
-  char buff[LUA_TMPNAMBUFSIZE];
+  char buff[LUA_TMPNAMBUFSIZE] = {0};
```
2025-07-13 17:14:25 +10:00
Andrew Tridgell 086472de8f AP_Scripting: added an add_route() binding
allows custom network routes
2025-07-13 13:31:59 +10:00
Andrew Tridgell 8bf182faf5 AP_Scripting: changed LTE_BAND and LTE_MCCMNC to no-change by default
avoid setting band and network if not wanted
2025-07-11 08:04:51 +10:00
Andrew Tridgell d379de6f9c AP_Scripting: support mode modem chipsets in LTE_modem driver
support Air780, EC200 and SIM7070G
add escaping to CMUX data
improved logging
2025-07-09 18:24:24 +10:00
Iampete1 cce22722e9 AP_Scripting: applets: UniversalAutoLand: rename params to avoid name conflict with native mode 2025-07-08 10:03:42 +10:00
Andrew Tridgell 85b2de8b95 AP_Scripting: added docs for plane_ship_landing.lua
based on https://discuss.ardupilot.org/t/ship-landing-support/82772
2025-07-05 18:23:23 +10:00
Peter Barker 8aaeef5724 AP_Scripting: docs_check.py: flake8 correctness
... also avoid catching bare exception, handle the case where the regex isn't matching
2025-06-22 09:04:16 +10:00
Yuri RageandThomas Watson e952d4b16b AP_Scripting: add net-ntrip applet
Co-authored-by: Thomas Watson <twatson52@mac.com>

Co-authored-by: Thomas Watson <twatson52@mac.com>
2025-06-20 19:44:33 -05:00
Christian Clauss dc9446af62 wscript: Add # flake8: noqa linter directive 2025-06-20 20:30:15 +10:00
Christian Clauss e4fb97b745 AP_Scripting: Add # flake8: noqa linter directive 2025-06-20 20:30:15 +10:00
Andrew Tridgell acda8428f8 AP_Scripting: use CMUX for LTE_modem
using CMUX allows us to have AT commands run in parallel with PPP or
TCP data, allowing for signal strength and other data to be retrieved

this also adds auto-bauding, with separate LTE_IBAUD and LTE_BAUD
parameters, avoiding the need to configure the hardware baud rate with
a terminal program
2025-06-16 12:29:44 +10:00
Andrew Tridgell 98b42cf2fc AP_Scripting: added LTE_OPTIONS to LTE driver 2025-06-16 12:29:44 +10:00
Christian Clauss 966588f714 AP_Scripting: Fix check-shebang-scripts-are-executable 2025-06-15 11:17:47 +10:00
Abdulaziz 6b30f2cccb AP_Scripting: provide bindings for parity and stop bits 2025-06-07 18:51:00 -05:00
Andrew Tridgell 63a40b65e3 AP_Scripting: rename SIM7600 to LTE_modem
we will soon be supporting other modem chipsets
2025-06-06 18:09:51 +10:00
Andrew Tridgell f86918e5ae AP_Scripting: added support for PPP connections to SIM7600 driver
this allows for the modem to be used as a PPP server, allowing the
full range of ArduPilot networking capabilities, which means multiple
TCP and UDP connections, scripting sockets etc
2025-06-06 18:09:51 +10:00
Peter Barker 1f8370b615 AP_Scripting: update scripts for get_roll->get_roll_rad rename 2025-06-05 17:28:41 +10:00
Peter Barker fa899c14cc AP_Scripting: new scripting bindings get_roll_rad
deprecate the old get_roll binding
2025-06-05 17:28:41 +10:00
Peter Barker c873d8bb53 AP_Scripting: rename AHRS get_roll etc accessors to include _rad 2025-06-05 17:28:41 +10:00
Andrew Tridgell 8cd83b8e64 AP_Scripting: LTE driver using SIM7600 AT commands
colcon build/test / build-test (push) Has been cancelled
Cygwin Build / build (push) Has been cancelled
ESP32 Build / build (esp32buzz, 10) (push) Has been cancelled
ESP32 Build / build (esp32s3empty, 10) (push) Has been cancelled
Macos Build / build (CubeOrange) (push) Has been cancelled
Macos Build / build (sitl) (push) Has been cancelled
QURT Build / build (push) Has been cancelled
test ccache / build (10, chibios) (push) Has been cancelled
test chibios / build (CubeOrange-EKF2, 10, chibios) (push) Has been cancelled
test chibios / build (CubeOrange-ODID, 10, chibios) (push) Has been cancelled
test chibios / build (CubeOrange-PPP, 10, chibios) (push) Has been cancelled
test chibios / build (CubeOrange-bootloader, 10, chibios) (push) Has been cancelled
test chibios / build (CubeRedPrimary-bootloader, 10, chibios) (push) Has been cancelled
test chibios / build (MatekF405-Wing, 10, chibios) (push) Has been cancelled
test chibios / build (Pixhawk6X-PPPGW, 10, chibios) (push) Has been cancelled
test chibios / build (SOHW, 10, chibios) (push) Has been cancelled
test chibios / build (build-options-defaults-test, 10, chibios) (push) Has been cancelled
test chibios / build (configure-all, 10, chibios) (push) Has been cancelled
test chibios / build (fmuv2-plane, 10, chibios) (push) Has been cancelled
test chibios / build (fmuv3, 10, chibios) (push) Has been cancelled
test chibios / build (fmuv3-bootloader, 10, chibios) (push) Has been cancelled
test chibios / build (iofirmware, 10, chibios) (push) Has been cancelled
test chibios / build (new-check, 10, chibios) (push) Has been cancelled
test chibios / build (periph-build, 10, chibios) (push) Has been cancelled
test chibios / build (revo-bootloader, 10, chibios) (push) Has been cancelled
test chibios / build (revo-mini, 10, chibios) (push) Has been cancelled
test chibios / build (signing, 10, chibios) (push) Has been cancelled
test chibios / build (stm32f7, 10, chibios) (push) Has been cancelled
test chibios / build (stm32h7, 10, chibios) (push) Has been cancelled
test chibios / build (stm32h7-debug, 10, chibios) (push) Has been cancelled
test dds / build (sitl) (push) Has been cancelled
test dds / build (stm32h7) (push) Has been cancelled
test Linux SBC / build (bbbmini, armhf) (push) Has been cancelled
test Linux SBC / build (bebop, armhf) (push) Has been cancelled
test Linux SBC / build (bhat, armhf) (push) Has been cancelled
test Linux SBC / build (canzero, armhf) (push) Has been cancelled
test Linux SBC / build (erlebrain2, armhf) (push) Has been cancelled
test Linux SBC / build (linux, base) (push) Has been cancelled
test Linux SBC / build (navigator, armhf-musl) (push) Has been cancelled
test Linux SBC / build (navigator64, aarch64) (push) Has been cancelled
test Linux SBC / build (navio, armhf) (push) Has been cancelled
test Linux SBC / build (navio2, armhf) (push) Has been cancelled
test Linux SBC / build (pxf, armhf) (push) Has been cancelled
test Linux SBC / build (pxfmini, armhf) (push) Has been cancelled
test replay / build (replay, base) (push) Has been cancelled
test replay / build (replay, clang) (push) Has been cancelled
test scripts / build (astyle-cleanliness) (push) Has been cancelled
test scripts / build (check_autotest_options) (push) Has been cancelled
test scripts / build (logger_metadata) (push) Has been cancelled
test scripts / build (param_parse) (push) Has been cancelled
test scripts / build (python-cleanliness) (push) Has been cancelled
test scripts / build (validate_board_list) (push) Has been cancelled
test blimp / build (base) (push) Has been cancelled
test blimp / build (clang) (push) Has been cancelled
test blimp / autotest (sitltest-blimp) (push) Has been cancelled
test copter / build (base) (push) Has been cancelled
test copter / build (clang) (push) Has been cancelled
test copter / autotest (sitltest-copter-tests1a) (push) Has been cancelled
test copter / autotest (sitltest-copter-tests1b) (push) Has been cancelled
test copter / autotest (sitltest-copter-tests1c) (push) Has been cancelled
test copter / autotest (sitltest-copter-tests1d) (push) Has been cancelled
test copter / autotest (sitltest-copter-tests1e) (push) Has been cancelled
test copter / autotest (sitltest-copter-tests2a) (push) Has been cancelled
test copter / autotest (sitltest-copter-tests2b) (push) Has been cancelled
test copter / build-gcc-heli (push) Has been cancelled
test copter / autotest-heli (sitltest-heli) (push) Has been cancelled
test ap_periph / build-gcc-ap_periph (push) Has been cancelled
test ap_periph / autotest-can (sitltest-can) (push) Has been cancelled
test plane / build (base) (push) Has been cancelled
test plane / build (clang) (push) Has been cancelled
test plane / autotest (sitltest-plane-tests1a) (push) Has been cancelled
test plane / autotest (sitltest-plane-tests1b) (push) Has been cancelled
test plane / autotest (sitltest-quadplane) (push) Has been cancelled
test rover / build (base) (push) Has been cancelled
test rover / build (clang) (push) Has been cancelled
test rover / autotest (sitltest-balancebot) (push) Has been cancelled
test rover / autotest (sitltest-rover) (push) Has been cancelled
test rover / autotest (sitltest-sailboat) (push) Has been cancelled
test sub / build (base) (push) Has been cancelled
test sub / build (clang) (push) Has been cancelled
test sub / autotest (sitltest-sub) (push) Has been cancelled
test tracker / build (base) (push) Has been cancelled
test tracker / build (clang) (push) Has been cancelled
test tracker / autotest (sitltest-tracker) (push) Has been cancelled
test unit tests and sitl building / build (examples, base) (push) Has been cancelled
test unit tests and sitl building / build (examples, clang) (push) Has been cancelled
test unit tests and sitl building / build (sitl, base) (push) Has been cancelled
test unit tests and sitl building / build (sitl, clang) (push) Has been cancelled
test unit tests and sitl building / build (unit-tests, base) (push) Has been cancelled
test unit tests and sitl building / build (unit-tests, clang) (push) Has been cancelled
test scripting / test-scripting (push) Has been cancelled
provides a transparent TCP connection to a server
2025-06-03 11:11:22 +10:00
rishabsingh3003 dab81d0f7d AP_Scripting: Correct typo in EFI DLA Driver 2025-05-27 12:56:11 +01:00
Ryan Friedman 03adf5e801 AP_Scripting: Add trisonica LI550 3D wind sensor logger
Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
2025-05-24 20:09:14 -05:00