Skip to content

Commit

Permalink
[ubuntu18.04] Update documentation + legacy: solves paparazzi#2987 (p…
Browse files Browse the repository at this point in the history
…aparazzi#2990)

Fix for newer ubuntus
  • Loading branch information
dewagter authored and FlorianSan committed May 24, 2023
1 parent 254a05d commit bf6e5c1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions doc/sphinx/source/installation/index_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Installation
=================

Paparazzi is very easily installed on any laptop or workstation running the Ubuntu Linux OS or virtually any Debian based Linux. Apple Macintosh running Mac OS X system are also fairly well supported. Windows is supported through the WSL2 module (running a Linux kernel inside Windows10).
Paparazzi is easily installed on any laptop or workstation running the Ubuntu Linux OS or virtually any Debian based Linux. Apple Macintosh running Mac OS X system are also fairly well supported. Windows is supported through the WSL2 module (running a Linux kernel inside Windows10).

The steps required to install the software needed to be able to let your UAS fly are:

Expand All @@ -15,7 +15,7 @@ The steps required to install the software needed to be able to let your UAS fly

.. note::

If you run **Ubuntu** 16.04 or higher LTS (18.04, 20.04), go to the :doc:`../quickstart/install` page to get quickly running !
If you run **Ubuntu** 18.04 or higher LTS (20.04, 22.04), go to the :doc:`../quickstart/install` page to get quickly running !

.. toctree::
:maxdepth: 2
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/source/installation/software/index_software.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you don't want to work with the latest master branch (it may contain some uns
::

cd paparazzi
git checkout v5.16
git checkout v6.2


OS-specific instructions
Expand Down
5 changes: 3 additions & 2 deletions doc/sphinx/source/quickstart/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Open a terminal and execute each lines below. If one fails, ask for help on gitt
Version specific prerequisites
------------------------------

**If you have Ubuntu 20.04:**
**If you have Ubuntu 20.04 or 22.04:**

.. code-block:: bash
Expand All @@ -23,6 +23,7 @@ Version specific prerequisites
sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
sudo apt-get install gcc-arm-embedded
sudo apt-get install python3-lxml python3-numpy
sudo apt-get update
Install Paparazzi
Expand All @@ -36,7 +37,7 @@ Add paparazzi apt-repository and install dependencies:
sudo apt-get update
sudo apt-get -f -y install paparazzi-dev paparazzi-jsbsim dfu-util pprzgcs
.. note:: If you are on Ubuntu 18.04, ``pprzgcs`` is not available, just remove it from the last line.
.. note:: If you are on Ubuntu 18.04, ``pprzgcs`` is not available, just remove it from the last line. Also launch using ``paparazzi -legacy`` mode

Clone the repository:

Expand Down
10 changes: 10 additions & 0 deletions start.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import datetime
import subprocess
import sys
import lsb_release

lib_path = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'sw', 'lib', 'python'))
sys.path.append(lib_path)
Expand All @@ -21,6 +22,12 @@

import xml.etree.ElementTree

release = lsb_release.get_distro_information()
isLegacy = False
if release['ID'] == 'Ubuntu':
if release['RELEASE'] == '18.04' or release['RELEASE'] == '16.04':
isLegacy = True


class ConfChooser(object):

Expand Down Expand Up @@ -154,6 +161,9 @@ def launch(self, widget):
if self.btnPythonGUI.get_active():
args += ["-python"]

if isLegacy:
args += ["-legacy"]

self.pp = subprocess.Popen(args)
self.window.destroy()

Expand Down

0 comments on commit bf6e5c1

Please sign in to comment.