Commit Graph

13 Commits

Author SHA1 Message Date
Daniel Agar 6d78054f50
mavlink USB auto start/stop on boards with VBUS
- no longer start sercon or mavlink usb by default
 - on USB connection (VBUS) monitor serial USB at low rate and start Mavlink if there's a HEARTBEAT or nshterm on 3 consecutive carriage returns
 - the mavlink USB instance is automatically stopped and serdis executed if USB is disconnected
 - skipping Mavlink USB (and sercon) saves a considerable amount of memory on older boards
2021-10-03 15:32:54 -04:00
Beat Küng d79229f958 mavlink_shell.py: allow scripted use
E.g. echo free|./Tools/mavlink_shell.py

Or creating a virtual nsh console:
socat pty,rawer,link=/tmp/fmu_nsh_pts exec:"mavlink_shell.py 0.0.0.0\\:14550,pty,rawer"
2021-06-24 15:18:06 +02:00
Lorenz Meier b14d0e4326 Update MAVLink shell default device for modern Mac OS
The enumeration changed from usbmodem1 to usbmodem01 and this tracks this OS-level naming change.
2020-10-21 12:11:31 -04:00
Julian Oes 9a96ca14be Tools: make Python import error more readable
The problem with printing the exception was that starting with
Python 3.6 the ImportError is yet another (sub) exception called
ModuleNotFoundError which can't be printed as a string and then triggers
another exception:

```
Traceback (most recent call last):
  File "/home/julianoes/src/Firmware/Tools/serial/generate_config.py", line 11, in <module>
    import jinja2
ModuleNotFoundError: No module named 'jinja2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/julianoes/src/Firmware/Tools/serial/generate_config.py", line 13, in <module>
    print("Failed to import jinja2: " + e)
TypeError: must be str, not ModuleNotFoundError
```

As per @bkueng's suggestion the easiest is to cast the exception to str
and that way prevent the second exception.
2020-02-14 11:40:05 +01:00
Julian Oes b04f68553e Tools: use Python 3, improve import checks
In more detail:
- Change shebang to Python 3.
- Suggest installation using pip3 as user.
2020-01-16 16:25:26 +01:00
Andrew C. Smith d21b6655d2 Add the Gumstix AeroCore2 to the build system. 2017-04-20 12:24:27 -10:00
Beat Küng 587c5161a3 mavlink_{shell,ulog_streaming}.py: show full error output when pymavlink import fails 2016-11-04 11:08:06 +01:00
Beat Küng fa461d018d mavlink_{shell,ulog_streaming}.py: send heartbeat
This is helpful, so that a connected partner can switch from broadcasting
to a 'connected' state.
2016-11-04 11:08:06 +01:00
Beat Küng 95f5ba9635 fix mavlink_shell.py: python3 compat for octal numbers 2016-10-24 12:51:50 +02:00
Lorenz Meier 8d51e4ade1 MAVLink shell: Fix OS X default path 2016-10-23 17:46:22 +02:00
Julian Oes 3aa9a72562 mavlink_shell.py: default to 57600 baudrate 2016-10-23 14:00:29 +02:00
Beat Küng c22e7ed5c9 Tools/mavlink_shell.py: implement a simple shell with history 2016-08-02 09:10:18 +02:00
Beat Küng e8d44da2c0 Tools: add mavlink_shell.py script to start a shell over mavlink 2016-07-29 13:07:17 +02:00