Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Mavftp service, read-only for now #926

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions core/services/ardupilot_manager/autopilot_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,15 @@ async def start_mavlink_manager(self, device: Endpoint) -> None:
persistent=True,
protected=True,
),
Endpoint(
name="MavFTP",
owner=self.settings.app_name,
connection_type=EndpointType.UDPClient,
place="127.0.0.1",
argument=14555,
persistent=True,
protected=True,
),
]
for endpoint in default_endpoints:
try:
Expand Down
1 change: 1 addition & 0 deletions core/start-blueos-core
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ SERVICES=(
'nginx',250,"nice -18 nginx -g \"daemon off;\" -c $TOOLS_PATH/nginx/nginx.conf"
'log_zipper',250,"nice -20 $SERVICES_PATH/log_zipper/main.py '/shortcuts/system_logs/\\\\*\\\\*/\\\\*.log' --max-age-minutes 60"
'bag_of_holding',250,"$SERVICES_PATH/bag_of_holding/main.py"
'mavftp',250,"nice -19 /home/pi/tools/mavftp/pymavlink/mavftpfs.py --mountpoint /root/.config/ardupilot-manager/logs/mavftp"
)

tmux -f /etc/tmux.conf start-server
Expand Down
3 changes: 2 additions & 1 deletion core/tools/install-system-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ TOOLS=(
logviewer
mavlink_camera_manager
scripts
mavftp
)

parallel --halt now,fail=1 '/home/pi/tools/{}/bootstrap.sh' ::: "${TOOLS[@]}"

# Tools that uses apt to do the installation
# APT is terrible like pip and don't know how to handle parallel installation
# These should periodically be moved onto the base image
apt update && apt install -y --no-install-recommends dhcpcd5
apt update && apt install -y --no-install-recommends dhcpcd5 fuse libfuse2 git
12 changes: 12 additions & 0 deletions core/tools/mavftp/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -e
# TODO: all of this should be replaced with a single pip install once the pr at pymavlink is merged and there's a new version tagged
mkdir -p /home/pi/tools/mavftp
cd /home/pi/tools/mavftp
apt update && apt install -y git libxml2-dev libxslt-dev build-essential gcc zlib1g-dev
git clone --depth 1 https://github.com/Ardupilot/pymavlink.git
git clone --depth 1 https://github.com/Ardupilot/mavlink.git
cd pymavlink
pip install fusepy==3.0.1 lxml
MDEF="../mavlink/message_definitions" python -m pip install . -v
apt remove -y git build-essential && apt autoremove -y && apt clean -y