[tools] Fix bebop upload on 24.04 (#3605)

This commit is contained in:
Christophe De Wagter
2026-02-17 12:08:49 +01:00
committed by GitHub
parent 0c37063570
commit 2de3786485
3 changed files with 15 additions and 4 deletions
+8
View File
@@ -52,6 +52,14 @@ class InstallWindow(QWidget):
self.execute('sudo -E apt-get install -y python3-lxml python3-numpy')
elif distro_version >= 24.04:
self.execute('sudo -E apt-get install -y liblablgtk2-ocaml-dev')
if distro_version == 18.04:
self.execute('wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add -')
self.execute('sudo apt-add-repository \'deb https://apt.kitware.com/ubuntu/ bionic main\'')
self.execute('sudo apt-get update && sudo apt-get install cmake')
self.execute('sudo -E apt-get install -y libboost-program-options-dev libboost-filesystem-dev')
if distro_version >= 24.04:
self.execute('python3 -m pip install telnetlib3') # Required for bebop tools
def cmd_arm(self):
self.execute('sudo -E apt-get -f -y install paparazzi-dev')
+3 -3
View File
@@ -52,7 +52,7 @@ class Bebop(ParrotUtils):
if self.read_from_config(name) == 'Unknown':
self.execute_command('echo "' + name + '=' + value + '\" >> ' + self.config_file)
else:
self.execute_command('sed -i "s/\(' + name + ' *= *\).*/\\1' + value + '/g" ' + self.config_file)
self.execute_command('sed -i "s/\\(' + name + ' *= *\\).*/\\1' + value + '/g" ' + self.config_file)
def uav_status(self):
print('Parrot version:\t\t' + str(self.check_version()))
@@ -79,7 +79,7 @@ class Bebop(ParrotUtils):
self.execute_command("sed -i 's|connect2hub|pprzstarter|' /etc/init.d/rcS")
self.execute_command("rm /data/ftp/internal_000/scripts/connect2hub")
else:
self.execute_command("sed -i 's|^exit 0|/data/ftp/internal_000/scripts/pprzstarter \& exit 0|' /etc/init.d/rcS")
self.execute_command("sed -i 's|^exit 0|/data/ftp/internal_000/scripts/pprzstarter \\& exit 0|' /etc/init.d/rcS")
self.execute_command("chmod a+x /etc/init.d/rcS")
self.execute_command("chmod a+x /data/ftp/internal_000/scripts/pprzstarter")
self.execute_command("chmod a+x /data/ftp/internal_000/scripts/button_switch")
@@ -101,7 +101,7 @@ class Bebop(ParrotUtils):
def bebop_uninstall_scripts(self):
print('Uninstalling Paparazzi scripts')
self.execute_command("mount -o remount,rw /")
self.execute_command("sed -i 's|^/data/ftp/internal_000/scripts/pprzstarter \& exit 0|exit 0|' /etc/init.d/rcS")
self.execute_command("sed -i 's|^/data/ftp/internal_000/scripts/pprzstarter \\& exit 0|exit 0|' /etc/init.d/rcS")
self.execute_command("chmod a+x /etc/init.d/rcS")
self.execute_command("mv /bin/onoffbutton/shortpress_3.sh.backup /bin/onoffbutton/shortpress_3.sh")
self.execute_command("rm -rf /data/ftp/internal_000/scripts/*")
+4 -1
View File
@@ -24,7 +24,10 @@ from __future__ import print_function
from __future__ import unicode_literals
from builtins import bytes
import socket
import telnetlib
try:
import telnetlib3 as telnetlib
except ImportError:
import telnetlib
import os
import sys
from ftplib import FTP