├── .gitignore ├── LICENSE ├── MANIFEST.in ├── README.md ├── bin ├── create_ap_interface ├── toggle-matchbox └── toggle-wvkbd ├── debian ├── README.Debian ├── README.source ├── changelog ├── compat ├── control ├── copyright ├── openplotter-settings-docs.docs └── rules ├── openplotterSettings ├── __init__.py ├── ap.py ├── appsList.py ├── backlight.py ├── backlightGui.py ├── conf.py ├── data │ ├── ap.png │ ├── apply.png │ ├── autostart.png │ ├── brightness-48.png │ ├── brightness-install.png │ ├── brightness.png │ ├── bug.png │ ├── changelog.png │ ├── check.png │ ├── chip.png │ ├── close.png │ ├── crowdin.png │ ├── debian.png │ ├── delay.png │ ├── file.png │ ├── help.png │ ├── install.png │ ├── keyboard.png │ ├── keyboards │ │ ├── arrow2.png │ │ ├── base-fragment-CAT.xml │ │ ├── base-fragment-EN.xml │ │ ├── control.png │ │ ├── full-fragment-it_IT.xml │ │ ├── key-down.png │ │ ├── key-left.png │ │ ├── key-right.png │ │ ├── key-up.png │ │ ├── keyboard-CAT.xml │ │ ├── keyboard-EN.xml │ │ ├── keyboard-IT-full.xml │ │ ├── keyboard-IT-normal.xml │ │ ├── keyboard.xml │ │ ├── normal-fragment-it_IT.xml │ │ ├── return2.png │ │ ├── shift2.png │ │ └── shift_caps2.png │ ├── open.png │ ├── openplotter-24.png │ ├── openplotter-48.png │ ├── openplotter-brightness.desktop │ ├── openplotter-check.desktop │ ├── openplotter-check.png │ ├── openplotter-settings.desktop │ ├── openplotter-settings.png │ ├── openplotter-startup.desktop │ ├── output.png │ ├── play.png │ ├── ports.png │ ├── poweroff.png │ ├── refresh.png │ ├── resize.png │ ├── rpi.png │ ├── shutdown.png │ ├── sounds │ │ ├── Bleep.mp3 │ │ ├── House_Fire_Alarm.mp3 │ │ ├── Ship_Bell.mp3 │ │ ├── Store_Door_Chime.mp3 │ │ └── Tornado_Siren_II.mp3 │ ├── sources.png │ ├── sources │ │ ├── openplotter.beta.gpg.key │ │ ├── openplotter.gpg.key │ │ └── oss.boating.gpg.key │ ├── touchscreen.png │ ├── uninstall.png │ ├── update.png │ ├── wayland.png │ └── xygrib.desktop ├── gpio.py ├── installSources.py ├── language.py ├── locale │ ├── ca │ │ └── LC_MESSAGES │ │ │ ├── openplotter-settings.mo │ │ │ └── openplotter-settings.po │ ├── cs │ │ └── LC_MESSAGES │ │ │ ├── openplotter-settings.mo │ │ │ └── openplotter-settings.po │ ├── da │ │ └── LC_MESSAGES │ │ │ ├── openplotter-settings.mo │ │ │ └── openplotter-settings.po │ ├── de │ │ └── LC_MESSAGES │ │ │ ├── openplotter-settings.mo │ │ │ └── openplotter-settings.po │ ├── el │ │ └── LC_MESSAGES │ │ │ ├── openplotter-settings.mo │ │ │ └── openplotter-settings.po │ ├── en │ │ └── LC_MESSAGES │ │ │ ├── openplotter-settings.mo │ │ │ └── openplotter-settings.po │ ├── es │ │ └── LC_MESSAGES │ │ │ ├── openplotter-settings.mo │ │ │ └── openplotter-settings.po │ ├── fi │ │ └── LC_MESSAGES │ │ │ ├── openplotter-settings.mo │ │ │ └── openplotter-settings.po │ ├── fr │ │ └── LC_MESSAGES │ │ │ ├── openplotter-settings.mo │ │ │ └── openplotter-settings.po │ ├── it │ │ └── LC_MESSAGES │ │ │ ├── openplotter-settings.mo │ │ │ └── openplotter-settings.po │ ├── nb │ │ └── LC_MESSAGES │ │ │ ├── openplotter-settings.mo │ │ │ └── openplotter-settings.po │ ├── nl │ │ └── LC_MESSAGES │ │ │ ├── openplotter-settings.mo │ │ │ └── openplotter-settings.po │ ├── pl │ │ └── LC_MESSAGES │ │ │ ├── openplotter-settings.mo │ │ │ └── openplotter-settings.po │ └── sv │ │ └── LC_MESSAGES │ │ ├── openplotter-settings.mo │ │ └── openplotter-settings.po ├── openplotterSettings.py ├── platform.py ├── ports.py ├── postInstall.py ├── selectConnections.py ├── selectKey.py ├── serialPorts.py ├── service.py ├── settingsPreUninstall.py ├── shutdown.py ├── startup.py ├── version.py ├── wayland.py └── xygribPostInstall.py └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.egg-info/ 2 | debian/*/ 3 | debian/*debhelper* 4 | debian/files 5 | debian/*.substvars 6 | .pybuild/ 7 | */__pycache__/ 8 | build/ 9 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE 2 | include README.md 3 | recursive-include openplotterSettings/data * 4 | recursive-include openplotterSettings/locale * 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## openplotter-settings 2 | 3 | Main OpenPlotter app 4 | 5 | ### Installing 6 | 7 | Install dependencies (for production and development): 8 | 9 | `sudo apt install python3-wxgtk4.0 python3-ujson python3-pyudev vlc matchbox-keyboard` 10 | 11 | #### For production 12 | 13 | Download and install the latest .deb file from [![Latest version of 'openplotter-settings' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/openplotter/openplotter/deb/openplotter-settings/latest/a=all;xc=main;d=debian%252Fbookworm;t=binary/?render=true&show_latest=true)](https://cloudsmith.io/~openplotter/repos/openplotter/packages/detail/deb/openplotter-settings/latest/a=all;xc=main;d=debian%252Fbookworm;t=binary/) 14 | 15 | `sudo dpkg -i openplotter-settings_x.x.x-xxx_all.deb` 16 | 17 | #### For development 18 | 19 | Clone the repository: 20 | 21 | `git clone https://github.com/openplotter/openplotter-settings.git` 22 | 23 | Make your changes and create the package: 24 | 25 | ``` 26 | cd openplotter-settings 27 | dpkg-buildpackage -b 28 | ``` 29 | Install the package: 30 | 31 | ``` 32 | cd .. 33 | sudo dpkg -i openplotter-settings_x.x.x-xxx_all.deb 34 | ``` 35 | 36 | Run: 37 | 38 | `openplotter-settings` 39 | 40 | Pull request your changes to github and we will check and add them to the next version of the [Debian package](https://cloudsmith.io/~openplotter/repos/openplotter/packages/). 41 | 42 | ### Documentation 43 | 44 | https://openplotter.readthedocs.io 45 | 46 | ### Support 47 | 48 | http://forum.openmarine.net/forumdisplay.php?fid=1 49 | -------------------------------------------------------------------------------- /bin/create_ap_interface: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # Add virtual wlan interface for AP mode 4 | iw dev wlan0 interface add wlan9 type __ap 5 | 6 | # Remove power-saving from wlan0 and wlan9 7 | iw wlan0 set power_save off 8 | iw wlan9 set power_save off -------------------------------------------------------------------------------- /bin/toggle-matchbox: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | PID="$(pidof matchbox-keyboard)" 3 | if [ "$PID" != "" ]; then kill $PID 4 | else matchbox-keyboard --fontfamily QuickSand --fontvariant bold --fontptsize 10 & 5 | fi 6 | -------------------------------------------------------------------------------- /bin/toggle-wvkbd: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #This script toggle the virtual keyboard 3 | 4 | PID="$(pidof wvkbd-mobintl)" 5 | if [ "$PID" != "" ]; then 6 | killall wvkbd-mobintl 7 | else 8 | wvkbd-mobintl 9 | # use wvkbd-mobintl --help for options 10 | # 11 | # -L 300 = landscape, 300 pixels tall 12 | # -fg ffffff = foreground color white 13 | # -fg-sp ffffff = special keys foreground white 14 | # -text 000000 = text color black 15 | # -text-sp 000000 = special keys text color black 16 | # -fn 40 = font size 40 17 | 18 | fi 19 | -------------------------------------------------------------------------------- /debian/README.Debian: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/debian/README.Debian -------------------------------------------------------------------------------- /debian/README.source: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/debian/README.source -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | openplotter-settings (4.2.9-stable) bookworm; urgency=medium 2 | 3 | * change to Labwc window manager under wayland instead of wayfire 4 | * update translations 5 | 6 | -- Sailoog Fri, 07 Mar 2025 21:00:41 +0100 7 | 8 | openplotter-settings (4.2.7-stable) bookworm; urgency=medium 9 | 10 | * Take control of system shutdown 11 | * update translations 12 | 13 | -- Sailoog Sat, 11 Jan 2025 12:53:12 +0100 14 | 15 | openplotter-settings (4.2.6-stable) bookworm; urgency=medium 16 | 17 | * Minor fixes 18 | * update translations 19 | 20 | -- Sailoog Tue, 06 Aug 2024 10:45:31 +0200 21 | 22 | openplotter-settings (4.2.3-stable) bookworm; urgency=medium 23 | 24 | * remove wvkbd dependence 25 | * fix error in desktop at startup 26 | * disable virtual keyboard in desktop under wayland 27 | * update translations 28 | 29 | -- Sailoog Thu, 04 Jul 2024 21:35:22 +0200 30 | 31 | openplotter-settings (4.2.0-stable) bookworm; urgency=medium 32 | 33 | * stable 34 | 35 | -- Sailoog Thu, 13 Jun 2024 09:49:40 +0200 36 | 37 | openplotter-settings (4.1.18-beta) bookworm; urgency=medium 38 | 39 | * beta 40 | 41 | -- Sailoog Sat, 14 Oct 2023 13:24:20 +0200 42 | 43 | openplotter-settings (3.6.6-stable) bullseye; urgency=medium 44 | 45 | * Add English virtual keyboard 46 | * Update translations 47 | 48 | -- Sailoog Wed, 26 Jul 2023 13:19:28 +0200 49 | 50 | openplotter-settings (3.6.2-stable) bullseye; urgency=medium 51 | 52 | * Rebuild touchscreen settings when failing at startup 53 | * Update translations 54 | 55 | -- Sailoog Tue, 30 May 2023 14:16:12 +0200 56 | 57 | openplotter-settings (3.6.0-stable) bullseye; urgency=medium 58 | 59 | * Add rpi-backlight 60 | * Add touchscreen 61 | * Update translations 62 | 63 | -- Sailoog Wed, 19 Apr 2023 17:15:16 +0200 64 | 65 | openplotter-settings (3.5.0-stable) bullseye; urgency=medium 66 | 67 | * Romove ntp server (moved to network app with chrony instead of ntp) 68 | * Update translations 69 | 70 | -- Sailoog Thu, 09 Feb 2023 20:06:22 +0100 71 | 72 | openplotter-settings (3.4.7-stable) bullseye; urgency=medium 73 | 74 | * Disable applications not yet developed and re-order list 75 | * Improve startup sequence 76 | * Update translations 77 | 78 | -- Sailoog Thu, 24 Nov 2022 18:29:15 +0100 79 | 80 | openplotter-settings (3.4.4-stable) bullseye; urgency=medium 81 | 82 | * Add virtual keyboard 83 | * Add NTP server 84 | * Based on Debian Bullseye 85 | * Migrate to cloudsmith 86 | * Add rescue mode 87 | * Add shutdown management 88 | * Omprove compatibility with Ubuntu for Raspberry 89 | * Remove screensaver management 90 | * Fix errors 91 | * Update translations 92 | 93 | -- Sailoog Sat, 18 Jun 2022 20:34:28 +0200 94 | 95 | openplotter-settings (3.4.3-beta) bullseye; urgency=medium 96 | 97 | * v3 Beta 98 | 99 | -- Sailoog Wed, 17 Nov 2021 19:29:59 +0100 100 | 101 | openplotter-settings (2.9.1-stable) bionic; urgency=medium 102 | 103 | * Replace isAlive by is_alive() 104 | * Add MAIANA and OpenMarine Box apps 105 | * Update translations 106 | 107 | -- Sailoog Sun, 31 Oct 2021 12:26:45 +0100 108 | 109 | openplotter-settings (2.8.1-stable) bionic; urgency=medium 110 | 111 | * Make openplotter-gpio app only for raspberry 112 | * Add openplotter-notifications app 113 | * Add system log tools 114 | * Add support for ubuntu hirsute for raspberry 115 | * Update translations 116 | 117 | -- Sailoog Thu, 03 Jun 2021 19:08:53 +0200 118 | 119 | openplotter-settings (2.7.0-stable) bionic; urgency=medium 120 | 121 | * Improve depencies format 122 | * make openplotter-gpio app for all DEbian derivatives 123 | * add remote GPIOs 124 | * add AvNav app 125 | * add support for linux mint ulyssa 126 | * update translations 127 | 128 | -- Sailoog Mon, 08 Mar 2021 20:09:54 +0100 129 | 130 | openplotter-settings (2.6.3-beta) bionic; urgency=medium 131 | 132 | * Beta 133 | 134 | -- Sailoog Thu, 25 Feb 2021 19:54:24 +0100 135 | 136 | openplotter-settings (2.6.2-stable) bionic; urgency=medium 137 | 138 | * Remove password request for sudoers 139 | * Fix errors in Ubuntu for Raspberyy 140 | * Fix errors in Linux Mint 141 | * Add Linux codenames management (Debian, Ubuntu, Mint) 142 | * Add Norwegian language and remove Basque and Galician 143 | * Cosmetic changes 144 | * Update translations 145 | 146 | -- Sailoog Thu, 26 Nov 2020 18:10:59 +0100 147 | 148 | openplotter-settings (2.5.0-stable) bionic; urgency=medium 149 | 150 | * Add GPIO management 151 | * Add GPIO app 152 | * Update translations 153 | 154 | -- Sailoog Mon, 19 Oct 2020 12:53:28 +0200 155 | 156 | openplotter-settings (2.4.3-stable) bionic; urgency=medium 157 | 158 | * Fix error detecting serial devices 159 | * Update translations 160 | 161 | -- Sailoog Fri, 02 Oct 2020 16:38:41 +0200 162 | 163 | openplotter-settings (2.4.2-stable) bionic; urgency=medium 164 | 165 | * Remove ttyS0 from serial devices and ttyAMA0 when Bluetooth is active 166 | * Update translations 167 | 168 | -- Sailoog Tue, 29 Sep 2020 20:12:07 +0200 169 | 170 | openplotter-settings (2.4.1-stable) bionic; urgency=medium 171 | 172 | * Fix error with new features and external apps 173 | * Update translations 174 | 175 | -- Sailoog Sat, 08 Aug 2020 13:47:04 +0200 176 | 177 | openplotter-settings (2.4.0-stable) bionic; urgency=medium 178 | 179 | * Update apps list 180 | * Add button to update all available apps 181 | * Fix small bugs 182 | * Update translations 183 | 184 | -- Sailoog Fri, 07 Aug 2020 18:52:42 +0200 185 | 186 | openplotter-settings (2.3.0-stable) bionic; urgency=medium 187 | 188 | * Add SDR VHF app 189 | * Close app after updating to apply changes 190 | * Small text fix and update translations 191 | 192 | -- Sailoog Mon, 20 Apr 2020 14:06:04 +0200 193 | 194 | openplotter-settings (2.2.3-stable) bionic; urgency=medium 195 | 196 | * Change source for Xygrib 197 | * Make Xygrib available for all Debian flavors 198 | 199 | -- Sailoog Wed, 11 Mar 2020 18:38:32 +0100 200 | 201 | openplotter-settings (2.2.1-stable) bionic; urgency=medium 202 | 203 | * Add Czech and Danish languages 204 | * Update translations 205 | 206 | -- Sailoog Mon, 09 Mar 2020 19:56:05 +0100 207 | 208 | openplotter-settings (2.2.0-stable) bionic; urgency=medium 209 | 210 | * Make external apps independent 211 | 212 | -- Sailoog Thu, 05 Mar 2020 15:30:52 +0100 213 | 214 | openplotter-settings (2.1.0-stable) bionic; urgency=medium 215 | 216 | * Initial release 217 | 218 | -- Sailoog Fri, 28 Feb 2020 20:50:38 +0100 219 | 220 | openplotter-settings (2.0.27-stable) bionic; urgency=medium 221 | 222 | * Release Candidate 223 | 224 | -- Sailoog Thu, 20 Feb 2020 17:15:12 +0100 225 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: openplotter-settings 2 | Section: misc 3 | Priority: optional 4 | Maintainer: Sailoog 5 | Build-Depends: debhelper (>=9),dh-python,python3-all,python3-setuptools 6 | Standards-Version: 3.9.6 7 | Homepage: https://github.com/openplotter/openplotter-settings 8 | X-Python3-Version: >= 3.2 9 | 10 | Package: openplotter-settings 11 | Architecture: all 12 | Multi-Arch: foreign 13 | Depends: ${misc:Depends}, ${python3:Depends}, python3-wxgtk4.0, python3-ujson, python3-pyudev, vlc, matchbox-keyboard 14 | Description: Main OpenPlotter app 15 | Main OpenPlotter app 16 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: openplotter-settings 3 | Source: https://github.com/openplotter/openplotter-settings 4 | 5 | Files: * 6 | Copyright: 2022 Sailoog 7 | License: GPL-2+ 8 | This package is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | . 13 | This package is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | . 18 | You should have received a copy of the GNU General Public License 19 | along with this program. If not, see 20 | . 21 | On Debian systems, the complete text of the GNU General 22 | Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". 23 | 24 | Files: debian/* 25 | Copyright: 2022 Sailoog 26 | License: GPL-2+ 27 | This package is free software; you can redistribute it and/or modify 28 | it under the terms of the GNU General Public License as published by 29 | the Free Software Foundation; either version 2 of the License, or 30 | (at your option) any later version. 31 | . 32 | This package is distributed in the hope that it will be useful, 33 | but WITHOUT ANY WARRANTY; without even the implied warranty of 34 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 35 | GNU General Public License for more details. 36 | . 37 | You should have received a copy of the GNU General Public License 38 | along with this program. If not, see 39 | . 40 | On Debian systems, the complete text of the GNU General 41 | Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". 42 | 43 | -------------------------------------------------------------------------------- /debian/openplotter-settings-docs.docs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/debian/openplotter-settings-docs.docs -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # See debhelper(7) (uncomment to enable) 3 | # output every command that modifies files on the build system. 4 | export DH_VERBOSE = 1 5 | 6 | export PYBUILD_NAME=openplotter-settings 7 | 8 | %: 9 | dh $@ --with python3 --buildsystem=pybuild 10 | 11 | 12 | # If you need to rebuild the Sphinx documentation 13 | # Add spinxdoc to the dh --with line 14 | #override_dh_auto_build: 15 | # dh_auto_build 16 | # PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml docs/ build/html # HTML generator 17 | # PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bman docs/ build/man # Manpage generator 18 | 19 | -------------------------------------------------------------------------------- /openplotterSettings/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/__init__.py -------------------------------------------------------------------------------- /openplotterSettings/ap.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2024 by Sailoog 5 | # 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import sys, subprocess, os, uuid, time 19 | 20 | def main(): 21 | if sys.argv[1] == 'enable': 22 | 23 | if not os.path.exists('/etc/NetworkManager/system-connections/OpenPlotter-Hotspot.nmconnection'): 24 | uuidKey = str(uuid.uuid4()) 25 | timestamp = str(int(time.time())) 26 | fo = open('/etc/NetworkManager/system-connections/OpenPlotter-Hotspot.nmconnection', "w") 27 | fo.write( '[connection]\nid=OpenPlotter-Hotspot\nuuid='+uuidKey+'\ntype=wifi\ninterface-name=wlan9\ntimestamp='+timestamp+'\n[wifi]\nmode=ap\nssid=OpenPlotter\n[wifi-security]\nkey-mgmt=wpa-psk\npsk=12345678\n[ipv4]\nmethod=shared\n[ipv6]\naddr-gen-mode=stable-privacy\nmethod=ignore\n[proxy]') 28 | fo.close() 29 | subprocess.call(['chmod', '600', '/etc/NetworkManager/system-connections/OpenPlotter-Hotspot.nmconnection']) 30 | 31 | fo = open('/etc/systemd/system/create_ap_interface.service', "w") 32 | fo.write( '[Unit]\nDescription=Create Virtual WLAN Interface\nWants=network-pre.target\nBefore=network-pre.target\nBindsTo=sys-subsystem-net-devices-wlan0.device\nAfter=sys-subsystem-net-devices-wlan0.device\n[Service]\nType=oneshot\nExecStart=create_ap_interface\n[Install]\nWantedBy=multi-user.target') 33 | fo.close() 34 | 35 | subprocess.call(['systemctl', 'enable', 'create_ap_interface.service']) 36 | 37 | elif sys.argv[1] == 'disable': 38 | 39 | subprocess.call(['systemctl', 'disable', 'create_ap_interface.service']) 40 | 41 | if __name__ == '__main__': 42 | main() -------------------------------------------------------------------------------- /openplotterSettings/appsList.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of Openplotter. 4 | # Copyright (C) 2022 by Sailoog 5 | # 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import os 19 | from .platform import Platform 20 | 21 | class AppsList: 22 | def __init__(self): 23 | platform2 = Platform() 24 | currentdir = os.path.dirname(os.path.abspath(__file__)) 25 | 26 | self.appsDict = [] 27 | 28 | app = { 29 | 'name': 'SDR VHF', 30 | 'platform': 'both', 31 | 'package': 'openplotter-sdr-vhf', 32 | 'preUninstall': platform2.admin+' sdrVhfPreUninstall', 33 | 'uninstall': 'openplotter-sdr-vhf', 34 | 'sources': ['https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian'], 35 | 'dev': 'no', 36 | 'entryPoint': 'openplotter-sdr-vhf', 37 | 'postInstall': platform2.admin+' sdrVhfPostInstall', 38 | 'reboot': 'no', 39 | 'module': 'openplotterSdrVhf', 40 | 'conf': 'sdr_vhf' 41 | } 42 | self.appsDict.append(app) 43 | 44 | app = { 45 | 'name': _('AvNav Installer'), 46 | 'platform': 'both', 47 | 'package': 'openplotter-avnav', 48 | 'preUninstall': platform2.admin+' avPreUninstall', 49 | 'uninstall': 'openplotter-avnav', 50 | 'sources': ['https://www.free-x.de/deb4op'], 51 | 'dev': 'no', 52 | 'entryPoint': 'openplotter-avnav', 53 | 'postInstall': platform2.admin+' avPostInstall', 54 | 'reboot': 'no', 55 | 'module': 'openplotterAvnav', 56 | 'conf': 'avnav' 57 | } 58 | self.appsDict.append(app) 59 | 60 | app = { 61 | 'name': 'XyGrib', 62 | 'platform': 'both', 63 | 'package': 'xygrib', 64 | 'preUninstall': '', 65 | 'uninstall': 'xygrib', 66 | 'sources': ['https://www.free-x.de/deb4op'], 67 | 'dev': 'no', 68 | 'entryPoint': 'XyGrib', 69 | 'postInstall': platform2.admin+' python3 '+currentdir+'/xygribPostInstall.py', 70 | 'reboot': 'no', 71 | 'module': '', 72 | 'conf': '' 73 | } 74 | self.appsDict.append(app) 75 | 76 | app = { 77 | 'name': _('MAIANA AIS transponder'), 78 | 'platform': 'both', 79 | 'package': 'openplotter-maiana', 80 | 'preUninstall': platform2.admin+' maianaPreUninstall', 81 | 'uninstall': 'openplotter-maiana', 82 | 'sources': ['https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian'], 83 | 'dev': 'no', 84 | 'entryPoint': 'openplotter-maiana', 85 | 'postInstall': platform2.admin+' maianaPostInstall', 86 | 'reboot': 'no', 87 | 'module': 'openplotterMaiana', 88 | 'conf': '' 89 | } 90 | self.appsDict.append(app) 91 | 92 | app = { 93 | 'name': 'GPIO', 94 | 'platform': 'rpi', 95 | 'package': 'openplotter-gpio', 96 | 'preUninstall': platform2.admin+' gpioPreUninstall', 97 | 'uninstall': 'openplotter-gpio', 98 | 'sources': ['https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian'], 99 | 'dev': 'no', 100 | 'entryPoint': 'openplotter-gpio', 101 | 'postInstall': platform2.admin+' gpioPostInstall', 102 | 'reboot': 'no', 103 | 'module': 'openplotterGpio', 104 | 'conf': 'gpio' 105 | } 106 | self.appsDict.append(app) 107 | 108 | app = { 109 | 'name': _('I2C Sensors'), 110 | 'platform': 'rpi', 111 | 'package': 'openplotter-i2c', 112 | 'preUninstall': platform2.admin+' i2cPreUninstall', 113 | 'uninstall': 'openplotter-i2c', 114 | 'sources': ['https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian'], 115 | 'dev': 'no', 116 | 'entryPoint': 'openplotter-i2c', 117 | 'postInstall': platform2.admin+' i2cPostInstall', 118 | 'reboot': 'no', 119 | 'module': 'openplotterI2c', 120 | 'conf': 'i2c' 121 | } 122 | self.appsDict.append(app) 123 | 124 | app = { 125 | 'name': 'Pypilot', 126 | 'platform': 'rpi', 127 | 'package': 'openplotter-pypilot', 128 | 'preUninstall': platform2.admin+' pypilotPreUninstall', 129 | 'uninstall': 'openplotter-pypilot', 130 | 'sources': ['https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian'], 131 | 'dev': 'no', 132 | 'entryPoint': 'openplotter-pypilot', 133 | 'postInstall': platform2.admin+' pypilotPostInstall', 134 | 'reboot': 'no', 135 | 'module': 'openplotterPypilot', 136 | 'conf': 'pypilot' 137 | } 138 | self.appsDict.append(app) 139 | 140 | app = { 141 | 'name': 'IoB', 142 | 'platform': 'both', 143 | 'package': 'openplotter-iob', 144 | 'preUninstall': platform2.admin+' iobPreUninstall', 145 | 'uninstall': 'openplotter-iob', 146 | 'sources': ['https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian'], 147 | 'dev': 'no', 148 | 'entryPoint': 'openplotter-iob', 149 | 'postInstall': platform2.admin+' iobPostInstall', 150 | 'reboot': 'no', 151 | 'module': 'openplotterIob', 152 | 'conf': 'iob' 153 | } 154 | self.appsDict.append(app) 155 | 156 | app = { 157 | 'name': _('Notifications'), 158 | 'platform': 'both', 159 | 'package': 'openplotter-notifications', 160 | 'preUninstall': 'notificationsPreUninstall', 161 | 'uninstall': 'openplotter-notifications', 162 | 'sources': ['https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian'], 163 | 'dev': 'no', 164 | 'entryPoint': 'openplotter-notifications', 165 | 'postInstall': 'notificationsPostInstall', 166 | 'reboot': 'no', 167 | 'module': 'openplotterNotifications', 168 | 'conf': 'notifications' 169 | } 170 | self.appsDict.append(app) 171 | 172 | app = { 173 | 'name': _('Dashboards'), 174 | 'platform': 'both', 175 | 'package': 'openplotter-dashboards', 176 | 'preUninstall': '', 177 | 'uninstall': 'openplotter-dashboards', 178 | 'sources': ['https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian'], 179 | 'dev': 'no', 180 | 'entryPoint': 'openplotter-dashboards', 181 | 'postInstall': '', 182 | 'reboot': 'no', 183 | 'module': 'openplotterDashboards', 184 | 'conf': '' 185 | } 186 | self.appsDict.append(app) 187 | 188 | app = { 189 | 'name': _('CAN Bus'), 190 | 'platform': 'both', 191 | 'package': 'openplotter-can', 192 | 'preUninstall': platform2.admin+' canPreUninstall', 193 | 'uninstall': 'openplotter-can', 194 | 'sources': ['https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian'], 195 | 'dev': 'no', 196 | 'entryPoint': 'openplotter-can', 197 | 'postInstall': platform2.admin+' canPostInstall', 198 | 'reboot': 'no', 199 | 'module': 'openplotterCan', 200 | 'conf': 'can' 201 | } 202 | self.appsDict.append(app) 203 | 204 | app = { 205 | 'name': _('Serial'), 206 | 'platform': 'both', 207 | 'package': 'openplotter-serial', 208 | 'preUninstall': platform2.admin+' serialPreUninstall', 209 | 'uninstall': 'openplotter-serial', 210 | 'sources': ['https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian'], 211 | 'dev': 'no', 212 | 'entryPoint': 'openplotter-serial', 213 | 'postInstall': platform2.admin+' serialPostInstall', 214 | 'reboot': 'no', 215 | 'module': 'openplotterSerial', 216 | 'conf': 'serial' 217 | } 218 | self.appsDict.append(app) 219 | 220 | app = { 221 | 'name': _('OpenCPN Installer'), 222 | 'platform': 'both', 223 | 'package': 'openplotter-opencpn-installer', 224 | 'preUninstall': platform2.admin+' opencpnPreUninstall', 225 | 'uninstall': 'openplotter-opencpn-installer opencpn', 226 | 'sources': ['https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian'], 227 | 'dev': 'no', 228 | 'entryPoint': 'openplotter-opencpn-installer', 229 | 'postInstall': platform2.admin+' opencpnPostInstall', 230 | 'reboot': 'no', 231 | 'module': 'openplotterOpencpnInstaller', 232 | 'conf': '' 233 | } 234 | self.appsDict.append(app) 235 | 236 | app = { 237 | 'name': _('Signal K Installer'), 238 | 'platform': 'both', 239 | 'package': 'openplotter-signalk-installer', 240 | 'preUninstall': platform2.admin+' signalkPreUninstall', 241 | 'uninstall': 'openplotter-signalk-installer', 242 | 'sources': ['https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian'], 243 | 'dev': 'no', 244 | 'entryPoint': 'openplotter-signalk-installer', 245 | 'postInstall': platform2.admin+' signalkPostInstall', 246 | 'reboot': 'no', 247 | 'module': 'openplotterSignalkInstaller', 248 | 'conf': 'signalk' 249 | } 250 | self.appsDict.append(app) 251 | 252 | app = { 253 | 'name': _('Documentation'), 254 | 'platform': 'both', 255 | 'package': 'openplotter-doc', 256 | 'preUninstall': '', 257 | 'uninstall': 'openplotter-doc', 258 | 'sources': ['https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian'], 259 | 'dev': 'no', 260 | 'entryPoint': 'x-www-browser /usr/share/openplotter-doc/index.html', 261 | 'postInstall': '', 262 | 'reboot': 'no', 263 | 'module': '', 264 | 'conf': '' 265 | } 266 | self.appsDict.append(app) 267 | 268 | app = { 269 | 'name': _('Settings'), 270 | 'platform': 'both', 271 | 'package': 'openplotter-settings', 272 | 'preUninstall': platform2.admin+' settingsPreUninstall', 273 | 'uninstall': 'openplotter-settings', 274 | 'sources': ['https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian'], 275 | 'dev': 'no', 276 | 'entryPoint': 'openplotter-settings', 277 | 'postInstall': '', 278 | 'reboot': 'no', 279 | 'module': '', 280 | 'conf': '' 281 | } 282 | self.appsDict.append(app) 283 | -------------------------------------------------------------------------------- /openplotterSettings/backlight.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2023 by Sailoog 5 | # 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import os, sys 19 | 20 | if sys.argv[1] == 'install': 21 | os.system('pip3 install rpi_backlight -U --break-system-packages') 22 | 23 | udevFile = '/etc/udev/rules.d/backlight-permissions.rules' 24 | if not os.path.exists(udevFile): 25 | fo = open(udevFile, "w") 26 | fo.write( 'SUBSYSTEM=="backlight",RUN+="/bin/chmod 666 /sys/class/backlight/%k/brightness /sys/class/backlight/%k/bl_power"') 27 | fo.close() 28 | os.system('udevadm control --reload-rules && udevadm trigger') 29 | 30 | currentdir = os.path.dirname(os.path.abspath(__file__)) 31 | source = currentdir+'/data/openplotter-brightness.desktop' 32 | os.system('cp -f '+source+' /usr/share/applications') 33 | 34 | if sys.argv[1] == 'uninstall': 35 | backlightPath = "/sys/class/backlight" 36 | backlightDevices = os.listdir(backlightPath) 37 | if backlightDevices: 38 | backlightDevice = backlightPath+'/'+backlightDevices[0] 39 | os.system('rpi-backlight '+backlightDevice+' -b 100') 40 | os.system('pip3 uninstall -y rpi_backlight --break-system-packages') 41 | os.system('rm -f /etc/udev/rules.d/backlight-permissions.rules') 42 | os.system('udevadm control --reload-rules && udevadm trigger') 43 | os.system('rm -f /usr/share/applications/openplotter-brightness.desktop') 44 | 45 | 46 | -------------------------------------------------------------------------------- /openplotterSettings/backlightGui.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2024 by Sailoog 5 | # 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import os, subprocess 19 | 20 | def main(): 21 | subprocess.call(['pkill', '-f', 'rpi-backlight-gui']) 22 | backlightPath = "/sys/class/backlight" 23 | backlightDevices = os.listdir(backlightPath) 24 | if backlightDevices: 25 | backlightDevice = backlightPath+'/'+backlightDevices[0] 26 | subprocess.Popen(['rpi-backlight-gui', backlightDevice]) 27 | 28 | if __name__ == '__main__': 29 | main() -------------------------------------------------------------------------------- /openplotterSettings/conf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of Openplotter. 4 | # Copyright (C) 2022 by sailoog 5 | # e-sailing 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import os, configparser 19 | from .version import * 20 | 21 | class Conf: 22 | def __init__(self): 23 | self.user = os.environ.get('USER') 24 | if self.user == 'root': 25 | try: 26 | self.user = os.path.expanduser(os.environ["SUDO_USER"]) 27 | except: 28 | import pwd 29 | self.user = pwd.getpwuid(int(os.environ["PKEXEC_UID"])).pw_name 30 | self.home = '/home/'+self.user 31 | 32 | self.data_conf = configparser.ConfigParser() 33 | 34 | 35 | self.conf_folder = self.home+'/.openplotter' 36 | if not os.path.exists(self.conf_folder): 37 | print('creating configuration directory', self.conf_folder) 38 | os.mkdir(self.conf_folder) 39 | 40 | self.conf_file = self.conf_folder+'/openplotter.conf' 41 | if not os.path.exists(self.conf_file): 42 | print('openplotter.conf not found, creating', self.conf_file) 43 | fo = open(self.conf_file, "w") 44 | fo.write( '[GENERAL]\nlang = en\nplay = /usr/share/sounds/openplotter/Store_Door_Chime.mp3\n') 45 | fo.close() 46 | self.read() 47 | 48 | def read(self): 49 | self.data_conf.read(self.conf_file) 50 | 51 | def write(self): 52 | with open(self.conf_file, 'w') as configfile: 53 | self.data_conf.write(configfile) 54 | 55 | def get(self, section, item): 56 | self.read() 57 | write = False 58 | if not self.data_conf.has_section(section): 59 | self.data_conf.add_section(section) 60 | write = True 61 | if not self.data_conf.has_option(section,item): 62 | self.data_conf.set(section, item, '') 63 | write = True 64 | if write: self.write() 65 | return self.data_conf.get(section, item) 66 | 67 | def set(self, section, item, value): 68 | self.read() 69 | if not self.data_conf.has_section(section): 70 | self.data_conf.add_section(section) 71 | self.data_conf.set(section, item, value) 72 | self.write() 73 | -------------------------------------------------------------------------------- /openplotterSettings/data/ap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/ap.png -------------------------------------------------------------------------------- /openplotterSettings/data/apply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/apply.png -------------------------------------------------------------------------------- /openplotterSettings/data/autostart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/autostart.png -------------------------------------------------------------------------------- /openplotterSettings/data/brightness-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/brightness-48.png -------------------------------------------------------------------------------- /openplotterSettings/data/brightness-install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/brightness-install.png -------------------------------------------------------------------------------- /openplotterSettings/data/brightness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/brightness.png -------------------------------------------------------------------------------- /openplotterSettings/data/bug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/bug.png -------------------------------------------------------------------------------- /openplotterSettings/data/changelog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/changelog.png -------------------------------------------------------------------------------- /openplotterSettings/data/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/check.png -------------------------------------------------------------------------------- /openplotterSettings/data/chip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/chip.png -------------------------------------------------------------------------------- /openplotterSettings/data/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/close.png -------------------------------------------------------------------------------- /openplotterSettings/data/crowdin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/crowdin.png -------------------------------------------------------------------------------- /openplotterSettings/data/debian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/debian.png -------------------------------------------------------------------------------- /openplotterSettings/data/delay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/delay.png -------------------------------------------------------------------------------- /openplotterSettings/data/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/file.png -------------------------------------------------------------------------------- /openplotterSettings/data/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/help.png -------------------------------------------------------------------------------- /openplotterSettings/data/install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/install.png -------------------------------------------------------------------------------- /openplotterSettings/data/keyboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/keyboard.png -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/arrow2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/keyboards/arrow2.png -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/base-fragment-CAT.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/base-fragment-EN.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/keyboards/control.png -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/full-fragment-it_IT.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/key-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/keyboards/key-down.png -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/key-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/keyboards/key-left.png -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/key-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/keyboards/key-right.png -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/key-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/keyboards/key-up.png -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/keyboard-CAT.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/keyboard-EN.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/keyboard-IT-full.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/keyboard-IT-normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/keyboard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/normal-fragment-it_IT.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | - 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/return2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/keyboards/return2.png -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/shift2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/keyboards/shift2.png -------------------------------------------------------------------------------- /openplotterSettings/data/keyboards/shift_caps2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/keyboards/shift_caps2.png -------------------------------------------------------------------------------- /openplotterSettings/data/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/open.png -------------------------------------------------------------------------------- /openplotterSettings/data/openplotter-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/openplotter-24.png -------------------------------------------------------------------------------- /openplotterSettings/data/openplotter-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/openplotter-48.png -------------------------------------------------------------------------------- /openplotterSettings/data/openplotter-brightness.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=rpi-backlight 3 | Exec=openplotter-backlight-gui 4 | Icon=brightness-48 5 | StartupNotify=true 6 | Terminal=false 7 | Type=Application 8 | Categories=Utility; -------------------------------------------------------------------------------- /openplotterSettings/data/openplotter-check.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Check system 3 | Exec=openplotter-startup check 4 | Icon=openplotter-check 5 | StartupNotify=true 6 | Terminal=false 7 | Type=Application 8 | Categories=OpenPlotter -------------------------------------------------------------------------------- /openplotterSettings/data/openplotter-check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/openplotter-check.png -------------------------------------------------------------------------------- /openplotterSettings/data/openplotter-settings.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Settings 3 | Exec=openplotter-settings 4 | Icon=openplotter-settings 5 | StartupNotify=true 6 | Terminal=false 7 | Type=Application 8 | Categories=OpenPlotter -------------------------------------------------------------------------------- /openplotterSettings/data/openplotter-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/openplotter-settings.png -------------------------------------------------------------------------------- /openplotterSettings/data/openplotter-startup.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Exec=openplotter-startup start -------------------------------------------------------------------------------- /openplotterSettings/data/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/output.png -------------------------------------------------------------------------------- /openplotterSettings/data/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/play.png -------------------------------------------------------------------------------- /openplotterSettings/data/ports.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/ports.png -------------------------------------------------------------------------------- /openplotterSettings/data/poweroff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/poweroff.png -------------------------------------------------------------------------------- /openplotterSettings/data/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/refresh.png -------------------------------------------------------------------------------- /openplotterSettings/data/resize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/resize.png -------------------------------------------------------------------------------- /openplotterSettings/data/rpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/rpi.png -------------------------------------------------------------------------------- /openplotterSettings/data/shutdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/shutdown.png -------------------------------------------------------------------------------- /openplotterSettings/data/sounds/Bleep.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/sounds/Bleep.mp3 -------------------------------------------------------------------------------- /openplotterSettings/data/sounds/House_Fire_Alarm.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/sounds/House_Fire_Alarm.mp3 -------------------------------------------------------------------------------- /openplotterSettings/data/sounds/Ship_Bell.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/sounds/Ship_Bell.mp3 -------------------------------------------------------------------------------- /openplotterSettings/data/sounds/Store_Door_Chime.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/sounds/Store_Door_Chime.mp3 -------------------------------------------------------------------------------- /openplotterSettings/data/sounds/Tornado_Siren_II.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/sounds/Tornado_Siren_II.mp3 -------------------------------------------------------------------------------- /openplotterSettings/data/sources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/sources.png -------------------------------------------------------------------------------- /openplotterSettings/data/sources/openplotter.beta.gpg.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | 3 | mQGNBGXjB5EBDAC/QcYqGg7onjDfaIzum7RwlQTKwqAcdBvyoalOKqGmc/aVhXaO 4 | EKdC9nudBmA3txDTVQdlIiqZY+pbehOmzDnMmCQUQ090xvKQbw3sCjr10kja9tKd 5 | 3NUKV3xz9GV5I7oimkNyH9yr42EKJN/m6P57yTOp2/iBruB5bRp35H7E7UiDO6vx 6 | vwmaxZE7waQCvhTtzX9FBZQLMkrPicsxaiWGh5F5QmOJKBRJuiTgAsz3C0nQYiHm 7 | IxrAruj1H5FXIjchUENldlt35ajGiTpXFoAmkIIn1iU2rIVjUtPNNahA3i6dYYlo 8 | NJORyqtQ7GPGIcwSJM+yp7wB+SC8YvoXbtdRZGq9BIMmUYy+dOsQ93M0UeHNVgHd 9 | Ev/YV5MQE+MvHhN/XZF9/dYnylEpFD/RReu+ooxvRquNZu2dLw2HCif6866cL2Ut 10 | 2WyH2PU5nz08B355GtciA7I+G3RQ3Q9WEHJzk7ogP1HWQArazNS82l27By/s4zTe 11 | rmXrUaHeWvgJo0EAEQEAAbRJQ2xvdWRzbWl0aCBQYWNrYWdlIChvcGVucGxvdHRl 12 | ci9vcGVucGxvdHRlci1iZXRhKSA8c3VwcG9ydEBjbG91ZHNtaXRoLmlvPokBzgQT 13 | AQgAOBYhBCO2dOHgLfjtop61SIeWPOTUQEFLBQJl4weRAhsvBQsJCAcDBRUKCQgL 14 | BRYCAwEAAh4BAheAAAoJEIeWPOTUQEFL8tgL/jfwtJQw/QaKNnERHwDE8ZMVXHce 15 | v0xtz6zU0Dxwo5uy7U4PQgUNTIdCW7iVFhaAWuf/39I6O9MO4Pi+4SMFLBOznJK1 16 | AJ550yOFQWJMWdIt1C90B+m8qlImprZDNkgNAySXRnr5TVeuBBfByixgXzLp+LL3 17 | cHJeRDA2Q4MIDofwgFSI9hifET1Y1L7nTNRd3JFUtWd64ILbVTYTP1iB3Aa/bldI 18 | pz/Ki+WnxO1nSugcJkmjJar2icVXzmKGg+KfDmyYcz35pO90OaSS5lFjroMA7PDD 19 | Z/ooyoG6QdtFavLDFRExNXLxcXBCHSKK70lm2NH3rHppMxSyw4ieW8OhVBKk0a8B 20 | m0DCGDkAGEAnD8/tTZTbYeV1iYZq2RYVZmrAfRwbqnp7fJUJexs85H0gLDfflvIO 21 | I7YESN2axr3XoW7j7g8OKNdzma8MwEo4DHYOXTUDgXi27b2CneHH0nimsJhGTtaJ 22 | izp7+hHinKVvFoSZAHNvQRm26YprKol9XhEH5A== 23 | =5/sS 24 | -----END PGP PUBLIC KEY BLOCK----- 25 | -------------------------------------------------------------------------------- /openplotterSettings/data/sources/openplotter.gpg.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | Version: GnuPG v2 3 | 4 | mQENBF5Feq0BCADDGtspkk3IBEEPXYWcUNoPpcwNBBLNBGHZ7PUWeE1/HvHgpCGr 5 | V2uIrlPGzJehfgjGSKju3NNbL6cit1csXJvk7NNKz9fAjagzsZk+j2v3voP0jBR1 6 | yAlEgy5x6p3/FOPNZDkmKh3JAZZh9qJ1FFqJJHPpVP6AlZnY2vCZvrAFEDSX/4Nb 7 | N4uCoQsd/3VgszBTJKkDWrquCgkJ8ljVav9Z6S2gXgexZId5OMRjItM5JUFZG8am 8 | eO+CyFbQ8ybeYk9ace80IRXduTKezggKToNiL3S3CIRNdXP4oNVdjhmC4rVeUirA 9 | I/AQJ6FMV66XoJDpDnHcPjh36kgOuJNsjphbABEBAAG0RENsb3Vkc21pdGggUGFj 10 | a2FnZSAob3BlbnBsb3R0ZXIvb3BlbnBsb3R0ZXIpIDxzdXBwb3J0QGNsb3Vkc21p 11 | dGguaW8+iQE3BBMBCAAhBQJeRXqtAhsvBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheA 12 | AAoJEBMFSML8m1D9NAAH/2o2oWfAOLa3+K8ydN7Y/rybhuzqVvnMMs2nK4M0nsHo 13 | 67AIXVsrxx8/NlUX9VD3wiNmUYTKH/cJXONrJwCYvCSxJisIZyBD4h2CDGTRc2h3 14 | 0X9VooHdJzYh6vUEriAzbYUUpOoJUhZLPpCu2xcZestUB+Fd4tH6M/LjY/MXu2gD 15 | +DYzFYW8ijgATHBmy+TYDj5jMzRxwoHneAosw/Z88dxdC12rfMU7NXHB6WB9XZ9v 16 | 5E53gx5LLYql32de7gUEVJEK4dNcKMlUoCxj0u6LByebIt4bh1xbfihtiYnAPEhh 17 | FAL9r4+M+bDTg0wP1m8FpM0naDNh8R4yln+Ze5Iit8o= 18 | =LpRB 19 | -----END PGP PUBLIC KEY BLOCK----- 20 | -------------------------------------------------------------------------------- /openplotterSettings/data/sources/oss.boating.gpg.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | 3 | mQENBFwbrLwBCAC/x7gZE653NW30Hxe449csjPKQpQUmqqRgibACTD5Wj59heGeR 4 | Gqmy3dMXrVu8VVWkGVsGI1mfcqPxSJYnh706w3sTLGVU6pHg2uX0b+L72q6pbqrp 5 | ufyqmrqMOsO7eMBtaiRpsszEQsTkkhDwXKjswUyRDUt7i5dD58ptelOMdG013+ps 6 | q2zf6NY3nzwLBQ6uJcEIS3TXzSWJcYwcdIkUjgX+sEsTyxEerdADl3vR9l0ZDi+O 7 | 8HsDZsaSSajxmKK/SmaS5FbXPrCetXGiAlSPBe9sDz96zIWct+t2rKWWupbfMXW5 8 | LtI+uYRywAiyFdZMPICMQaE8NDiZL+StpmQ7ABEBAAG0HmZyZWUteCA8b3NzLmJv 9 | YXRpbmdAZ21haWwuY29tPokBTgQTAQgAOBYhBAa2erDpiDEEdedaJ0bpXzyKYWI7 10 | BQJcG6y8AhsDBQsJCAcCBhUICQoLAgQWAgMBAh4BAheAAAoJEEbpXzyKYWI7GQwH 11 | /2UAd2Pn/bnqkZSNOi/SdgaCGwxKc76ELTSFwL7GqlPnhSvjE1LXtaR2KZ7mPrmg 12 | sCeSYVig3gp4XOwHq5XjKNg9worLrmvb/EsUEEVOMAMZYWeaCkdslakAQFCi4Yr5 13 | SuW3pxn7lrYoBKTpFkRQWaAab0g7HefOSlfSFbJcHv+4UiaRPSh3LF6Q5r2Idz3i 14 | jZmw1adYcXCpBvYMoDrjoL7f/ayz3zXtpTcpd8uXeZ5Bu9o2M4W+V8cmdzduF0PD 15 | 7KxvM9jKUa2VN72MSqMbWdwBklkMgVxWQ1VUHseGiM7jhsyZO8w0lUkwNaqsy83q 16 | HXI0J8ubILFg8QaWuHco7g65AQ0EXBusvAEIAPuZWQIskNMB/5eJOMUM2kfOGJP+ 17 | he46JtpLfCALGl2GDQ6F+4ksrnaGjjBnYI8iqI/JUjFquTQ03b/V44i9QXt6WU7b 18 | rDAHEkQmUn/wKO01tKoqoJ8iatMmSp6G5fYfZSt3OqWdFErBZOkH7+XDWF6p6K5l 19 | PiPu96hJ0SVs2r36Nk2HOgbLhHtrq8lOlWSqxTQCP0Be+Q59Fk/8ppZswjrUq7pj 20 | WBAKyEWypcwwzgbyiTzfarc/nbqz08RSPkgu5Ah6uaSFtY8Sjy6mSimWTDkRz662 21 | Qnc0P913vF/AvCu00oygK4XRmkSbK28a0+FXB3rbaoNuku5PE/4xc+xnjCsAEQEA 22 | AYkBNgQYAQgAIBYhBAa2erDpiDEEdedaJ0bpXzyKYWI7BQJcG6y8AhsMAAoJEEbp 23 | XzyKYWI7GjwIAIPt0Om8FFh9BLg+a4Pcl/dpgKrPDUrRrkzhjfw9cbpDPMbdzMpN 24 | Z3cI8pc/l3UjGwvv1my5oUwxYkqYSPHfA2I5nSOXbYJUg2FBIc3EuhjVacRS8STZ 25 | 0ueGegqwV6bz0O5C5lBPAc9MDxUCyeIWZSlY+p+m4YEPxbHRPYdlF5W/Jex5cTnB 26 | 0vYyjQugM7kpBPMDFKMYhrSYHW5gArzz5Fmh9RuzccaXnmUT0QzsNZd8Yox5924x 27 | krkM+szePBWxjfDu1TxzpR4gDrWpIlLBhK2xS+TG/joxPNwIg42w1hv1Ud7PzLrh 28 | +3y2bP+nONCZ1dB32CwW8fL7lPlOAqHwbUs= 29 | =YPRW 30 | -----END PGP PUBLIC KEY BLOCK----- 31 | -------------------------------------------------------------------------------- /openplotterSettings/data/touchscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/touchscreen.png -------------------------------------------------------------------------------- /openplotterSettings/data/uninstall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/uninstall.png -------------------------------------------------------------------------------- /openplotterSettings/data/update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/update.png -------------------------------------------------------------------------------- /openplotterSettings/data/wayland.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/data/wayland.png -------------------------------------------------------------------------------- /openplotterSettings/data/xygrib.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=XyGrib GRIB file viewer 4 | GenericName=GRIB file viewer 5 | Comment=Meteorological file viewer 6 | Exec=XyGrib 7 | Icon=xygrib.png 8 | Terminal=false 9 | Type=Application 10 | Categories=OpenPlotter 11 | StartupNotify=true 12 | -------------------------------------------------------------------------------- /openplotterSettings/gpio.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of Openplotter. 4 | # Copyright (C) 2019 by Sailoog 5 | # 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import importlib, wx, os, subprocess, sys 19 | from .conf import Conf 20 | from .language import Language 21 | from .appsList import AppsList 22 | import wx.richtext as rt 23 | import wx.lib.scrolledpanel 24 | 25 | class Gpio: 26 | def __init__(self): 27 | self.conf = Conf() 28 | self.currentdir = os.path.dirname(os.path.abspath(__file__)) 29 | self.currentLanguage = self.conf.get('GENERAL', 'lang') 30 | self.language = Language(self.currentdir,'openplotter-settings',self.currentLanguage) 31 | if self.conf.get('GENERAL', 'debug') == 'yes': self.debug = True 32 | else: self.debug = False 33 | 34 | self.gpioMap = [ 35 | {'physical':'1', 'BCM': '3v3', 'feature': _('Power'), 'shared': True, 'usedBy': []}, 36 | {'physical':'2', 'BCM': '5v', 'feature': _('Power'), 'shared': True, 'usedBy': []}, 37 | {'physical':'3', 'BCM': 'GPIO 2', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 38 | {'physical':'4', 'BCM': '5v', 'feature': _('Power'), 'shared': True, 'usedBy': []}, 39 | {'physical':'5', 'BCM': 'GPIO 3', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 40 | {'physical':'6', 'BCM': _('Ground'), 'feature': _('Power'), 'shared': True, 'usedBy': []}, 41 | {'physical':'7', 'BCM': 'GPIO 4', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 42 | {'physical':'8', 'BCM': 'GPIO 14', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 43 | {'physical':'9', 'BCM': _('Ground'), 'feature': _('Power'), 'shared': True, 'usedBy': []}, 44 | {'physical':'10', 'BCM': 'GPIO 15', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 45 | {'physical':'11', 'BCM': 'GPIO 17', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 46 | {'physical':'12', 'BCM': 'GPIO 18', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 47 | {'physical':'13', 'BCM': 'GPIO 27', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 48 | {'physical':'14', 'BCM': _('Ground'), 'feature': _('Power'), 'shared': True, 'usedBy': []}, 49 | {'physical':'15', 'BCM': 'GPIO 22', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 50 | {'physical':'16', 'BCM': 'GPIO 23', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 51 | {'physical':'17', 'BCM': '3v3', 'feature': _('Power'), 'shared': True, 'usedBy': []}, 52 | {'physical':'18', 'BCM': 'GPIO 24', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 53 | {'physical':'19', 'BCM': 'GPIO 10', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 54 | {'physical':'20', 'BCM': _('Ground'), 'feature': _('Power'), 'shared': True, 'usedBy': []}, 55 | {'physical':'21', 'BCM': 'GPIO 9', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 56 | {'physical':'22', 'BCM': 'GPIO 25', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 57 | {'physical':'23', 'BCM': 'GPIO 11', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 58 | {'physical':'24', 'BCM': 'GPIO 8', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 59 | {'physical':'25', 'BCM': _('Ground'), 'feature': _('Power'), 'shared': True, 'usedBy': []}, 60 | {'physical':'26', 'BCM': 'GPIO 7', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 61 | {'physical':'27', 'BCM': 'GPIO 0', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 62 | {'physical':'28', 'BCM': 'GPIO 1', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 63 | {'physical':'29', 'BCM': 'GPIO 5', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 64 | {'physical':'30', 'BCM': _('Ground'), 'feature': _('Power'), 'shared': True, 'usedBy': []}, 65 | {'physical':'31', 'BCM': 'GPIO 6', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 66 | {'physical':'32', 'BCM': 'GPIO 12', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 67 | {'physical':'33', 'BCM': 'GPIO 13', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 68 | {'physical':'34', 'BCM': _('Ground'), 'feature': _('Power'), 'shared': True, 'usedBy': []}, 69 | {'physical':'35', 'BCM': 'GPIO 19', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 70 | {'physical':'36', 'BCM': 'GPIO 16', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 71 | {'physical':'37', 'BCM': 'GPIO 26', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 72 | {'physical':'38', 'BCM': 'GPIO 20', 'feature': 'GPIO', 'shared': False, 'usedBy': []}, 73 | {'physical':'39', 'BCM': _('Ground'), 'feature': _('Power'), 'shared': True, 'usedBy': []}, 74 | {'physical':'40', 'BCM': 'GPIO 21', 'feature': 'GPIO', 'shared': False, 'usedBy': []} 75 | ] 76 | try: 77 | out = subprocess.check_output('ls /dev/i2c*', shell=True).decode(sys.stdin.encoding) 78 | if '/dev/i2c-0' in out or '/dev/i2c-1' in out: 79 | self.gpioMap[2]['feature'] = 'I2C' 80 | self.gpioMap[2]['shared'] = True 81 | self.gpioMap[4]['feature'] = 'I2C' 82 | self.gpioMap[4]['shared'] = True 83 | except: pass 84 | try: 85 | out = subprocess.check_output('lsmod').decode(sys.stdin.encoding) 86 | if 'spi_bcm2835' in out: 87 | self.gpioMap[18]['feature'] = 'SPI' 88 | self.gpioMap[18]['shared'] = True 89 | self.gpioMap[20]['feature'] = 'SPI' 90 | self.gpioMap[20]['shared'] = True 91 | self.gpioMap[22]['feature'] = 'SPI' 92 | self.gpioMap[22]['shared'] = True 93 | self.gpioMap[23]['feature'] = 'SPI' 94 | self.gpioMap[23]['shared'] = False 95 | self.gpioMap[25]['feature'] = 'SPI' 96 | self.gpioMap[25]['shared'] = False 97 | except: pass 98 | try: 99 | modelfile = open('/sys/firmware/devicetree/base/model', 'r', 2000) 100 | rpimodel = modelfile.read()[:-1] 101 | except: rpimodel = '' 102 | self.used = [] 103 | config = '/boot/firmware/config.txt' 104 | boot = '/boot/firmware' 105 | try: file = open(config, 'r') 106 | except: 107 | config = '/boot/config.txt' 108 | boot = '/boot' 109 | file = open(config, 'r') 110 | while True: 111 | line = file.readline() 112 | if not line: break 113 | if 'Raspberry Pi 3' in rpimodel: 114 | if 'dtoverlay=disable-bt' in line and not '#' in line: 115 | self.gpioMap[7]['feature'] = 'UART0' 116 | self.gpioMap[7]['shared'] = False 117 | self.gpioMap[9]['feature'] = 'UART0' 118 | self.gpioMap[9]['shared'] = False 119 | elif 'Raspberry Pi 4' in rpimodel: 120 | if 'dtoverlay=disable-bt' in line and not '#' in line: 121 | self.gpioMap[7]['feature'] = 'UART0' 122 | self.gpioMap[7]['shared'] = False 123 | self.gpioMap[9]['feature'] = 'UART0' 124 | self.gpioMap[9]['shared'] = False 125 | if 'dtoverlay=uart2' in line and not '#' in line: 126 | self.gpioMap[26]['feature'] = 'UART2' 127 | self.gpioMap[26]['shared'] = False 128 | self.gpioMap[27]['feature'] = 'UART2' 129 | self.gpioMap[27]['shared'] = False 130 | if 'dtoverlay=uart3' in line and not '#' in line: 131 | self.gpioMap[6]['feature'] = 'UART3' 132 | self.gpioMap[6]['shared'] = False 133 | self.gpioMap[28]['feature'] = 'UART3' 134 | self.gpioMap[28]['shared'] = False 135 | if 'dtoverlay=uart4' in line and not '#' in line: 136 | self.gpioMap[20]['feature'] = 'UART4' 137 | self.gpioMap[20]['shared'] = False 138 | self.gpioMap[23]['feature'] = 'UART4' 139 | self.gpioMap[23]['shared'] = False 140 | if 'dtoverlay=uart5' in line and not '#' in line: 141 | self.gpioMap[32]['feature'] = 'UART5' 142 | self.gpioMap[32]['shared'] = False 143 | self.gpioMap[31]['feature'] = 'UART5' 144 | self.gpioMap[31]['shared'] = False 145 | elif 'Raspberry Pi 5' in rpimodel: 146 | if 'dtparam=uart0=on' in line and not '#' in line: 147 | self.gpioMap[7]['feature'] = 'UART0' 148 | self.gpioMap[7]['shared'] = False 149 | self.gpioMap[9]['feature'] = 'UART0' 150 | self.gpioMap[9]['shared'] = False 151 | if 'dtoverlay=uart1-pi5' in line and not '#' in line: 152 | self.gpioMap[26]['feature'] = 'UART1' 153 | self.gpioMap[26]['shared'] = False 154 | self.gpioMap[27]['feature'] = 'UART1' 155 | self.gpioMap[27]['shared'] = False 156 | if 'dtoverlay=uart2-pi5' in line and not '#' in line: 157 | self.gpioMap[6]['feature'] = 'UART2' 158 | self.gpioMap[6]['shared'] = False 159 | self.gpioMap[28]['feature'] = 'UART2' 160 | self.gpioMap[28]['shared'] = False 161 | if 'dtoverlay=uart3-pi5' in line and not '#' in line: 162 | self.gpioMap[20]['feature'] = 'UART3' 163 | self.gpioMap[20]['shared'] = False 164 | self.gpioMap[23]['feature'] = 'UART3' 165 | self.gpioMap[23]['shared'] = False 166 | if 'dtoverlay=uart4-pi5' in line and not '#' in line: 167 | self.gpioMap[32]['feature'] = 'UART4' 168 | self.gpioMap[32]['shared'] = False 169 | self.gpioMap[31]['feature'] = 'UART4' 170 | self.gpioMap[31]['shared'] = False 171 | if 'dtoverlay=gpio-poweroff' in line and not '#' in line: 172 | try: poweroff = eval(self.conf.get('GENERAL', 'poweroff')) 173 | except: poweroff = {} 174 | if 'gpio' in poweroff: 175 | gpio = poweroff['gpio'] 176 | for i in self.gpioMap: 177 | if i['BCM'] == 'GPIO '+gpio: 178 | self.used.append({'app':'Settings', 'id':'Power off', 'physical':i['physical']}) 179 | if 'dtoverlay=gpio-shutdown' in line and not '#' in line: 180 | try: shutdown = eval(self.conf.get('GENERAL', 'shutdown')) 181 | except: shutdown = {} 182 | if 'gpio' in shutdown: 183 | gpio = shutdown['gpio'] 184 | for i in self.gpioMap: 185 | if i['BCM'] == 'GPIO '+gpio: 186 | self.used.append({'app':'Settings', 'id':'Shutdown', 'physical':i['physical']}) 187 | if 'dtoverlay=w1-gpio' in line and not '#' in line: 188 | if 'gpiopin=' in line: 189 | items = line.split(',') 190 | for i in items: 191 | if 'gpiopin=' in i: 192 | items2 = i.split('=') 193 | gpio = items2[1].strip() 194 | for index, value in enumerate(self.gpioMap): 195 | if self.gpioMap[index]['BCM'] == 'GPIO '+gpio: 196 | self.gpioMap[index]['feature'] = '1W' 197 | self.gpioMap[index]['shared'] = False 198 | else: 199 | self.gpioMap[6]['feature'] = '1W' 200 | self.gpioMap[6]['shared'] = False 201 | file.close() 202 | 203 | def addUsedGpios(self): 204 | UsedGpios = [] 205 | appsList = AppsList() 206 | appsDict = appsList.appsDict 207 | for i in appsDict: 208 | name = i['module'] 209 | if name: 210 | gpio = False 211 | try: 212 | gpio = importlib.import_module(name+'.gpio') 213 | if gpio: 214 | target = gpio.Gpio(self.conf) 215 | targetGpios = target.usedGpios() 216 | if targetGpios: 217 | for i in targetGpios: 218 | UsedGpios.append(i) 219 | except Exception as e: 220 | if self.debug: print(str(e)) 221 | 222 | for i in self.used: 223 | UsedGpios.append(i) 224 | 225 | for i in UsedGpios: 226 | for ii in self.gpioMap: 227 | if i['physical'] == ii['physical']: 228 | ii['usedBy'].append({'app': i['app'], 'id': i['id']}) 229 | 230 | ################################################# 231 | 232 | class GpioMap(wx.Dialog): 233 | def __init__(self, allowed='0', edit='0', remote='0'): 234 | self.conf = Conf() 235 | self.allowed = allowed 236 | self.edit = edit 237 | self.remote = remote 238 | self.selected = False 239 | self.currentdir = os.path.dirname(os.path.abspath(__file__)) 240 | self.currentLanguage = self.conf.get('GENERAL', 'lang') 241 | self.language = Language(self.currentdir,'openplotter-settings',self.currentLanguage) 242 | 243 | if self.allowed != '0': title = _('Select GPIO') 244 | else: title = _('GPIO Map') 245 | 246 | wx.Dialog.__init__(self, None, title=title, size=(700,420)) 247 | self.SetFont(wx.Font(8, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) 248 | panel = wx.lib.scrolledpanel.ScrolledPanel(self) 249 | panel.SetupScrolling() 250 | 251 | self.pin1 = wx.CheckBox(panel, 1, style=wx.ALIGN_RIGHT) 252 | self.pin3 = wx.CheckBox(panel, 3, style=wx.ALIGN_RIGHT) 253 | self.pin5 = wx.CheckBox(panel, 5, style=wx.ALIGN_RIGHT) 254 | self.pin7 = wx.CheckBox(panel, 7, style=wx.ALIGN_RIGHT) 255 | self.pin9 = wx.CheckBox(panel, 9, style=wx.ALIGN_RIGHT) 256 | self.pin11 = wx.CheckBox(panel, 11, style=wx.ALIGN_RIGHT) 257 | self.pin13 = wx.CheckBox(panel, 13, style=wx.ALIGN_RIGHT) 258 | self.pin15 = wx.CheckBox(panel, 15, style=wx.ALIGN_RIGHT) 259 | self.pin17 = wx.CheckBox(panel, 17, style=wx.ALIGN_RIGHT) 260 | self.pin19 = wx.CheckBox(panel, 19, style=wx.ALIGN_RIGHT) 261 | self.pin21 = wx.CheckBox(panel, 21, style=wx.ALIGN_RIGHT) 262 | self.pin23 = wx.CheckBox(panel, 23, style=wx.ALIGN_RIGHT) 263 | self.pin25 = wx.CheckBox(panel, 25, style=wx.ALIGN_RIGHT) 264 | self.pin27 = wx.CheckBox(panel, 27, style=wx.ALIGN_RIGHT) 265 | self.pin29 = wx.CheckBox(panel, 29, style=wx.ALIGN_RIGHT) 266 | self.pin31 = wx.CheckBox(panel, 31, style=wx.ALIGN_RIGHT) 267 | self.pin33 = wx.CheckBox(panel, 33, style=wx.ALIGN_RIGHT) 268 | self.pin35 = wx.CheckBox(panel, 35, style=wx.ALIGN_RIGHT) 269 | self.pin37 = wx.CheckBox(panel, 37, style=wx.ALIGN_RIGHT) 270 | self.pin39 = wx.CheckBox(panel, 39, style=wx.ALIGN_RIGHT) 271 | 272 | self.pin2 = wx.CheckBox(panel, 2, style=wx.ALIGN_LEFT) 273 | self.pin4 = wx.CheckBox(panel, 4, style=wx.ALIGN_LEFT) 274 | self.pin6 = wx.CheckBox(panel, 6, style=wx.ALIGN_LEFT) 275 | self.pin8 = wx.CheckBox(panel, 8, style=wx.ALIGN_LEFT) 276 | self.pin10 = wx.CheckBox(panel, 10, style=wx.ALIGN_LEFT) 277 | self.pin12 = wx.CheckBox(panel, 12, style=wx.ALIGN_LEFT) 278 | self.pin14 = wx.CheckBox(panel, 14, style=wx.ALIGN_LEFT) 279 | self.pin16 = wx.CheckBox(panel, 16, style=wx.ALIGN_LEFT) 280 | self.pin18 = wx.CheckBox(panel, 18, style=wx.ALIGN_LEFT) 281 | self.pin20 = wx.CheckBox(panel, 20, style=wx.ALIGN_LEFT) 282 | self.pin22 = wx.CheckBox(panel, 22, style=wx.ALIGN_LEFT) 283 | self.pin24 = wx.CheckBox(panel, 24, style=wx.ALIGN_LEFT) 284 | self.pin26 = wx.CheckBox(panel, 26, style=wx.ALIGN_LEFT) 285 | self.pin28 = wx.CheckBox(panel, 28, style=wx.ALIGN_LEFT) 286 | self.pin30 = wx.CheckBox(panel, 30, style=wx.ALIGN_LEFT) 287 | self.pin32 = wx.CheckBox(panel, 32, style=wx.ALIGN_LEFT) 288 | self.pin34 = wx.CheckBox(panel, 34, style=wx.ALIGN_LEFT) 289 | self.pin36 = wx.CheckBox(panel, 36, style=wx.ALIGN_LEFT) 290 | self.pin38 = wx.CheckBox(panel, 38, style=wx.ALIGN_LEFT) 291 | self.pin40 = wx.CheckBox(panel, 40, style=wx.ALIGN_LEFT) 292 | self.Bind(wx.EVT_CHECKBOX,self.onChecked) 293 | 294 | self.logger = rt.RichTextCtrl(panel, style=wx.TE_MULTILINE|wx.TE_READONLY|wx.TE_DONTWRAP|wx.LC_SORT_ASCENDING) 295 | self.logger.SetMargins((10,10)) 296 | 297 | if self.allowed != '0': 298 | cancelBtn = wx.Button(panel, wx.ID_CANCEL) 299 | self.okBtn = wx.Button(panel, wx.ID_OK) 300 | if self.remote == '0': 301 | refresh =wx.Button(panel, label=_('Refresh')) 302 | refresh.Bind(wx.EVT_BUTTON, self.refresh) 303 | 304 | dist = self.conf.get('GENERAL', 'hostID') 305 | leftspacer0 = 6 306 | leftspacer = 4 307 | rightpacer0 = 4 308 | if dist == 'ubuntu': 309 | leftspacer0 = 6 310 | leftspacer = 5 311 | rightpacer0 = 3 312 | 313 | left = wx.BoxSizer(wx.VERTICAL) 314 | left.AddSpacer(leftspacer0) 315 | left.Add(self.pin1, 0, wx.ALIGN_RIGHT, 0) 316 | left.AddSpacer(leftspacer) 317 | left.Add(self.pin3, 0, wx.ALIGN_RIGHT, 0) 318 | left.AddSpacer(leftspacer) 319 | left.Add(self.pin5, 0, wx.ALIGN_RIGHT, 0) 320 | left.AddSpacer(leftspacer) 321 | left.Add(self.pin7, 0, wx.ALIGN_RIGHT, 0) 322 | left.AddSpacer(leftspacer) 323 | left.Add(self.pin9, 0, wx.ALIGN_RIGHT, 0) 324 | left.AddSpacer(leftspacer) 325 | left.Add(self.pin11, 0, wx.ALIGN_RIGHT, 0) 326 | left.AddSpacer(leftspacer) 327 | left.Add(self.pin13, 0, wx.ALIGN_RIGHT, 0) 328 | left.AddSpacer(leftspacer) 329 | left.Add(self.pin15, 0, wx.ALIGN_RIGHT, 0) 330 | left.AddSpacer(leftspacer) 331 | left.Add(self.pin17, 0, wx.ALIGN_RIGHT, 0) 332 | left.AddSpacer(leftspacer) 333 | left.Add(self.pin19, 0, wx.ALIGN_RIGHT, 0) 334 | left.AddSpacer(leftspacer) 335 | left.Add(self.pin21, 0, wx.ALIGN_RIGHT, 0) 336 | left.AddSpacer(leftspacer) 337 | left.Add(self.pin23, 0, wx.ALIGN_RIGHT, 0) 338 | left.AddSpacer(leftspacer) 339 | left.Add(self.pin25, 0, wx.ALIGN_RIGHT, 0) 340 | left.AddSpacer(leftspacer) 341 | left.Add(self.pin27, 0, wx.ALIGN_RIGHT, 0) 342 | left.AddSpacer(leftspacer) 343 | left.Add(self.pin29, 0, wx.ALIGN_RIGHT, 0) 344 | left.AddSpacer(leftspacer) 345 | left.Add(self.pin31, 0, wx.ALIGN_RIGHT, 0) 346 | left.AddSpacer(leftspacer) 347 | left.Add(self.pin33, 0, wx.ALIGN_RIGHT, 0) 348 | left.AddSpacer(leftspacer) 349 | left.Add(self.pin35, 0, wx.ALIGN_RIGHT, 0) 350 | left.AddSpacer(leftspacer) 351 | left.Add(self.pin37, 0, wx.ALIGN_RIGHT, 0) 352 | left.AddSpacer(leftspacer) 353 | left.Add(self.pin39, 0, wx.ALIGN_RIGHT, 0) 354 | 355 | right = wx.BoxSizer(wx.VERTICAL) 356 | right.AddSpacer(rightpacer0) 357 | right.Add(self.pin2, 0, wx.ALIGN_LEFT, 0) 358 | right.Add(self.pin4, 0, wx.ALIGN_LEFT, 0) 359 | right.Add(self.pin6, 0, wx.ALIGN_LEFT, 0) 360 | right.Add(self.pin8, 0, wx.ALIGN_LEFT, 0) 361 | right.Add(self.pin10, 0, wx.ALIGN_LEFT, 0) 362 | right.Add(self.pin12, 0, wx.ALIGN_LEFT, 0) 363 | right.Add(self.pin14, 0, wx.ALIGN_LEFT, 0) 364 | right.Add(self.pin16, 0, wx.ALIGN_LEFT, 0) 365 | right.Add(self.pin18, 0, wx.ALIGN_LEFT, 0) 366 | right.Add(self.pin20, 0, wx.ALIGN_LEFT, 0) 367 | right.Add(self.pin22, 0, wx.ALIGN_LEFT, 0) 368 | right.Add(self.pin24, 0, wx.ALIGN_LEFT, 0) 369 | right.Add(self.pin26, 0, wx.ALIGN_LEFT, 0) 370 | right.Add(self.pin28, 0, wx.ALIGN_LEFT, 0) 371 | right.Add(self.pin30, 0, wx.ALIGN_LEFT, 0) 372 | right.Add(self.pin32, 0, wx.ALIGN_LEFT, 0) 373 | right.Add(self.pin34, 0, wx.ALIGN_LEFT, 0) 374 | right.Add(self.pin36, 0, wx.ALIGN_LEFT, 0) 375 | right.Add(self.pin38, 0, wx.ALIGN_LEFT, 0) 376 | right.Add(self.pin40, 0, wx.ALIGN_LEFT, 0) 377 | 378 | right2 = wx.BoxSizer(wx.VERTICAL) 379 | right2.Add(self.logger, 1, wx.ALL | wx.EXPAND, 5) 380 | if self.remote == '0': 381 | right2.Add(refresh, 0, wx.ALL | wx.EXPAND, 5) 382 | if self.allowed != '0': 383 | right2.Add(self.okBtn, 0, wx.ALL | wx.EXPAND, 5) 384 | right2.Add(cancelBtn, 0, wx.ALL | wx.EXPAND, 5) 385 | 386 | hbox = wx.BoxSizer(wx.HORIZONTAL) 387 | hbox.Add(left, 1, wx.ALL, 0) 388 | hbox.Add(right, 1, wx.ALL, 0) 389 | hbox.Add(right2, 1, wx.ALL | wx.EXPAND, 5) 390 | 391 | panel.SetSizer(hbox) 392 | self.Centre() 393 | 394 | self.refresh() 395 | 396 | def refresh(self,e=0): 397 | self.gpio = Gpio() 398 | if self.remote == '0': self.gpio.addUsedGpios() 399 | self.gpioMap = self.gpio.gpioMap 400 | self.logger.Clear() 401 | 402 | for i in range(1,41): 403 | if i % 2 != 0: 404 | if not 'GPIO' in self.gpioMap[i-1]['feature']: 405 | label = '('+self.gpioMap[i-1]['feature']+') '+self.gpioMap[i-1]['BCM']+' - '+self.gpioMap[i-1]['physical'] 406 | else: 407 | label = self.gpioMap[i-1]['BCM']+' - '+self.gpioMap[i-1]['physical'] 408 | else: 409 | label = self.gpioMap[i-1]['physical']+' - '+self.gpioMap[i-1]['BCM'] 410 | if not 'GPIO' in self.gpioMap[i-1]['feature']: 411 | label += ' ('+self.gpioMap[i-1]['feature']+')' 412 | 413 | if i < 41: eval('self.pin'+str(i)).SetLabel(label) 414 | if i < 41: eval('self.pin'+str(i)).SetForegroundColour((55, 55, 55)) 415 | if i < 41: eval('self.pin'+str(i)).SetValue(False) 416 | 417 | if len(self.gpioMap[i-1]['usedBy']) > 0: 418 | eval('self.pin'+str(i)).SetForegroundColour((0, 130, 0)) 419 | if not self.gpioMap[i-1]['shared']: 420 | if len(self.gpioMap[i-1]['usedBy']) > 1: 421 | eval('self.pin'+str(i)).SetForegroundColour((130, 0, 0)) 422 | if self.edit != '0': 423 | try: eval('self.pin'+self.edit).SetValue(True) 424 | except: pass 425 | 426 | def onChecked(self, e): 427 | selected = e.GetEventObject() 428 | for i in range(1,41): 429 | if i < 41: eval('self.pin'+str(i)).SetValue(False) 430 | selected.SetValue(True) 431 | pin = self.gpioMap[selected.GetId()-1] 432 | self.logger.Clear() 433 | self.logger.BeginTextColour((55, 55, 55)) 434 | self.logger.BeginBold() 435 | self.logger.WriteText(_('Host')) 436 | self.logger.EndBold() 437 | if self.remote == '0': self.logger.WriteText(': localhost') 438 | else: self.logger.WriteText(': '+self.remote) 439 | self.logger.Newline() 440 | self.logger.BeginBold() 441 | self.logger.WriteText(_('Physical pin')) 442 | self.logger.EndBold() 443 | self.logger.WriteText(': '+pin['physical']) 444 | self.logger.Newline() 445 | self.logger.BeginBold() 446 | self.logger.WriteText(_('BCM name')) 447 | self.logger.EndBold() 448 | self.logger.WriteText(': '+pin['BCM']) 449 | self.logger.Newline() 450 | self.logger.BeginBold() 451 | self.logger.WriteText(_('Interface')) 452 | self.logger.EndBold() 453 | self.logger.WriteText(': '+pin['feature']) 454 | self.logger.Newline() 455 | self.logger.BeginBold() 456 | self.logger.WriteText(_('Shared')) 457 | self.logger.EndBold() 458 | if pin['shared']: 459 | self.logger.WriteText(': '+_('Yes')) 460 | else: 461 | self.logger.WriteText(': '+_('No')) 462 | self.logger.Newline() 463 | if pin['usedBy']: 464 | self.logger.BeginBold() 465 | self.logger.WriteText(_('Used by')) 466 | self.logger.EndBold() 467 | self.logger.WriteText(': ') 468 | for i in pin['usedBy']: 469 | self.logger.Newline() 470 | self.logger.WriteText(i['app']+' - '+i['id']) 471 | self.logger.Newline() 472 | self.logger.Newline() 473 | 474 | if len(pin['usedBy']) > 1: 475 | if not pin['shared']: 476 | self.logger.BeginTextColour((130, 0, 0)) 477 | self.logger.WriteText(_('There is a conflict with this GPIO.')) 478 | self.logger.EndTextColour() 479 | self.logger.Newline() 480 | 481 | if self.allowed != '0': 482 | if len(pin['usedBy']) > 0: 483 | if not pin['shared']: 484 | self.okBtn.Disable() 485 | self.selected = False 486 | self.logger.BeginTextColour((55, 55, 55)) 487 | self.logger.WriteText(_('You can not select this GPIO to do this job.')) 488 | self.logger.EndTextColour() 489 | return 490 | 491 | if pin['feature'] in self.allowed: 492 | self.selected = pin 493 | self.okBtn.Enable() 494 | else: 495 | self.okBtn.Disable() 496 | self.selected = False 497 | self.logger.BeginTextColour((55, 55, 55)) 498 | self.logger.WriteText(_('You can not select this GPIO to do this job.')) 499 | self.logger.EndTextColour() 500 | 501 | -------------------------------------------------------------------------------- /openplotterSettings/installSources.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of Openplotter. 4 | # Copyright (C) 2022 by Sailoog 5 | # 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import os, subprocess, sys 19 | from .conf import Conf 20 | from .language import Language 21 | from .platform import Platform 22 | 23 | def main(): 24 | try: 25 | conf2 = Conf() 26 | platform2 = Platform() 27 | currentdir = os.path.dirname(os.path.abspath(__file__)) 28 | currentLanguage = conf2.get('GENERAL', 'lang') 29 | Language(currentdir,'openplotter-settings',currentLanguage) 30 | beta = conf2.get('GENERAL', 'beta') 31 | 32 | codename_debian = 'bookworm' 33 | conf2.set('GENERAL', 'debianCodeName', codename_debian) 34 | codename_ubuntu = ['jammy'] 35 | conf2.set('GENERAL', 'ubuntuCodeName', str(codename_ubuntu)) 36 | 37 | codeName = '' 38 | hostID = '' 39 | RELEASE_DATA = platform2.RELEASE_DATA 40 | if 'UBUNTU_CODENAME' in RELEASE_DATA: 41 | codeName = RELEASE_DATA['UBUNTU_CODENAME'] 42 | hostID = 'ubuntu' 43 | else: 44 | codeName = RELEASE_DATA['VERSION_CODENAME'] 45 | hostID = RELEASE_DATA['ID'] 46 | if hostID != 'ubuntu' and hostID != 'debian': 47 | print(_('FAILED. Unknown system:')+' '+hostID) 48 | return 49 | if hostID == 'debian' and codeName != codename_debian: 50 | print(_('Current Debian version:')+' '+codeName) 51 | print(_('FAILED. This version of OpenPlotter only works on this version of Debian:')+' '+codename_debian) 52 | return 53 | if hostID == 'ubuntu' and codeName not in codename_ubuntu: 54 | print(_('Current Ubuntu version:')+' '+codeName) 55 | print(_('FAILED. This version of OpenPlotter only works on these versions of Ubuntu:')+' '+str(codename_ubuntu)) 56 | return 57 | conf2.set('GENERAL', 'hostID', hostID) 58 | conf2.set('GENERAL', 'codeName', codeName) 59 | 60 | sources = subprocess.check_output('apt-cache policy', shell=True).decode(sys.stdin.encoding) 61 | 62 | fileData = '' 63 | try: 64 | fo = open('/etc/apt/sources.list.d/openplotter.list', "r") 65 | fileData = fo.read() 66 | fo.close() 67 | except: pass 68 | 69 | fileDataList = fileData.splitlines() 70 | 71 | deb = 'deb https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian '+codename_debian+' main' 72 | if not 'https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian '+codename_debian in sources: 73 | if not deb in fileData: fileDataList.append(deb) 74 | print(_('Added OpenPlotter packages source')) 75 | else: 76 | print(_('OpenPlotter packages source already exists')) 77 | 78 | if beta == 'yes': 79 | deb = 'deb https://dl.cloudsmith.io/public/openplotter/openplotter-beta/deb/debian '+codename_debian+' main' 80 | if not 'https://dl.cloudsmith.io/public/openplotter/openplotter-beta/deb/debian '+codename_debian in sources: 81 | if not deb in fileData: fileDataList.append(deb) 82 | print(_('Added OpenPlotter beta packages source')) 83 | else: 84 | print(_('OpenPlotter beta packages source already exists')) 85 | 86 | deb = 'deb https://www.free-x.de/deb4op '+codename_debian+' main' 87 | if not 'https://www.free-x.de/deb4op '+codename_debian in sources: 88 | if not deb in fileData: fileDataList.append(deb) 89 | print(_('Added free-x packages source')) 90 | else: 91 | print(_('free-x packages source already exists')) 92 | 93 | removeList = [] 94 | if beta != 'yes': 95 | removeList.append('deb https://dl.cloudsmith.io/public/openplotter/openplotter-beta/deb/debian '+codename_debian+' main') 96 | 97 | finalList = [] 98 | for i in fileDataList: 99 | if i and not i in removeList: finalList.append(i) 100 | 101 | fileData = '\n'.join(finalList) 102 | if fileData: 103 | fo = open('/etc/apt/sources.list.d/openplotter.list', "w") 104 | fo.write(fileData) 105 | fo.close() 106 | 107 | os.system('cat '+currentdir+'/data/sources/oss.boating.gpg.key | gpg --dearmor > "/etc/apt/trusted.gpg.d/oss.boating.gpg"') 108 | os.system('cat '+currentdir+'/data/sources/openplotter.gpg.key | gpg --dearmor > "/etc/apt/trusted.gpg.d/openplotter.gpg"') 109 | 110 | if beta == 'yes': os.system('cat '+currentdir+'/data/sources/openplotter.beta.gpg.key | gpg --dearmor > "/etc/apt/trusted.gpg.d/openplotter.beta.gpg"') 111 | 112 | except Exception as e: print(_('FAILED: ')+str(e)) 113 | 114 | if __name__ == '__main__': 115 | main() 116 | -------------------------------------------------------------------------------- /openplotterSettings/language.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of Openplotter. 4 | # Copyright (C) 2022 by sailoog 5 | # e-sailing 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import gettext 19 | 20 | class Language: 21 | def __init__(self, currentdir, module, language): 22 | self.available = [['Català','ca'],['Čeština','cs'],['Dansk','da'],['Deutsch','de'],['ελληνικά','el'],['English','en'],['Español','es'],['Suomi','fi'],['Français','fr'],['Italiano','it'],['Dutch','nl'],['Polski','pl'],['Svenska','sv'],['Norsk','nb']] 23 | locale_folder = currentdir+'/locale' 24 | gettext.install(module, locale_folder) 25 | try: presLan = gettext.translation(module, locale_folder, languages=[language]) 26 | except: presLan = gettext.translation(module, locale_folder, languages=['en']) 27 | presLan.install() 28 | -------------------------------------------------------------------------------- /openplotterSettings/locale/ca/LC_MESSAGES/openplotter-settings.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/locale/ca/LC_MESSAGES/openplotter-settings.mo -------------------------------------------------------------------------------- /openplotterSettings/locale/cs/LC_MESSAGES/openplotter-settings.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/locale/cs/LC_MESSAGES/openplotter-settings.mo -------------------------------------------------------------------------------- /openplotterSettings/locale/da/LC_MESSAGES/openplotter-settings.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/locale/da/LC_MESSAGES/openplotter-settings.mo -------------------------------------------------------------------------------- /openplotterSettings/locale/de/LC_MESSAGES/openplotter-settings.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/locale/de/LC_MESSAGES/openplotter-settings.mo -------------------------------------------------------------------------------- /openplotterSettings/locale/el/LC_MESSAGES/openplotter-settings.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/locale/el/LC_MESSAGES/openplotter-settings.mo -------------------------------------------------------------------------------- /openplotterSettings/locale/en/LC_MESSAGES/openplotter-settings.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/locale/en/LC_MESSAGES/openplotter-settings.mo -------------------------------------------------------------------------------- /openplotterSettings/locale/en/LC_MESSAGES/openplotter-settings.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: openplotter-settings\n" 4 | "POT-Creation-Date: 2024-07-04 22:07+0200\n" 5 | "PO-Revision-Date: 2025-03-08 09:56+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: \n" 8 | "Language: en\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "X-Generator: Poedit 2.3\n" 13 | "X-Poedit-Basepath: ../../..\n" 14 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 15 | "X-Poedit-SourceCharset: UTF-8\n" 16 | "X-Poedit-SearchPath-0: .\n" 17 | 18 | #: appsList.py:45 19 | msgid "AvNav Installer" 20 | msgstr "" 21 | 22 | #: appsList.py:77 23 | msgid "MAIANA AIS transponder" 24 | msgstr "" 25 | 26 | #: appsList.py:109 27 | msgid "I2C Sensors" 28 | msgstr "" 29 | 30 | #: appsList.py:157 31 | msgid "Notifications" 32 | msgstr "" 33 | 34 | #: appsList.py:173 35 | msgid "Dashboards" 36 | msgstr "" 37 | 38 | #: appsList.py:189 39 | msgid "CAN Bus" 40 | msgstr "" 41 | 42 | #: appsList.py:205 43 | msgid "Serial" 44 | msgstr "" 45 | 46 | #: appsList.py:221 47 | msgid "OpenCPN Installer" 48 | msgstr "" 49 | 50 | #: appsList.py:237 51 | msgid "Signal K Installer" 52 | msgstr "" 53 | 54 | #: appsList.py:253 55 | msgid "Documentation" 56 | msgstr "" 57 | 58 | #: appsList.py:269 data/openplotter-settings.desktop:3 59 | #: openplotterSettings.py:42 60 | msgid "Settings" 61 | msgstr "" 62 | 63 | #: data/openplotter-brightness.desktop:3 64 | msgid "rpi-backlight" 65 | msgstr "" 66 | 67 | #: data/openplotter-brightness.desktop:5 68 | msgid "brightness-48" 69 | msgstr "" 70 | 71 | #: data/openplotter-check.desktop:3 72 | msgid "Check system" 73 | msgstr "" 74 | 75 | #: data/openplotter-check.desktop:5 76 | msgid "openplotter-check" 77 | msgstr "" 78 | 79 | #: data/openplotter-settings.desktop:5 80 | msgid "openplotter-settings" 81 | msgstr "" 82 | 83 | #: data/xygrib.desktop:4 84 | msgid "XyGrib GRIB file viewer" 85 | msgstr "" 86 | 87 | #: data/xygrib.desktop:5 88 | msgid "GRIB file viewer" 89 | msgstr "" 90 | 91 | #: data/xygrib.desktop:6 92 | msgid "Meteorological file viewer" 93 | msgstr "" 94 | 95 | #: data/xygrib.desktop:8 96 | msgid "xygrib.png" 97 | msgstr "" 98 | 99 | #: gpio.py:34 gpio.py:35 gpio.py:37 gpio.py:39 gpio.py:42 gpio.py:47 gpio.py:50 100 | #: gpio.py:53 gpio.py:58 gpio.py:63 gpio.py:67 gpio.py:72 101 | msgid "Power" 102 | msgstr "" 103 | 104 | #: gpio.py:39 gpio.py:42 gpio.py:47 gpio.py:53 gpio.py:58 gpio.py:63 gpio.py:67 105 | #: gpio.py:72 106 | msgid "Ground" 107 | msgstr "" 108 | 109 | #: gpio.py:242 110 | msgid "Select GPIO" 111 | msgstr "" 112 | 113 | #: gpio.py:243 openplotterSettings.py:435 114 | msgid "GPIO Map" 115 | msgstr "" 116 | 117 | #: gpio.py:299 openplotterSettings.py:774 selectKey.py:40 118 | msgid "Refresh" 119 | msgstr "" 120 | 121 | #: gpio.py:433 122 | msgid "Host" 123 | msgstr "" 124 | 125 | #: gpio.py:439 126 | msgid "Physical pin" 127 | msgstr "" 128 | 129 | #: gpio.py:444 130 | msgid "BCM name" 131 | msgstr "" 132 | 133 | #: gpio.py:449 134 | msgid "Interface" 135 | msgstr "" 136 | 137 | #: gpio.py:454 138 | msgid "Shared" 139 | msgstr "" 140 | 141 | #: gpio.py:457 142 | msgid "Yes" 143 | msgstr "" 144 | 145 | #: gpio.py:459 146 | msgid "No" 147 | msgstr "" 148 | 149 | #: gpio.py:463 150 | msgid "Used by" 151 | msgstr "" 152 | 153 | #: gpio.py:475 154 | msgid "There is a conflict with this GPIO." 155 | msgstr "" 156 | 157 | #: gpio.py:485 gpio.py:496 158 | msgid "You can not select this GPIO to do this job." 159 | msgstr "" 160 | 161 | #: installSources.py:47 162 | msgid "FAILED. Unknown system:" 163 | msgstr "" 164 | 165 | #: installSources.py:50 166 | msgid "Current Debian version:" 167 | msgstr "" 168 | 169 | #: installSources.py:51 170 | msgid "" 171 | "FAILED. This version of OpenPlotter only works on this version of Debian:" 172 | msgstr "" 173 | 174 | #: installSources.py:54 175 | msgid "Current Ubuntu version:" 176 | msgstr "" 177 | 178 | #: installSources.py:55 179 | msgid "" 180 | "FAILED. This version of OpenPlotter only works on these versions of Ubuntu:" 181 | msgstr "" 182 | 183 | #: installSources.py:74 184 | msgid "Added OpenPlotter packages source" 185 | msgstr "" 186 | 187 | #: installSources.py:76 188 | msgid "OpenPlotter packages source already exists" 189 | msgstr "" 190 | 191 | #: installSources.py:82 192 | msgid "Added OpenPlotter beta packages source" 193 | msgstr "" 194 | 195 | #: installSources.py:84 196 | msgid "OpenPlotter beta packages source already exists" 197 | msgstr "" 198 | 199 | #: installSources.py:89 200 | msgid "Added free-x packages source" 201 | msgstr "" 202 | 203 | #: installSources.py:91 204 | msgid "free-x packages source already exists" 205 | msgstr "" 206 | 207 | #: installSources.py:112 settingsPreUninstall.py:32 settingsPreUninstall.py:40 208 | #: settingsPreUninstall.py:49 settingsPreUninstall.py:55 209 | msgid "FAILED: " 210 | msgstr "" 211 | 212 | #: openplotterSettings.py:52 213 | msgid "Help" 214 | msgstr "" 215 | 216 | #: openplotterSettings.py:57 217 | msgid "Autostart" 218 | msgstr "" 219 | 220 | #: openplotterSettings.py:61 221 | msgid "Check System" 222 | msgstr "" 223 | 224 | #: openplotterSettings.py:64 225 | msgid "Network" 226 | msgstr "" 227 | 228 | #: openplotterSettings.py:74 229 | msgid "OpenPlotter Apps" 230 | msgstr "" 231 | 232 | #: openplotterSettings.py:75 233 | msgid "General Settings" 234 | msgstr "" 235 | 236 | #: openplotterSettings.py:76 237 | msgid "Raspberry Settings" 238 | msgstr "" 239 | 240 | #: openplotterSettings.py:136 241 | msgid "Autostart enabled" 242 | msgstr "" 243 | 244 | #: openplotterSettings.py:139 245 | msgid "Autostart disabled. Most features will not work!" 246 | msgstr "" 247 | 248 | #: openplotterSettings.py:181 249 | msgid "There are conflicts between server connections" 250 | msgstr "" 251 | 252 | #: openplotterSettings.py:182 253 | msgid "No conflicts between server connections" 254 | msgstr "" 255 | 256 | #: openplotterSettings.py:192 257 | msgid "Language" 258 | msgstr "" 259 | 260 | #: openplotterSettings.py:195 261 | msgid "Translate" 262 | msgstr "" 263 | 264 | #: openplotterSettings.py:198 265 | msgid "Touchscreen" 266 | msgstr "" 267 | 268 | #: openplotterSettings.py:200 269 | msgid "Maximize apps" 270 | msgstr "" 271 | 272 | #: openplotterSettings.py:211 273 | msgid "Keyboard layout" 274 | msgstr "" 275 | 276 | #: openplotterSettings.py:214 277 | msgid "Virtual keyboard" 278 | msgstr "" 279 | 280 | #: openplotterSettings.py:228 281 | msgid "Debugging" 282 | msgstr "" 283 | 284 | #: openplotterSettings.py:231 285 | msgid "Startup" 286 | msgstr "" 287 | 288 | #: openplotterSettings.py:233 289 | msgid "Delay (seconds)" 290 | msgstr "" 291 | 292 | #: openplotterSettings.py:238 293 | msgid "Play" 294 | msgstr "" 295 | 296 | #: openplotterSettings.py:283 297 | msgid "" 298 | "Debugging mode enabled. Additional info about errors in OpenPlotter apps " 299 | "will be saved in the system log" 300 | msgstr "" 301 | 302 | #: openplotterSettings.py:286 303 | msgid "Debugging mode disabled" 304 | msgstr "" 305 | 306 | #: openplotterSettings.py:289 307 | msgid "Choose a file" 308 | msgstr "" 309 | 310 | #: openplotterSettings.py:290 311 | msgid "Audio files" 312 | msgstr "" 313 | 314 | #: openplotterSettings.py:290 315 | msgid "All files" 316 | msgstr "" 317 | 318 | #: openplotterSettings.py:326 319 | msgid "Close and open again the window to see changes." 320 | msgstr "" 321 | 322 | #: openplotterSettings.py:326 openplotterSettings.py:877 323 | #: openplotterSettings.py:890 324 | msgid "Info" 325 | msgstr "" 326 | 327 | #: openplotterSettings.py:333 328 | msgid "Sound to play at startup set to: " 329 | msgstr "" 330 | 331 | #: openplotterSettings.py:337 332 | msgid "Removed sound to play at startup" 333 | msgstr "" 334 | 335 | #: openplotterSettings.py:344 336 | msgid "Delay at startup set to: " 337 | msgstr "" 338 | 339 | #: openplotterSettings.py:349 340 | msgid "Removed delay at startup" 341 | msgstr "" 342 | 343 | #: openplotterSettings.py:412 344 | msgid "Enabled. Changes will be applied after the next reboot" 345 | msgstr "" 346 | 347 | #: openplotterSettings.py:419 348 | msgid "Disabled. Changes will be applied after the next reboot" 349 | msgstr "" 350 | 351 | #: openplotterSettings.py:424 352 | msgid "OpenPlotter apps will open maximized" 353 | msgstr "" 354 | 355 | #: openplotterSettings.py:428 356 | msgid "Disabled maximized OpenPlotter apps" 357 | msgstr "" 358 | 359 | #: openplotterSettings.py:438 360 | msgid "Install backlight" 361 | msgstr "" 362 | 363 | #: openplotterSettings.py:440 364 | msgid "Set backlight" 365 | msgstr "" 366 | 367 | #: openplotterSettings.py:446 368 | msgid "Hotspot+Client" 369 | msgstr "" 370 | 371 | #: openplotterSettings.py:449 372 | msgid "Shutdown Management" 373 | msgstr "" 374 | 375 | #: openplotterSettings.py:452 376 | msgid "Shutdown" 377 | msgstr "" 378 | 379 | #: openplotterSettings.py:458 openplotterSettings.py:477 380 | msgid "GPIO" 381 | msgstr "" 382 | 383 | #: openplotterSettings.py:460 openplotterSettings.py:479 384 | msgid "Transition" 385 | msgstr "" 386 | 387 | #: openplotterSettings.py:460 openplotterSettings.py:479 388 | msgid "low->high" 389 | msgstr "" 390 | 391 | #: openplotterSettings.py:460 openplotterSettings.py:479 392 | msgid "high->low" 393 | msgstr "" 394 | 395 | #: openplotterSettings.py:464 396 | msgid "off" 397 | msgstr "" 398 | 399 | #: openplotterSettings.py:467 openplotterSettings.py:482 400 | msgid "Apply" 401 | msgstr "" 402 | 403 | #: openplotterSettings.py:471 404 | msgid "Power off" 405 | msgstr "" 406 | 407 | #: openplotterSettings.py:600 openplotterSettings.py:647 408 | msgid "Failed, you need to set a GPIO" 409 | msgstr "" 410 | 411 | #: openplotterSettings.py:604 openplotterSettings.py:651 412 | msgid "Failed, you need to set a transition mode" 413 | msgstr "" 414 | 415 | #: openplotterSettings.py:608 416 | msgid "Failed, you need to set a GPIO pull mode" 417 | msgstr "" 418 | 419 | #: openplotterSettings.py:621 openplotterSettings.py:661 420 | msgid "Done. Changes will be applied after the next reboot" 421 | msgstr "" 422 | 423 | #: openplotterSettings.py:665 424 | msgid "Installing rpi-backlight, please wait..." 425 | msgstr "" 426 | 427 | #: openplotterSettings.py:666 428 | msgid "rpi-backlight will be installed.\n" 429 | msgstr "" 430 | 431 | #: openplotterSettings.py:667 openplotterSettings.py:680 432 | msgid "Are you sure?" 433 | msgstr "" 434 | 435 | #: openplotterSettings.py:668 openplotterSettings.py:681 436 | #: openplotterSettings.py:700 openplotterSettings.py:713 437 | #: openplotterSettings.py:729 openplotterSettings.py:741 438 | #: openplotterSettings.py:855 openplotterSettings.py:893 439 | msgid "Question" 440 | msgstr "" 441 | 442 | #: openplotterSettings.py:672 443 | msgid "rpi-backlight installed" 444 | msgstr "" 445 | 446 | #: openplotterSettings.py:676 447 | msgid "Installation canceled" 448 | msgstr "" 449 | 450 | #: openplotterSettings.py:678 451 | msgid "Uninstalling rpi-backlight, please wait..." 452 | msgstr "" 453 | 454 | #: openplotterSettings.py:679 455 | msgid "rpi-backlight will be uninstalled.\n" 456 | msgstr "" 457 | 458 | #: openplotterSettings.py:685 459 | msgid "rpi-backlight uninstalled" 460 | msgstr "" 461 | 462 | #: openplotterSettings.py:689 463 | msgid "Uninstallation canceled" 464 | msgstr "" 465 | 466 | #: openplotterSettings.py:697 467 | msgid "" 468 | "Wayland will be enabled and X11 disabled. Some programs may not yet work " 469 | "correctly for Wayland." 470 | msgstr "" 471 | 472 | #: openplotterSettings.py:698 openplotterSettings.py:711 473 | #: openplotterSettings.py:727 openplotterSettings.py:739 474 | msgid "\n" 475 | msgstr "" 476 | 477 | #: openplotterSettings.py:699 openplotterSettings.py:712 478 | #: openplotterSettings.py:728 openplotterSettings.py:740 479 | msgid "OpenPlotter will reboot. Are you sure?" 480 | msgstr "" 481 | 482 | #: openplotterSettings.py:708 openplotterSettings.py:721 483 | #: openplotterSettings.py:736 openplotterSettings.py:748 484 | msgid "Canceled" 485 | msgstr "" 486 | 487 | #: openplotterSettings.py:710 488 | msgid "Wayland will be disabled and X11 enabled." 489 | msgstr "" 490 | 491 | #: openplotterSettings.py:726 492 | msgid "" 493 | "A dual Hotspot/Client connection will be created. Do not forget to change " 494 | "the default Hotspot password \"12345678\" if you have not already." 495 | msgstr "" 496 | 497 | #: openplotterSettings.py:738 498 | msgid "" 499 | "The dual Hotspot/Client connection will be disabled and only the Client " 500 | "connection will be able to be established." 501 | msgstr "" 502 | 503 | #: openplotterSettings.py:760 504 | msgid "Name" 505 | msgstr "" 506 | 507 | #: openplotterSettings.py:761 508 | msgid "Installed" 509 | msgstr "" 510 | 511 | #: openplotterSettings.py:762 512 | msgid "Candidate" 513 | msgstr "" 514 | 515 | #: openplotterSettings.py:763 516 | msgid "Pending tasks" 517 | msgstr "" 518 | 519 | #: openplotterSettings.py:770 520 | msgid "Add Sources" 521 | msgstr "" 522 | 523 | #: openplotterSettings.py:772 524 | msgid "Get Candidates" 525 | msgstr "" 526 | 527 | #: openplotterSettings.py:778 openplotterSettings.py:999 528 | msgid "Install" 529 | msgstr "" 530 | 531 | #: openplotterSettings.py:780 532 | msgid "Uninstall" 533 | msgstr "" 534 | 535 | #: openplotterSettings.py:783 536 | msgid "Open" 537 | msgstr "" 538 | 539 | #: openplotterSettings.py:785 540 | msgid "Change Log" 541 | msgstr "" 542 | 543 | #: openplotterSettings.py:808 openplotterSettings.py:977 544 | msgid "missing source: " 545 | msgstr "" 546 | 547 | #: openplotterSettings.py:810 openplotterSettings.py:981 548 | msgid "coming soon" 549 | msgstr "" 550 | 551 | #: openplotterSettings.py:813 openplotterSettings.py:987 552 | msgid "app only for non Raspberry machines" 553 | msgstr "" 554 | 555 | #: openplotterSettings.py:816 openplotterSettings.py:991 556 | msgid "app only for Raspberry machines" 557 | msgstr "" 558 | 559 | #: openplotterSettings.py:820 560 | msgid "Press Refresh" 561 | msgstr "" 562 | 563 | #: openplotterSettings.py:826 564 | msgid "Updating packages data, please wait... " 565 | msgstr "" 566 | 567 | #: openplotterSettings.py:839 568 | msgid "Adding packages sources, please wait... " 569 | msgstr "" 570 | 571 | #: openplotterSettings.py:847 572 | msgid "Sources updated. Get candidates to see changes" 573 | msgstr "" 574 | 575 | #: openplotterSettings.py:854 576 | msgid "Are you sure you want to install " 577 | msgstr "" 578 | 579 | #: openplotterSettings.py:854 openplotterSettings.py:892 580 | msgid " and its dependencies?" 581 | msgstr "" 582 | 583 | #: openplotterSettings.py:859 584 | msgid "Installing package, please wait... " 585 | msgstr "" 586 | 587 | #: openplotterSettings.py:869 588 | msgid "Running post-installation scripts, please wait... " 589 | msgstr "" 590 | 591 | #: openplotterSettings.py:877 592 | msgid "This app will close to apply the changes." 593 | msgstr "" 594 | 595 | #: openplotterSettings.py:880 openplotterSettings.py:914 596 | msgid "Done. Restart to apply changes" 597 | msgstr "" 598 | 599 | #: openplotterSettings.py:881 openplotterSettings.py:915 600 | msgid "Done. Press Refresh" 601 | msgstr "" 602 | 603 | #: openplotterSettings.py:890 604 | msgid "" 605 | "You have to uninstall the rest of the apps before uninstalling openplotter-" 606 | "settings." 607 | msgstr "" 608 | 609 | #: openplotterSettings.py:892 610 | msgid "Are you sure you want to uninstall " 611 | msgstr "" 612 | 613 | #: openplotterSettings.py:899 614 | msgid "Running pre-uninstall scripts, please wait... " 615 | msgstr "" 616 | 617 | #: openplotterSettings.py:906 618 | msgid "Uninstalling packages, please wait... " 619 | msgstr "" 620 | 621 | #: openplotterSettings.py:936 622 | msgid "Reading changelog, please wait... " 623 | msgstr "" 624 | 625 | #: openplotterSettings.py:943 openplotterSettings.py:1016 626 | msgid "Done" 627 | msgstr "" 628 | 629 | #: openplotterSettings.py:948 openplotterSettings.py:1011 630 | msgid "Checking apps list, please wait... " 631 | msgstr "" 632 | 633 | #: openplotterSettings.py:1005 634 | msgid "Open to apply and refresh" 635 | msgstr "" 636 | 637 | #: openplotterSettings.py:1058 638 | msgid "Select system log category" 639 | msgstr "" 640 | 641 | #: openplotterSettings.py:1087 642 | msgid "Search in system log file" 643 | msgstr "" 644 | 645 | #: ports.py:39 646 | msgid "VNC Remote Desktop" 647 | msgstr "" 648 | 649 | #: postInstall.py:31 650 | msgid "Post-installation actions" 651 | msgstr "" 652 | 653 | #: postInstall.py:46 654 | msgid "Start" 655 | msgstr "" 656 | 657 | #: postInstall.py:48 658 | msgid "Cancel" 659 | msgstr "" 660 | 661 | #: postInstall.py:50 startup.py:63 662 | msgid "Close" 663 | msgstr "" 664 | 665 | #: postInstall.py:66 666 | msgid "" 667 | "This application has been updated recently and it needs to configure your " 668 | "system to work properly. Please be patient, it could take some time." 669 | msgstr "" 670 | 671 | #: postInstall.py:69 672 | msgid "Press Start." 673 | msgstr "" 674 | 675 | #: postInstall.py:83 676 | msgid "Performing pending actions, please wait... " 677 | msgstr "" 678 | 679 | #: postInstall.py:91 680 | msgid "Done. Close this window and open the app again." 681 | msgstr "" 682 | 683 | #: selectConnections.py:46 684 | msgid "Add serial device" 685 | msgstr "" 686 | 687 | #: selectConnections.py:69 688 | msgid "Show only Openplotter-Serial managed ports" 689 | msgstr "" 690 | 691 | #: selectConnections.py:76 692 | msgid "Baud Rate: " 693 | msgstr "" 694 | 695 | #: selectKey.py:23 696 | msgid "Select Signal K key" 697 | msgstr "" 698 | 699 | #: selectKey.py:38 700 | msgid "Vessel" 701 | msgstr "" 702 | 703 | #: selectKey.py:45 704 | msgid "Groups" 705 | msgstr "" 706 | 707 | #: selectKey.py:50 708 | msgid "Keys" 709 | msgstr "" 710 | 711 | #: selectKey.py:55 712 | msgid "Properties" 713 | msgstr "" 714 | 715 | #: selectKey.py:62 716 | msgid "Replace * (allowed characters: 0-9, a-z, A-Z)" 717 | msgstr "" 718 | 719 | #: selectKey.py:64 720 | msgid "Replace" 721 | msgstr "" 722 | 723 | #: selectKey.py:67 724 | msgid "Selected key" 725 | msgstr "" 726 | 727 | #: selectKey.py:285 728 | msgid "Failed. Characters not allowed." 729 | msgstr "" 730 | 731 | #: selectKey.py:295 732 | msgid "Failed. Replace * by some text." 733 | msgstr "" 734 | 735 | #: serialPorts.py:74 736 | msgid "connection ID: " 737 | msgstr "" 738 | 739 | #: serialPorts.py:74 740 | msgid "device: " 741 | msgstr "" 742 | 743 | #: settingsPreUninstall.py:28 744 | msgid "Removing installed packages..." 745 | msgstr "" 746 | 747 | #: settingsPreUninstall.py:31 settingsPreUninstall.py:39 748 | #: settingsPreUninstall.py:48 settingsPreUninstall.py:54 749 | msgid "DONE" 750 | msgstr "" 751 | 752 | #: settingsPreUninstall.py:34 753 | msgid "Removing settings..." 754 | msgstr "" 755 | 756 | #: settingsPreUninstall.py:42 757 | msgid "Removing Hotspot service..." 758 | msgstr "" 759 | 760 | #: settingsPreUninstall.py:51 761 | msgid "Removing packages sources..." 762 | msgstr "" 763 | 764 | #: startup.py:43 765 | msgid "Starting OpenPlotter" 766 | msgstr "" 767 | 768 | #: startup.py:44 769 | msgid "Checking OpenPlotter" 770 | msgstr "" 771 | 772 | #: startup.py:54 773 | msgid "Please DO NOT CLOSE THIS WINDOW until all services have been started" 774 | msgstr "" 775 | 776 | #: startup.py:55 777 | msgid "Please wait for all services to be checked" 778 | msgstr "" 779 | 780 | #: startup.py:93 781 | msgid "There are some warnings. Check your system. Closing in " 782 | msgstr "" 783 | 784 | #: startup.py:93 startup.py:98 startup.py:178 785 | msgid " seconds" 786 | msgstr "" 787 | 788 | #: startup.py:98 789 | msgid "There are no warnings. Closing in " 790 | msgstr "" 791 | 792 | #: startup.py:157 793 | msgid "Setting remote desktop..." 794 | msgstr "" 795 | 796 | #: startup.py:160 startup.py:171 startup.py:358 797 | msgid "done" 798 | msgstr "" 799 | 800 | #: startup.py:169 801 | msgid "Applying delay of " 802 | msgstr "" 803 | 804 | #: startup.py:169 805 | msgid " seconds..." 806 | msgstr "" 807 | 808 | #: startup.py:172 startup.py:179 809 | msgid "Delay failed. Is it a number?" 810 | msgstr "" 811 | 812 | #: startup.py:176 813 | msgid "A startup delay will apply" 814 | msgstr "" 815 | 816 | #: startup.py:182 817 | msgid "Checking display server..." 818 | msgstr "" 819 | 820 | #: startup.py:189 821 | msgid "Checking virtual keyboard..." 822 | msgstr "" 823 | 824 | #: startup.py:204 825 | msgid "Checking OpenPlotter autostart..." 826 | msgstr "" 827 | 828 | #: startup.py:206 829 | msgid "" 830 | "Autostart is not enabled and most features will not work. Please select " 831 | "\"Autostart\" in \"OpenPlotter Settings\"" 832 | msgstr "" 833 | 834 | #: startup.py:208 startup.py:298 startup.py:310 startup.py:347 startup.py:365 835 | #: startup.py:373 836 | msgid "enabled" 837 | msgstr "" 838 | 839 | #: startup.py:211 840 | msgid "Checking OpenPlotter packages source..." 841 | msgstr "" 842 | 843 | #: startup.py:214 844 | msgid "added" 845 | msgstr "" 846 | 847 | #: startup.py:215 848 | msgid "" 849 | "There are missing packages sources. Please add sources in \"OpenPlotter " 850 | "Settings\"." 851 | msgstr "" 852 | 853 | #: startup.py:244 854 | msgid "Checking serial connections conflicts..." 855 | msgstr "" 856 | 857 | #: startup.py:248 858 | msgid "There are conflicts between the following serial connections:" 859 | msgstr "" 860 | 861 | #: startup.py:252 startup.py:265 startup.py:285 862 | msgid "no conflicts" 863 | msgstr "" 864 | 865 | #: startup.py:257 866 | msgid "Checking network connections conflicts..." 867 | msgstr "" 868 | 869 | #: startup.py:261 870 | msgid "There are conflicts between the following server connections:" 871 | msgstr "" 872 | 873 | #: startup.py:271 874 | msgid "Checking GPIO conflicts..." 875 | msgstr "" 876 | 877 | #: startup.py:278 878 | msgid "There are GPIO conflicts between the following apps:" 879 | msgstr "" 880 | 881 | #: startup.py:292 882 | msgid "Checking backlight..." 883 | msgstr "" 884 | 885 | #: startup.py:298 886 | msgid "Value (0-100):" 887 | msgstr "" 888 | 889 | #: startup.py:300 startup.py:311 startup.py:349 startup.py:367 startup.py:375 890 | msgid "disabled" 891 | msgstr "" 892 | 893 | #: startup.py:309 894 | msgid "Checking Power off management..." 895 | msgstr "" 896 | 897 | #: startup.py:312 898 | msgid "Checking Shutdown management..." 899 | msgstr "" 900 | 901 | #: startup.py:316 startup.py:322 902 | msgid "service running" 903 | msgstr "" 904 | 905 | #: startup.py:318 startup.py:324 906 | msgid "service not running" 907 | msgstr "" 908 | 909 | #: startup.py:328 910 | msgid "Checking rescue mode..." 911 | msgstr "" 912 | 913 | #: startup.py:353 914 | msgid "Checking WiFi password..." 915 | msgstr "" 916 | 917 | #: startup.py:356 918 | msgid "" 919 | "The WiFi connection is using a default password. This is a security risk - " 920 | "please set a new password in \"Network Manager > Advanced Options > Edit " 921 | "Connections\" " 922 | msgstr "" 923 | 924 | #: startup.py:359 925 | msgid "not found" 926 | msgstr "" 927 | 928 | #: startup.py:362 929 | msgid "Checking touchscreen optimization..." 930 | msgstr "" 931 | 932 | #: startup.py:371 933 | msgid "Checking debugging mode..." 934 | msgstr "" 935 | 936 | #: startup.py:383 937 | msgid "STARTUP FINISHED" 938 | msgstr "" 939 | 940 | #: startup.py:384 941 | msgid "CHECK SYSTEM FINISHED" 942 | msgstr "" 943 | -------------------------------------------------------------------------------- /openplotterSettings/locale/es/LC_MESSAGES/openplotter-settings.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/locale/es/LC_MESSAGES/openplotter-settings.mo -------------------------------------------------------------------------------- /openplotterSettings/locale/fi/LC_MESSAGES/openplotter-settings.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/locale/fi/LC_MESSAGES/openplotter-settings.mo -------------------------------------------------------------------------------- /openplotterSettings/locale/fr/LC_MESSAGES/openplotter-settings.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/locale/fr/LC_MESSAGES/openplotter-settings.mo -------------------------------------------------------------------------------- /openplotterSettings/locale/it/LC_MESSAGES/openplotter-settings.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/locale/it/LC_MESSAGES/openplotter-settings.mo -------------------------------------------------------------------------------- /openplotterSettings/locale/nb/LC_MESSAGES/openplotter-settings.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/locale/nb/LC_MESSAGES/openplotter-settings.mo -------------------------------------------------------------------------------- /openplotterSettings/locale/nl/LC_MESSAGES/openplotter-settings.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/locale/nl/LC_MESSAGES/openplotter-settings.mo -------------------------------------------------------------------------------- /openplotterSettings/locale/pl/LC_MESSAGES/openplotter-settings.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/locale/pl/LC_MESSAGES/openplotter-settings.mo -------------------------------------------------------------------------------- /openplotterSettings/locale/sv/LC_MESSAGES/openplotter-settings.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openplotter/openplotter-settings/bcd4ed9eaa26e35962abd4900e9d1ca6e35167b4/openplotterSettings/locale/sv/LC_MESSAGES/openplotter-settings.mo -------------------------------------------------------------------------------- /openplotterSettings/platform.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2022 by sailoog 5 | # e-sailing 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | import subprocess, ujson, csv 18 | from .conf import Conf 19 | 20 | class Platform: 21 | def __init__(self): 22 | self.isRPI = False 23 | self.skPort = False 24 | self.skDir = False 25 | self.http = 'http://' 26 | self.ws = 'ws://' 27 | self.admin = 'pkexec' 28 | self.conf = Conf() 29 | self.RELEASE_DATA = {} 30 | 31 | if self.conf.get('GENERAL', 'debug') == 'yes': self.debug = True 32 | else: self.debug = False 33 | 34 | with open("/etc/os-release") as f: 35 | reader = csv.reader(f, delimiter="=") 36 | for row in reader: 37 | if row: self.RELEASE_DATA[row[0]] = row[1] 38 | 39 | try: 40 | subprocess.check_output(['sudo', '-n', 'echo', 'x']) 41 | self.admin = 'sudo' 42 | except: self.admin = 'pkexec' 43 | 44 | try: 45 | modelfile = open('/sys/firmware/devicetree/base/model', 'r', 2000) 46 | rpimodel = modelfile.read() 47 | modelfile.close() 48 | if 'Raspberry' in rpimodel: self.isRPI = True 49 | except Exception as e: 50 | if self.debug: print('Error getting raspberry model: '+str(e)) 51 | 52 | try: 53 | service = '/etc/systemd/system/signalk.service' 54 | with open(service) as data: 55 | for line in data: 56 | if 'Environment=EXTERNALPORT=' in line: 57 | lineList = line.split('=') 58 | self.skPort = lineList[2].rstrip() 59 | if self.skPort == '3443' or self.skPort == '443': 60 | self.http = 'https://' 61 | self.ws = 'wss://' 62 | if 'WorkingDirectory=' in line: 63 | lineList = line.split('=') 64 | self.skDir = lineList[1].rstrip() 65 | except Exception as e: 66 | if self.debug: print('Error getting signal k settings: '+str(e)) 67 | 68 | def isInstalled(self,package): 69 | installed = False 70 | command = 'LC_ALL=C apt-cache policy '+package 71 | popen = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True, shell=True) 72 | for line in popen.stdout: 73 | if 'Installed:' in line: 74 | if not '(none)' in line: installed = True 75 | return installed 76 | 77 | def isSKpluginInstalled(self,plugin): 78 | installed = False 79 | data = '' 80 | file = self.skDir+'/package.json' 81 | try: 82 | with open(file) as data_file: 83 | data = ujson.load(data_file) 84 | if plugin in data['dependencies']: installed = True 85 | except: pass 86 | return installed 87 | 88 | def isSKpluginEnabled(self,plugin): 89 | Enabled = False 90 | try: 91 | setting_file = self.skDir+'/plugin-config-data/'+plugin+'.json' 92 | data = '' 93 | with open(setting_file) as data_file: 94 | data = ujson.load(data_file) 95 | Enabled = data['enabled'] 96 | except:pass 97 | return Enabled 98 | 99 | def postInstall(self,version,app): 100 | currentVersion = self.conf.get('APPS', app) 101 | if currentVersion: 102 | currentVersion = currentVersion.split('.') 103 | targetVersion = version.split('.') 104 | if int(currentVersion[0]) < int(targetVersion[0]): return False 105 | elif int(currentVersion[1]) < int(targetVersion[1]): return False 106 | elif int(currentVersion[2]) < int(targetVersion[2]): return False 107 | else: return True 108 | else: return False 109 | -------------------------------------------------------------------------------- /openplotterSettings/ports.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2022 by Sailoog > 5 | # 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import importlib, sys, subprocess, os 19 | from .conf import Conf 20 | from .appsList import AppsList 21 | from .language import Language 22 | 23 | class Ports: 24 | def __init__(self): 25 | self.conf = Conf() 26 | self.currentdir = os.path.dirname(os.path.abspath(__file__)) 27 | self.currentLanguage = self.conf.get('GENERAL', 'lang') 28 | self.language = Language(self.currentdir,'openplotter-settings',self.currentLanguage) 29 | if self.conf.get('GENERAL', 'debug') == 'yes': self.debug = True 30 | else: self.debug = False 31 | 32 | def getUsedPorts(self): 33 | usedPorts=[] 34 | try: 35 | out = subprocess.check_output('raspi-config nonint get_vnc', shell=True).decode(sys.stdin.encoding) 36 | out = out.replace("'","") 37 | out = out.strip() 38 | if out == '0': 39 | usedPorts.append({'id':'networkConn1', 'description':_('VNC Remote Desktop'), 'data':[], 'type':'TCP', 'mode':'server', 'address':'localhost', 'port':'5900', 'editable':'0'}) 40 | except: pass 41 | appsList = AppsList() 42 | appsDict = appsList.appsDict 43 | for i in appsDict: 44 | name = i['module'] 45 | if name: 46 | ports = False 47 | try: 48 | ports = importlib.import_module(name+'.ports') 49 | if ports: 50 | target = ports.Ports(self.conf,self.currentLanguage) 51 | targetPorts = target.usedPorts() 52 | if targetPorts: 53 | for i in targetPorts: 54 | usedPorts.append(i) 55 | except Exception as e: 56 | if self.debug: print(str(e)) 57 | return usedPorts 58 | 59 | def conflicts(self): 60 | usedPorts = self.getUsedPorts() 61 | conflict = [] 62 | if usedPorts: 63 | for i in usedPorts: 64 | if i['mode'] == 'server': 65 | for ii in usedPorts: 66 | if ii['id'] != i['id'] and ii['mode'] == 'server' and ii['type'] == i['type'] and ii['port'] == i['port']: 67 | iexists = False 68 | for iii in conflict: 69 | if iii['id'] == i['id']: iexists = True 70 | if not iexists: conflict.append(i) 71 | iiexists = False 72 | for iii in conflict: 73 | if iii['id'] == ii['id']: iiexists = True 74 | if not iiexists: conflict.append(ii) 75 | if conflict: return conflict -------------------------------------------------------------------------------- /openplotterSettings/postInstall.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2022 by Sailoog 5 | # 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import wx, os, subprocess, sys, time 19 | import wx.richtext as rt 20 | from .conf import Conf 21 | from .language import Language 22 | 23 | class MyFrame(wx.Frame): 24 | def __init__(self, command): 25 | self.command = command 26 | conf2 = Conf() 27 | currentdir = os.path.dirname(os.path.abspath(__file__)) 28 | currentLanguage = conf2.get('GENERAL', 'lang') 29 | Language(currentdir,'openplotter-settings',currentLanguage) 30 | 31 | wx.Frame.__init__(self, None, title=_('Post-installation actions'), size=(700,350)) 32 | self.SetFont(wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) 33 | icon = wx.Icon(currentdir+"/data/openplotter-48.png", wx.BITMAP_TYPE_PNG) 34 | self.SetIcon(icon) 35 | self.CreateStatusBar() 36 | font_statusBar = self.GetStatusBar().GetFont() 37 | font_statusBar.SetWeight(wx.BOLD) 38 | self.GetStatusBar().SetFont(font_statusBar) 39 | panel = wx.Panel(self, wx.ID_ANY) 40 | 41 | 42 | 43 | self.logger = rt.RichTextCtrl(panel, style=wx.TE_MULTILINE|wx.TE_READONLY|wx.TE_DONTWRAP|wx.LC_SORT_ASCENDING) 44 | self.logger.SetMargins((10,10)) 45 | 46 | self.okButton =wx.Button(panel, label=_('Start')) 47 | self.okButton.Bind(wx.EVT_BUTTON, self.OnOkButton) 48 | self.cancelButton =wx.Button(panel, label=_('Cancel')) 49 | self.cancelButton.Bind(wx.EVT_BUTTON, self.OnCloseButton) 50 | self.closeButton =wx.Button(panel, label=_('Close')) 51 | self.closeButton.Bind(wx.EVT_BUTTON, self.OnCloseButton) 52 | 53 | buttons = wx.BoxSizer(wx.VERTICAL) 54 | buttons.Add(self.okButton, 0, wx.ALL | wx.EXPAND, 5) 55 | buttons.Add(self.cancelButton, 0, wx.ALL | wx.EXPAND, 5) 56 | buttons.Add(self.closeButton, 0, wx.ALL | wx.EXPAND, 5) 57 | 58 | main = wx.BoxSizer(wx.HORIZONTAL) 59 | main.Add(self.logger, 1, wx.ALL | wx.EXPAND, 5) 60 | main.Add(buttons, 0, wx.ALL | wx.EXPAND, 5) 61 | 62 | panel.SetSizer(main) 63 | self.Centre() 64 | 65 | self.closeButton.Disable() 66 | self.logger.WriteText(_('This application has been updated recently and it needs to configure your system to work properly. Please be patient, it could take some time.')) 67 | self.logger.Newline() 68 | self.logger.Newline() 69 | self.logger.WriteText(_('Press Start.')) 70 | 71 | def ShowStatusBar(self, w_msg, colour): 72 | self.GetStatusBar().SetForegroundColour(colour) 73 | self.SetStatusText(w_msg) 74 | 75 | def ShowStatusBarYELLOW(self, w_msg): 76 | self.ShowStatusBar(w_msg,(255,140,0)) 77 | 78 | def ShowStatusBarGREEN(self, w_msg): 79 | self.ShowStatusBar(w_msg, (0,130,0)) 80 | 81 | def OnOkButton(self,e): 82 | self.logger.Clear() 83 | self.ShowStatusBarYELLOW(_('Performing pending actions, please wait... ')) 84 | popen = subprocess.Popen(self.command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True, shell=True) 85 | for line in popen.stdout: 86 | if not 'Warning' in line and not 'WARNING' in line: 87 | self.logger.WriteText(line) 88 | self.logger.ShowPosition(self.logger.GetLastPosition()) 89 | wx.GetApp().Yield() 90 | 91 | self.ShowStatusBarGREEN(_('Done. Close this window and open the app again.')) 92 | self.okButton.Disable() 93 | self.cancelButton.Disable() 94 | self.closeButton.Enable() 95 | 96 | def OnCloseButton(self,e): 97 | self.Destroy() 98 | 99 | def main(): 100 | app = wx.App() 101 | MyFrame(sys.argv[1]).Show() 102 | time.sleep(1) 103 | app.MainLoop() 104 | 105 | if __name__ == '__main__': 106 | main() -------------------------------------------------------------------------------- /openplotterSettings/selectConnections.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2022 by sailoog 5 | # e-sailing 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import wx, pyudev, sys, subprocess 19 | 20 | class Serial(wx.Dialog): 21 | def __init__(self): 22 | context = pyudev.Context() 23 | try: 24 | subprocess.check_output(['systemctl', 'is-active', 'bluetooth']).decode(sys.stdin.encoding) 25 | btStatus = True 26 | except: btStatus = False 27 | try: 28 | out = subprocess.check_output('raspi-config nonint get_pi_type', shell=True).decode(sys.stdin.encoding) 29 | out = out.replace("\n","") 30 | out = out.strip() 31 | except: out = '' 32 | self.devices = [] 33 | for i in context.list_devices(subsystem='tty'): 34 | DEVNAME = i.get('DEVNAME') 35 | DEVPATH = i.get('DEVPATH') 36 | if not '/virtual/' in DEVPATH or 'moitessier' in DEVNAME: 37 | if not '/devices/platform/serial' in DEVPATH: 38 | if out == '5': self.devices.append(i) 39 | else: 40 | if 'ttyAMA0' in DEVPATH and btStatus: pass 41 | else: self.devices.append(i) 42 | 43 | 44 | class AddPort(wx.Dialog): 45 | def __init__(self, deviceSent, deviceStatus, baudsSent, baudsStatus): 46 | wx.Dialog.__init__(self, None, title=_('Add serial device'), size=(-1,230)) 47 | panel = wx.Panel(self) 48 | 49 | serial = Serial() 50 | devices = serial.devices 51 | self.listDevices = [] 52 | for device in devices: 53 | self.listDevices.append(device.get('DEVNAME')) 54 | if 'DEVLINKS' in device: 55 | i = device.get('DEVLINKS').split(' ') 56 | for ii in i: 57 | if 'ttyOP' in ii: self.listDevices.append(ii) 58 | 59 | OPserial = False 60 | self.listDevicesOP = [] 61 | 62 | for device in self.listDevices: 63 | if 'ttyOP' in device: 64 | self.listDevicesOP.append(device) 65 | OPserial = True 66 | 67 | if OPserial: 68 | self.port = wx.ComboBox(panel, choices=self.listDevicesOP) 69 | self.OPserialTrue = wx.CheckBox(panel, label=_('Show only Openplotter-Serial managed ports')) 70 | self.OPserialTrue.Bind(wx.EVT_CHECKBOX, self.on_OPserialTrue) 71 | self.OPserialTrue.SetValue(True) 72 | else: 73 | self.port = wx.ComboBox(panel, choices=self.listDevices) 74 | 75 | baudsList = ['4800', '9600', '19200', '38400', '57600', '115200', '230400', '460800', '921600'] 76 | baudsLabel = wx.StaticText(panel, label=_('Baud Rate: ')) 77 | self.bauds = wx.ComboBox(panel, choices=baudsList) 78 | 79 | if deviceSent: self.port.SetValue(deviceSent) 80 | else: self.port.SetValue('') 81 | if not deviceStatus: self.port.Disable() 82 | if baudsSent: self.bauds.SetValue(baudsSent) 83 | else: self.bauds.SetValue('') 84 | if not baudsStatus: self.bauds.Disable() 85 | 86 | cancelBtn = wx.Button(panel, wx.ID_CANCEL) 87 | okBtn = wx.Button(panel, wx.ID_OK) 88 | 89 | hbox3 = wx.BoxSizer(wx.HORIZONTAL) 90 | hbox3.Add(baudsLabel, 0, wx.RIGHT | wx.LEFT | wx.EXPAND, 10) 91 | hbox3.Add(self.bauds, 1, wx.RIGHT | wx.LEFT | wx.EXPAND, 10) 92 | 93 | hbox = wx.BoxSizer(wx.HORIZONTAL) 94 | hbox.Add(cancelBtn, 1, wx.ALL | wx.EXPAND, 10) 95 | hbox.Add(okBtn, 1, wx.ALL | wx.EXPAND, 10) 96 | 97 | vbox = wx.BoxSizer(wx.VERTICAL) 98 | vbox.Add(self.port, 0, wx.ALL | wx.EXPAND, 10) 99 | if OPserial: 100 | vbox.Add(self.OPserialTrue, 0, wx.RIGHT | wx.LEFT | wx.EXPAND, 10) 101 | vbox.AddSpacer(10) 102 | vbox.Add(hbox3, 0, wx.EXPAND, 0) 103 | vbox.AddStretchSpacer(1) 104 | vbox.Add(hbox, 0, wx.EXPAND, 0) 105 | 106 | panel.SetSizer(vbox) 107 | self.Centre() 108 | 109 | def on_OPserialTrue(self,e): 110 | self.port.Clear() 111 | if self.OPserialTrue.GetValue(): 112 | self.port.AppendItems(self.listDevicesOP) 113 | else: 114 | self.port.AppendItems(self.listDevices) 115 | self.port.SetValue('') 116 | 117 | ''' 118 | class AddNetworkConnection(wx.Dialog): 119 | def __init__(self, data, dataStatus, networkType, typeStatus, host, hostStatus, port, portStatus): 120 | wx.Dialog.__init__(self, None, title=_('Add network connection'), size=(-1,230)) 121 | panel = wx.Panel(self) 122 | 123 | dataLabel = wx.StaticText(panel, label=_('Data')) 124 | self.data = wx.ComboBox(panel, choices=['NMEA0183', 'SignalK']) 125 | networkTypeLabel = wx.StaticText(panel, label=_('Type')) 126 | self.networkType = wx.ComboBox(panel, choices=['TCP', 'UDP']) 127 | hostLabel = wx.StaticText(panel, label=_('Host')) 128 | self.host = wx.TextCtrl(panel) 129 | portLabel = wx.StaticText(panel, label=_('Port')) 130 | self.port = wx.SpinCtrl(panel, 101, min=4000, max=65536, initial=50000) 131 | 132 | if data: self.data.SetValue(data) 133 | else: self.data.SetValue('') 134 | if not dataStatus: self.data.Disable() 135 | 136 | if networkType: self.networkType.SetValue(networkType) 137 | else: self.networkType.SetValue('') 138 | if not typeStatus: self.networkType.Disable() 139 | 140 | if host: self.host.SetValue(host) 141 | else: self.host.SetValue('') 142 | if not hostStatus: self.host.Disable() 143 | 144 | if port: self.port.SetValue(int(port)) 145 | if not portStatus: self.port.Disable() 146 | 147 | cancelBtn = wx.Button(panel, wx.ID_CANCEL) 148 | okBtn = wx.Button(panel, wx.ID_OK) 149 | 150 | hbox1 = wx.BoxSizer(wx.HORIZONTAL) 151 | hbox1.Add(dataLabel, 0, wx.LEFT | wx.EXPAND, 10) 152 | hbox1.Add(self.data, 1, wx.RIGHT | wx.LEFT | wx.EXPAND, 10) 153 | 154 | hbox2 = wx.BoxSizer(wx.HORIZONTAL) 155 | hbox2.Add(networkTypeLabel, 0, wx.LEFT | wx.EXPAND, 10) 156 | hbox2.Add(self.networkType, 1, wx.RIGHT | wx.LEFT | wx.EXPAND, 10) 157 | 158 | hbox3 = wx.BoxSizer(wx.HORIZONTAL) 159 | hbox3.Add(hostLabel, 0, wx.LEFT | wx.EXPAND, 10) 160 | hbox3.Add(self.host, 1, wx.RIGHT | wx.LEFT | wx.EXPAND, 10) 161 | 162 | hbox4 = wx.BoxSizer(wx.HORIZONTAL) 163 | hbox4.Add(portLabel, 0, wx.LEFT | wx.EXPAND, 10) 164 | hbox4.Add(self.port, 1, wx.RIGHT | wx.LEFT | wx.EXPAND, 10) 165 | 166 | hbox = wx.BoxSizer(wx.HORIZONTAL) 167 | hbox.Add(cancelBtn, 1, wx.ALL | wx.EXPAND, 10) 168 | hbox.Add(okBtn, 1, wx.ALL | wx.EXPAND, 10) 169 | 170 | vbox = wx.BoxSizer(wx.VERTICAL) 171 | vbox.Add(hbox1 0, wx.ALL | wx.EXPAND, 5) 172 | vbox.Add(hbox2 0, wx.ALL | wx.EXPAND, 5) 173 | vbox.Add(hbox3 0, wx.ALL | wx.EXPAND, 5) 174 | vbox.Add(hbox4 0, wx.ALL | wx.EXPAND, 5) 175 | vbox.AddStretchSpacer(1) 176 | vbox.Add(hbox, 0, wx.EXPAND, 0) 177 | 178 | panel.SetSizer(vbox) 179 | self.Centre() 180 | ''' 181 | -------------------------------------------------------------------------------- /openplotterSettings/selectKey.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2022 by sailoog 5 | # e-sailing 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import wx, ujson, re, requests 19 | from .platform import Platform 20 | 21 | class SelectKey(wx.Dialog): 22 | def __init__(self, oldkey, selectvessels): 23 | wx.Dialog.__init__(self, None, title=_('Select Signal K key'), size=(800, 444)) 24 | self.SetFont(wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) 25 | panel = wx.Panel(self) 26 | 27 | data = '' 28 | try: 29 | with open('/usr/lib/node_modules/signalk-server/node_modules/@signalk/signalk-schema/dist/keyswithmetadata.json') as data_file: 30 | data = ujson.load(data_file) 31 | except: pass 32 | 33 | platform = Platform() 34 | self.port = platform.skPort 35 | self.http = platform.http 36 | 37 | self.list_vessels = ['self'] 38 | skvesselslabel = wx.StaticText(panel, label=_('Vessel')) 39 | self.skvessels = wx.ComboBox(panel, choices=self.list_vessels) 40 | self.refreshBtn = wx.Button(panel, label=_('Refresh')) 41 | self.refreshBtn.Bind(wx.EVT_BUTTON, self.OnRefreshBtn) 42 | self.skvessels.SetSelection(0) 43 | 44 | self.list_groups = wx.ListCtrl(panel, style=wx.LC_REPORT, size=(140,-1)) 45 | self.list_groups.InsertColumn(0, _('Groups'), width=170) 46 | self.list_groups.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnSelectGroup) 47 | self.list_groups.SetTextColour(wx.BLACK) 48 | 49 | self.list_skpaths = wx.ListCtrl(panel, style=wx.LC_REPORT) 50 | self.list_skpaths.InsertColumn(0, _('Keys'), width=400) 51 | self.list_skpaths.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnSelectPath) 52 | self.list_skpaths.SetTextColour(wx.BLACK) 53 | 54 | self.list_skproperties = wx.ListCtrl(panel, style=wx.LC_REPORT, size=(130,-1)) 55 | self.list_skproperties.InsertColumn(0, _('Properties'), width=125) 56 | self.list_skproperties.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnSelectProperty) 57 | self.list_skproperties.SetTextColour(wx.BLACK) 58 | 59 | self.key_description = wx.TextCtrl(panel, -1, style=wx.TE_MULTILINE | wx.TE_READONLY, size=(-1,60)) 60 | self.key_description.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_INACTIVECAPTION)) 61 | 62 | wildcard_label = wx.StaticText(panel, label=_('Replace * (allowed characters: 0-9, a-z, A-Z)')) 63 | self.wildcard = wx.TextCtrl(panel,size=(-1, 25)) 64 | addBtn = wx.Button(panel, label=_('Replace')) 65 | addBtn.Bind(wx.EVT_BUTTON, self.OnAdd) 66 | 67 | selected_key_label = wx.StaticText(panel, label=_('Selected key')) 68 | self.SKkey = wx.TextCtrl(panel, style=wx.CB_READONLY,size=(-1, 25)) 69 | 70 | cancelBtn = wx.Button(panel, wx.ID_CANCEL) 71 | okBtn = wx.Button(panel, wx.ID_OK) 72 | okBtn.Bind(wx.EVT_BUTTON, self.OnOk) 73 | 74 | vessels = wx.BoxSizer(wx.HORIZONTAL) 75 | vessels.Add(skvesselslabel, 0, wx.TOP | wx.BOTTOM, 9) 76 | vessels.AddSpacer(5) 77 | vessels.Add(self.skvessels, 1, wx.TOP | wx.BOTTOM, 3) 78 | vessels.Add(self.refreshBtn, 0, wx.LEFT, 10) 79 | 80 | lists = wx.BoxSizer(wx.HORIZONTAL) 81 | lists.Add(self.list_groups, 1, wx.EXPAND, 0) 82 | lists.Add(self.list_skpaths, 2, wx.EXPAND, 0) 83 | lists.Add(self.list_skproperties, 0, wx.EXPAND, 0) 84 | 85 | wildcard = wx.BoxSizer(wx.HORIZONTAL) 86 | wildcard.Add(wildcard_label, 0, wx.TOP | wx.BOTTOM, 9) 87 | wildcard.AddSpacer(5) 88 | wildcard.Add(self.wildcard, 1, wx.TOP | wx.BOTTOM, 3) 89 | wildcard.Add(addBtn, 0, wx.LEFT, 10) 90 | 91 | key = wx.BoxSizer(wx.HORIZONTAL) 92 | key.Add(selected_key_label, 0, wx.TOP | wx.BOTTOM, 6) 93 | key.Add(self.SKkey, 1, wx.LEFT, 10) 94 | 95 | okcancel = wx.BoxSizer(wx.HORIZONTAL) 96 | okcancel.AddStretchSpacer(1) 97 | okcancel.Add(okBtn, 0, wx.ALL, 5) 98 | okcancel.Add(cancelBtn, 0, wx.ALL, 5) 99 | 100 | main = wx.BoxSizer(wx.VERTICAL) 101 | main.Add(vessels, 0, wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, 5) 102 | main.Add(lists, 1, wx.ALL | wx.EXPAND, 5) 103 | main.Add(self.key_description, 0, wx.LEFT | wx.RIGHT | wx.EXPAND, 5) 104 | main.Add(wildcard, 0, wx.ALL | wx.EXPAND, 5) 105 | main.Add(key, 0, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 5) 106 | main.Add(okcancel, 0, wx.ALL | wx.EXPAND, 0) 107 | 108 | panel.SetSizer(main) 109 | self.Centre() 110 | 111 | clean_data = {} 112 | for i in data: 113 | if '/vessels/*/' in i: 114 | new = i.replace('/vessels/*/','') 115 | new = new.replace('RegExp','*') 116 | new = new.replace('[A-Za-z0-9]+','*') 117 | new = new.replace('/','.') 118 | clean_data[new] = data[i] 119 | 120 | self.grouped_data = [{'name': 'ungrouped', 'description': 'Keys that do not belong to any group', 'keys':[]}] 121 | groups_tmp = [] 122 | for i in clean_data: 123 | items = i.split('.') 124 | first_key = items[0] 125 | if first_key in groups_tmp: 126 | exist = False 127 | for ii in self.grouped_data: 128 | if ii['name'] == first_key: exist = True 129 | if not exist: 130 | description = '[missing]' 131 | if 'description' in clean_data[first_key]: description = clean_data[first_key]['description'] 132 | self.grouped_data.append({'name': first_key, 'description': description, 'keys':[]}) 133 | else: groups_tmp.append(first_key) 134 | 135 | self.grouped_data = sorted(self.grouped_data, key=lambda k: k['name']) 136 | 137 | for i in clean_data: 138 | items = i.split('.') 139 | first_key = items[0] 140 | rest = items 141 | rest.pop(0) 142 | keyname = '.'.join(rest) 143 | exist = False 144 | for ii in self.grouped_data: 145 | if ii['name'] == first_key: 146 | exist = True 147 | if i != first_key: ii['keys'].append({'name':keyname, 'content':clean_data[i]}) 148 | if not exist: 149 | for ii in self.grouped_data: 150 | if ii['name'] == 'ungrouped': 151 | ii['keys'].append({'name':first_key, 'content':clean_data[i]}) 152 | for i in self.grouped_data: 153 | i['keys'] = sorted(i['keys'], key=lambda k: k['name']) 154 | 155 | self.list_groups2 = [] 156 | for i in self.grouped_data: 157 | self.list_groups.Append([i["name"]]) 158 | self.list_groups2.append(i["name"]) 159 | 160 | self.selected_group = False 161 | self.selected_path = False 162 | self.selected_property = False 163 | 164 | self.list_skpaths2 = [] 165 | 166 | if not selectvessels: 167 | self.skvessels.Disable() 168 | self.refreshBtn.Disable() 169 | else: self.OnRefreshBtn(0) 170 | 171 | if oldkey: 172 | vessel = '' 173 | if oldkey[0:5] == 'self.' or oldkey[0:12] == 'urn:mrn:imo:' or oldkey[0:16] == 'urn:mrn:signalk:': 174 | items = oldkey.split('.') 175 | vessel = items[0] 176 | del items[0] 177 | oldkey = '.'.join(items) 178 | skproperties = oldkey.split(':') 179 | skpath = skproperties[0].split('.') 180 | try: 181 | self.list_groups.Select(self.list_groups2.index(skpath[0]),1) 182 | keysindex = -1 183 | for i in self.grouped_data[self.selected_group]['keys']: 184 | self.list_skpaths.Append([i["name"]]) 185 | self.list_skpaths2.append(i["name"]) 186 | if skproperties[0][len(skpath[0])+1:] == i["name"]: 187 | keysindex = self.list_skpaths2.index(i["name"]) 188 | 189 | if keysindex == -1: 190 | newkey = '*'+skproperties[0][len(skpath[0])+len(skpath[1])+1:] 191 | for i in self.list_skpaths2: 192 | if newkey == i: 193 | keysindex = self.list_skpaths2.index(i) 194 | self.wildcard.SetValue(skpath[1]) 195 | 196 | if keysindex > -1: 197 | self.list_skpaths.Select(keysindex,1) 198 | self.list_skpaths.Focus(keysindex) 199 | self.selected_path = keysindex 200 | keysindex = -1 201 | if len(skproperties)>1: 202 | list_skproperties2 = [] 203 | for i in self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']['properties']: 204 | list_skproperties2.append(i) 205 | if skproperties[1] == i: 206 | keysindex = list_skproperties2.index(i) 207 | if keysindex > -1: 208 | self.list_skproperties.Select(keysindex,1) 209 | except:pass 210 | self.SKkey.SetValue(oldkey) 211 | if vessel: self.skvessels.SetValue(vessel) 212 | 213 | def OnRefreshBtn(self,e): 214 | self.list_vessels = ['self'] 215 | try: 216 | response = requests.get(self.http+'localhost:'+str(self.port)+'/signalk/v1/api/vessels') 217 | data = response.json() 218 | except:data = None 219 | if data: 220 | for i in data: 221 | self.list_vessels.append(i) 222 | self.skvessels.Clear() 223 | self.skvessels.AppendItems(self.list_vessels) 224 | self.skvessels.SetSelection(0) 225 | 226 | def OnSelectGroup(self,e): 227 | self.selected_group = e.GetIndex() 228 | self.selected_path = False 229 | self.selected_property = False 230 | self.list_skpaths.DeleteAllItems() 231 | self.list_skproperties.DeleteAllItems() 232 | 233 | if 'description' in self.grouped_data[self.selected_group]: 234 | self.key_description.SetValue('\n '+self.grouped_data[self.selected_group]['description']) 235 | 236 | for i in self.grouped_data[self.selected_group]['keys']: 237 | self.list_skpaths.Append([i["name"]]) 238 | 239 | self.SKkey.SetValue(self.list_groups.GetItemText(self.selected_group)) 240 | 241 | def OnSelectPath(self,e): 242 | self.selected_path = e.GetIndex() 243 | self.selected_property = False 244 | self.list_skproperties.DeleteAllItems() 245 | 246 | if 'description' in self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']: 247 | self.key_description.SetValue('\n '+self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']['description']) 248 | if 'units' in self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']: 249 | self.key_description.AppendText('\n\n '+'Units: '+self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']['units']) 250 | if 'enum' in self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']: 251 | enum = self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']['enum'] 252 | new = [m.encode('utf-8') for m in enum] 253 | self.key_description.AppendText('\n\n '+'Enum: '+str(new)) 254 | 255 | if 'properties' in self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']: 256 | for i in self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']['properties']: 257 | self.list_skproperties.Append([i]) 258 | 259 | self.SKkey.SetValue(self.list_groups.GetItemText(self.selected_group)+'.'+self.list_skpaths.GetItemText(self.selected_path)) 260 | 261 | def OnSelectProperty(self,e): 262 | self.selected_property = e.GetIndex() 263 | self.selected_text = self.list_skproperties.GetItemText(self.selected_property) 264 | 265 | if 'properties' in self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']: 266 | if 'description' in self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']['properties'][self.selected_text]: 267 | self.key_description.SetValue('\n '+self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']['properties'][self.selected_text]['description']) 268 | if 'units' in self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']['properties'][self.selected_text]: 269 | self.key_description.AppendText('\n\n '+'Units: '+self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']['properties'][self.selected_text]['units']) 270 | if 'enum' in self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']['properties'][self.selected_text]: 271 | enum = self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']['properties'][self.selected_text]['enum'] 272 | new = [m.encode('utf-8') for m in enum] 273 | self.key_description.AppendText('\n\n '+'Enum: '+str(new)) 274 | if 'items' in self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']['properties'][self.selected_text]: 275 | enum = self.grouped_data[self.selected_group]['keys'][self.selected_path]['content']['properties'][self.selected_text]['items']['enum'] 276 | new = [m.encode('utf-8') for m in enum] 277 | self.key_description.AppendText('\n\n '+'Enum: '+str(new)) 278 | 279 | self.SKkey.SetValue(self.list_groups.GetItemText(self.selected_group)+'.'+self.list_skpaths.GetItemText(self.selected_path)+':'+self.list_skproperties.GetItemText(self.selected_property)) 280 | 281 | def OnAdd(self,e): 282 | wildcard = self.wildcard.GetValue() 283 | if wildcard: 284 | if not re.match('^[0-9a-zA-Z]+$', wildcard): 285 | self.ShowMessage(_('Failed. Characters not allowed.')) 286 | return 287 | key = self.SKkey.GetValue() 288 | key = key.replace('*', wildcard, 1) 289 | self.SKkey.SetValue(key) 290 | 291 | def OnOk(self,e): 292 | self.selected_key = self.SKkey.GetValue() 293 | self.selected_vessel = self.skvessels.GetValue() 294 | if '*' in self.selected_key: 295 | self.ShowMessage(_('Failed. Replace * by some text.')) 296 | return 297 | self.EndModal(wx.OK) 298 | 299 | def ShowMessage(self, w_msg): 300 | wx.MessageBox(w_msg, 'Info', wx.OK | wx.ICON_INFORMATION) 301 | 302 | 303 | -------------------------------------------------------------------------------- /openplotterSettings/serialPorts.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2022 by Sailoog 5 | # 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import importlib 19 | from .conf import Conf 20 | from .appsList import AppsList 21 | 22 | class SerialPorts: 23 | def __init__(self): 24 | self.conf = Conf() 25 | self.currentLanguage = self.conf.get('GENERAL', 'lang') 26 | if self.conf.get('GENERAL', 'debug') == 'yes': self.debug = True 27 | else: self.debug = False 28 | 29 | def getSerialUsedPorts(self): 30 | usedPorts=[] 31 | appsList = AppsList() 32 | appsDict = appsList.appsDict 33 | for i in appsDict: 34 | name = i['module'] 35 | if name: 36 | serialPorts = False 37 | try: 38 | serialPorts = importlib.import_module(name+'.serialPorts') 39 | if serialPorts: 40 | target = serialPorts.SerialPorts(self.conf) 41 | targetPorts = target.usedSerialPorts() 42 | if targetPorts: 43 | for i in targetPorts: 44 | usedPorts.append(i) 45 | except Exception as e: 46 | if self.debug: print(str(e)) 47 | return usedPorts 48 | 49 | def conflicts(self): 50 | usedSerialPorts = self.getSerialUsedPorts() 51 | data = self.conf.get('UDEV', 'Serialinst') 52 | try:serialinst = eval(data) 53 | except:serialinst = {} 54 | conflict = [] 55 | if usedSerialPorts: 56 | c = 0 57 | for i in usedSerialPorts: 58 | alias = '' 59 | device = '' 60 | if 'ttyOP_' in i['device']: alias = i['device'] 61 | else: device = i['device'] 62 | if alias: 63 | alias2 = alias.replace('/dev/','') 64 | if alias2 in serialinst: 65 | device = '/dev/'+serialinst[alias2]['device'] 66 | if device: 67 | device2 = device.replace('/dev/','') 68 | for ii in serialinst: 69 | if serialinst[ii]['device'] == device2: alias = '/dev/'+ii 70 | c2 = 0 71 | for iii in usedSerialPorts: 72 | if alias == iii['device'] or device == iii['device']: 73 | if c != c2: 74 | result = i['app']+' -> '+_('connection ID: ')+i['id']+' | '+_('device: ')+i['device'] 75 | if not result in conflict: conflict.append(result) 76 | c2 = c2 + 1 77 | c = c + 1 78 | if conflict: return conflict 79 | else: return False 80 | -------------------------------------------------------------------------------- /openplotterSettings/service.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2022 by Sailoog 5 | # 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import sys, os, subprocess 19 | 20 | def touch(state): 21 | try: 22 | config = '/etc/environment' 23 | os.system('cp -f '+config+' '+config+'_back') 24 | file = open(config, 'r') 25 | except Exception as e: print(str(e)) 26 | exists = False 27 | out = '' 28 | while True: 29 | line = file.readline() 30 | if not line: break 31 | if state and 'GTK_OVERLAY_SCROLLING=0' in line: 32 | out += 'GTK_OVERLAY_SCROLLING=0\n' 33 | exists = True 34 | elif not state and 'GTK_OVERLAY_SCROLLING=0' in line: pass 35 | else: out += line 36 | if state and not exists: out += 'GTK_OVERLAY_SCROLLING=0\n' 37 | file.close() 38 | try: 39 | file = open(config, 'w') 40 | file.write(out) 41 | file.close() 42 | except Exception as e: 43 | os.system('cp -f '+config+'_back '+config) 44 | print(str(e)) 45 | 46 | out = subprocess.check_output('gsettings get org.gnome.desktop.interface gtk-theme', shell=True).decode(sys.stdin.encoding) 47 | out = out.replace("'","") 48 | out = out.strip() 49 | path = '/usr/share/themes/'+out 50 | if os.path.exists(path): 51 | css = path+'/gtk-3.0/gtk.css' 52 | if not os.path.exists(path+'/gtk-3.0'): os.mkdir(path+'/gtk-3.0') 53 | if not os.path.exists(css): 54 | file = open(path+'/gtk-3.0/gtk.css', 'w') 55 | file.write('') 56 | file.close() 57 | 58 | os.system('cp -f '+css+' '+css+'_back') 59 | file = open(css, 'r') 60 | exists = False 61 | out = '' 62 | while True: 63 | line = file.readline() 64 | if not line: break 65 | if '@import url("openplotter.css");' in line: 66 | exists = True 67 | if state: out += line 68 | else: pass 69 | else: out += line 70 | if state and not exists: out += '@import url("openplotter.css");\n' 71 | file.close() 72 | try: 73 | file = open(css, 'w') 74 | file.write(out) 75 | file.close() 76 | except Exception as e: 77 | os.system('cp -f '+css+'_back '+css) 78 | print('Error setting gtk css: '+str(e)) 79 | 80 | try: 81 | opcss = path+'/gtk-3.0/openplotter.css' 82 | file = open(opcss, 'w') 83 | file.write('scrollbar slider { min-width: 20px;min-height: 20px;border-radius: 22px;border: 5px solid transparent; }') 84 | file.close() 85 | except Exception as e: print('Error setting gtk css: '+str(e)) 86 | 87 | 88 | def shutdown(overlay): 89 | try: 90 | config = '/boot/firmware/config.txt' 91 | os.system('cp -f '+config+' '+config+'_back') 92 | file = open(config, 'r') 93 | except: 94 | try: 95 | config = '/boot/config.txt' 96 | os.system('cp -f '+config+' '+config+'_back') 97 | file = open(config, 'r') 98 | except Exception as e: 99 | print(str(e)) 100 | return 101 | exists = False 102 | out = '' 103 | while True: 104 | line = file.readline() 105 | if not line: break 106 | if overlay and 'dtoverlay=gpio-shutdown' in line: 107 | out += overlay+'\n' 108 | exists = True 109 | elif not overlay and 'dtoverlay=gpio-shutdown' in line: pass 110 | else: out += line 111 | if overlay and not exists: out += overlay+'\n' 112 | file.close() 113 | try: 114 | file = open(config, 'w') 115 | file.write(out) 116 | file.close() 117 | except Exception as e: 118 | os.system('cp -f '+config+'_back '+config) 119 | print(str(e)) 120 | return 121 | if overlay: 122 | fo = open('/etc/systemd/system/openplotter-shutdown.service', "w") 123 | fo.write( '[Service]\nEnvironment=OPrescue=0\nEnvironmentFile=-/boot/firmware/config.txt\nExecStart=systemd-inhibit --what=shutdown --mode=delay openplotter-shutdown $OPrescue\nUser=root\nRestart=always\nRestartSec=3\n\n[Install]\nWantedBy=local-fs.target') 124 | fo.close() 125 | subprocess.call(['systemctl', 'daemon-reload']) 126 | subprocess.call(['systemctl', 'enable', 'openplotter-shutdown.service']) 127 | else: 128 | subprocess.call(['systemctl', 'disable', 'openplotter-shutdown.service']) 129 | os.system('rm -f /etc/systemd/system/openplotter-shutdown.service') 130 | subprocess.call(['systemctl', 'daemon-reload']) 131 | 132 | def poweroff(overlay): 133 | try: 134 | config = '/boot/firmware/config.txt' 135 | os.system('cp -f '+config+' '+config+'_back') 136 | file = open(config, 'r') 137 | except: 138 | try: 139 | config = '/boot/config.txt' 140 | os.system('cp -f '+config+' '+config+'_back') 141 | file = open(config, 'r') 142 | except Exception as e: 143 | print(str(e)) 144 | return 145 | exists = False 146 | out = '' 147 | while True: 148 | line = file.readline() 149 | if not line: break 150 | if overlay and 'dtoverlay=gpio-poweroff' in line: 151 | out += overlay+'\n' 152 | exists = True 153 | elif not overlay and 'dtoverlay=gpio-poweroff' in line: pass 154 | else: out += line 155 | if overlay and not exists: out += overlay+'\n' 156 | file.close() 157 | try: 158 | file = open(config, 'w') 159 | file.write(out) 160 | file.close() 161 | except Exception as e: 162 | os.system('cp -f '+config+'_back '+config) 163 | print(str(e)) 164 | return 165 | 166 | if sys.argv[1] == 'shutdown': shutdown(sys.argv[2]) 167 | if sys.argv[1] == 'poweroff': poweroff(sys.argv[2]) 168 | if sys.argv[1] == 'touch': touch(sys.argv[2]) -------------------------------------------------------------------------------- /openplotterSettings/settingsPreUninstall.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2022 by Sailoog 5 | # 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import os, subprocess 19 | from .conf import Conf 20 | from .language import Language 21 | 22 | def main(): 23 | conf2 = Conf() 24 | currentdir = os.path.dirname(os.path.abspath(__file__)) 25 | currentLanguage = conf2.get('GENERAL', 'lang') 26 | Language(currentdir,'openplotter-settings',currentLanguage) 27 | 28 | print(_('Removing installed packages...')) 29 | try: 30 | subprocess.call(['python3', currentdir+'/backlight.py', 'uninstall']) 31 | print(_('DONE')) 32 | except Exception as e: print(_('FAILED: ')+str(e)) 33 | 34 | print(_('Removing settings...')) 35 | try: 36 | subprocess.call(['python3', currentdir+'/service.py', 'touch', '']) 37 | subprocess.call(['python3', currentdir+'/service.py', 'shutdown', '']) 38 | subprocess.call(['python3', currentdir+'/service.py', 'poweroff', '']) 39 | print(_('DONE')) 40 | except Exception as e: print(_('FAILED: ')+str(e)) 41 | 42 | print(_('Removing Hotspot service...')) 43 | try: 44 | subprocess.call(['systemctl', 'stop', 'create_ap_interface.service']) 45 | subprocess.call(['systemctl', 'disable', 'create_ap_interface.service']) 46 | subprocess.call(['rm', '-f', '/etc/systemd/system/create_ap_interface.service']) 47 | subprocess.call(['systemctl', 'daemon-reload']) 48 | print(_('DONE')) 49 | except Exception as e: print(_('FAILED: ')+str(e)) 50 | 51 | print(_('Removing packages sources...')) 52 | try: 53 | subprocess.call(['rm', '-f', '/etc/apt/sources.list.d/openplotter.list']) 54 | print(_('DONE')) 55 | except Exception as e: print(_('FAILED: ')+str(e)) 56 | 57 | if __name__ == '__main__': 58 | main() 59 | 60 | 61 | 62 | 63 | 64 | 65 | subprocess.call([self.platform.admin, 'python3', self.currentdir+'/service.py', 'touch', enabled]) -------------------------------------------------------------------------------- /openplotterSettings/shutdown.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2024 by Sailoog 5 | # 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import time, subprocess, sys 19 | 20 | def main(): 21 | if sys.argv[1] != '1': 22 | try: 23 | config = '/boot/firmware/config.txt' 24 | file = open(config, 'r') 25 | except: 26 | try: 27 | config = '/boot/config.txt' 28 | file = open(config, 'r') 29 | except Exception as e: 30 | print(str(e)) 31 | return 32 | gpio = '' 33 | while True: 34 | line = file.readline() 35 | if not line: break 36 | if 'gpio-shutdown' in line and not '#' in line: 37 | items = line.split(',') 38 | for i in items: 39 | if 'gpio_pin' in i: 40 | items2 = i.split('=') 41 | gpio = items2[1] 42 | gpio = gpio.strip() 43 | file.close() 44 | if gpio: 45 | while True: 46 | out = subprocess.check_output('pinctrl get '+gpio, shell=True).decode(sys.stdin.encoding) 47 | out = out.split('|') 48 | out = out[1].split('//') 49 | if 'lo' in out[0]: 50 | subprocess.call('pkill -15 opencpn', shell=True) 51 | time.sleep(2) 52 | subprocess.call('halt', shell=True) 53 | time.sleep(2) 54 | 55 | 56 | if __name__ == '__main__': 57 | main() -------------------------------------------------------------------------------- /openplotterSettings/startup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of Openplotter. 4 | # Copyright (C) 2022 by sailoog 5 | # e-sailing 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import wx, os, sys, time, threading, subprocess, importlib, configparser 19 | import wx.richtext as rt 20 | from .conf import Conf 21 | from .language import Language 22 | from .platform import Platform 23 | from .ports import Ports 24 | from .serialPorts import SerialPorts 25 | from .gpio import Gpio 26 | from .appsList import AppsList 27 | 28 | class MyFrame(wx.Frame): 29 | def __init__(self, mode): 30 | self.conf = Conf() 31 | self.mode = mode 32 | self.platform = Platform() 33 | self.isRPI = self.platform.isRPI 34 | self.currentLanguage = self.conf.get('GENERAL', 'lang') 35 | self.currentdir = os.path.dirname(os.path.abspath(__file__)) 36 | self.language = Language(self.currentdir,'openplotter-settings',self.currentLanguage) 37 | self.debug = self.conf.get('GENERAL', 'debug') 38 | 39 | self.ttimer = 100 40 | self.logger_data=False 41 | self.warnings_flag=False 42 | 43 | if self.mode == 'start': title = _('Starting OpenPlotter') 44 | else: title = _('Checking OpenPlotter') 45 | 46 | wx.Frame.__init__(self, None, title=title, style = wx.DEFAULT_FRAME_STYLE | wx.STAY_ON_TOP, size=(800,444)) 47 | self.SetFont(wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) 48 | icon = wx.Icon(self.currentdir+"/data/openplotter-48.png", wx.BITMAP_TYPE_PNG) 49 | self.SetIcon(icon) 50 | self.CreateStatusBar() 51 | font_statusBar = self.GetStatusBar().GetFont() 52 | font_statusBar.SetWeight(wx.BOLD) 53 | self.GetStatusBar().SetFont(font_statusBar) 54 | if self.mode == 'start': self.SetStatusText(_('Please DO NOT CLOSE THIS WINDOW until all services have been started')) 55 | else: self.SetStatusText(_('Please wait for all services to be checked')) 56 | 57 | panel = wx.Panel(self, wx.ID_ANY) 58 | 59 | self.logger = rt.RichTextCtrl(panel, style=wx.TE_MULTILINE|wx.TE_READONLY|wx.TE_DONTWRAP|wx.LC_SORT_ASCENDING) 60 | self.logger.SetMargins((10,10)) 61 | 62 | self.toolbar1 = wx.ToolBar(panel, style=wx.TB_TEXT | wx.TB_VERTICAL) 63 | toolClose = self.toolbar1.AddTool(102, _('Close'), wx.Bitmap(self.currentdir+"/data/close.png")) 64 | self.Bind(wx.EVT_TOOL, self.OnCloseButton, toolClose) 65 | self.toolbar1.EnableTool(102,False) 66 | self.toolbar1.AddSeparator() 67 | 68 | vbox = wx.BoxSizer(wx.HORIZONTAL) 69 | vbox.Add(self.logger, 1, wx.ALL | wx.EXPAND, 5) 70 | vbox.Add(self.toolbar1, 0, wx.ALL | wx.EXPAND, 0) 71 | panel.SetSizer(vbox) 72 | 73 | self.timer = wx.Timer(self) 74 | self.Bind(wx.EVT_TIMER, self.refresh, self.timer) 75 | 76 | self.thread1=threading.Thread(target=self.starting) 77 | self.thread1.daemon = True 78 | if not self.thread1.is_alive(): self.thread1.start() 79 | 80 | self.timer.Start(self.ttimer) 81 | 82 | maxi = self.conf.get('GENERAL', 'maximize') 83 | if maxi == '1': self.Maximize() 84 | 85 | self.Centre() 86 | 87 | def refresh(self,event): 88 | if self.logger_data: 89 | if isinstance(self.logger_data, int): 90 | self.toolbar1.EnableTool(102,True) 91 | if self.warnings_flag: 92 | self.GetStatusBar().SetForegroundColour(wx.RED) 93 | self.SetStatusText(_('There are some warnings. Check your system. Closing in ')+str(self.logger_data)+_(' seconds')) 94 | else: 95 | if self.mode == 'start': self.OnCloseButton() 96 | else: 97 | self.GetStatusBar().SetForegroundColour(wx.BLACK) 98 | self.SetStatusText(_('There are no warnings. Closing in ')+str(self.logger_data)+_(' seconds')) 99 | elif isinstance(self.logger_data, str): 100 | self.logger.BeginTextColour((55, 55, 55)) 101 | self.logger.WriteText(self.logger_data) 102 | self.logger.ShowPosition(self.logger.GetLastPosition()) 103 | elif isinstance(self.logger_data, dict): 104 | if self.logger_data['green']: 105 | self.logger.WriteText(' | ') 106 | self.logger.BeginTextColour((0, 130, 0)) 107 | self.logger.WriteText(self.logger_data['green']) 108 | self.logger.EndTextColour() 109 | if self.logger_data['black']: 110 | self.logger.WriteText(' | ') 111 | self.logger.BeginTextColour((55, 55, 55)) 112 | self.logger.WriteText(self.logger_data['black']) 113 | self.logger.EndTextColour() 114 | if self.logger_data['red']: 115 | self.warnings_flag = True 116 | self.logger.Newline() 117 | self.logger.BeginTextColour((130, 0, 0)) 118 | self.logger.WriteText(' ↳'+self.logger_data['red']) 119 | self.logger.EndTextColour() 120 | self.logger.Newline() 121 | self.logger.ShowPosition(self.logger.GetLastPosition()) 122 | self.logger_data = False 123 | 124 | if not self.thread1.is_alive(): self.OnCloseButton() 125 | 126 | def add_logger_data(self, msg): 127 | while self.logger_data: 128 | time.sleep(0.1) 129 | self.logger_data=msg 130 | 131 | def startApp(self, startup): 132 | start = startup.Start(self.conf,self.currentLanguage) 133 | initialMessage = start.initialMessage 134 | if initialMessage: 135 | self.add_logger_data(initialMessage) 136 | result = start.start() 137 | if result: self.add_logger_data(result) 138 | 139 | def checkApp(self, startup): 140 | check = startup.Check(self.conf,self.currentLanguage) 141 | initialMessage = check.initialMessage 142 | if initialMessage: 143 | self.add_logger_data(initialMessage) 144 | result = check.check() 145 | if result: self.add_logger_data(result) 146 | 147 | def starting(self): 148 | 149 | appsList = AppsList() 150 | appsDict = appsList.appsDict 151 | 152 | try: 153 | if self.mode == 'start': 154 | if self.isRPI: 155 | forceVNC = self.conf.get('GENERAL', 'forceVNC') 156 | if forceVNC == '1': 157 | self.add_logger_data(_('Setting remote desktop...')) 158 | subprocess.call(['sudo', 'raspi-config', 'nonint', 'do_vnc', '0']) 159 | self.conf.set('GENERAL', 'forceVNC', '0') 160 | self.add_logger_data({'green':'','black':_('done'),'red':''}) 161 | except Exception as e: 162 | self.add_logger_data({'green':'','black':'','red':str(e)}) 163 | 164 | 165 | delay = self.conf.get('GENERAL', 'delay') 166 | if self.mode == 'start': 167 | try: 168 | if delay: 169 | self.add_logger_data(_('Applying delay of ')+delay+_(' seconds...')) 170 | time.sleep(int(delay)) 171 | self.add_logger_data({'green':'','black':_('done'),'red':''}) 172 | except:self.add_logger_data({'green':'','black':'','red':_('Delay failed. Is it a number?')}) 173 | else: 174 | try: 175 | if delay: 176 | self.add_logger_data(_('A startup delay will apply')) 177 | checkDelay = int(delay) 178 | self.add_logger_data({'green':'','black':delay+_(' seconds'),'red':''}) 179 | except:self.add_logger_data({'green':'','black':'','red':_('Delay failed. Is it a number?')}) 180 | 181 | 182 | self.add_logger_data(_('Checking display server...')) 183 | try: 184 | out = subprocess.check_output('echo $XDG_SESSION_TYPE', shell=True).decode(sys.stdin.encoding) 185 | out = out.replace("\n","") 186 | out = out.strip() 187 | self.add_logger_data({'green':'','black':out,'red':''}) 188 | if not 'wayland' in out: 189 | self.add_logger_data(_('Checking virtual keyboard...')) 190 | currentKeyboard = self.conf.get('GENERAL', 'keyboard') 191 | if currentKeyboard: self.add_logger_data({'green':'','black':currentKeyboard,'red':''}) 192 | else: 193 | try: 194 | folder = self.conf.home+'/.matchbox' 195 | if not os.path.exists(folder): os.mkdir(folder) 196 | os.system('cp -f '+self.currentdir+'/data/keyboards/keyboard-EN.xml '+folder+'/keyboard.xml') 197 | self.conf.set('GENERAL', 'keyboard', 'keyboard-EN.xml') 198 | self.add_logger_data({'green':'','black':'keyboard-EN.xml','red':''}) 199 | except Exception as e: 200 | self.add_logger_data({'green':'','black':'','red':str(e)}) 201 | except Exception as e: self.add_logger_data({'green':'','black':'','red':str(e)}) 202 | 203 | 204 | self.add_logger_data(_('Checking OpenPlotter autostart...')) 205 | if not os.path.exists(self.conf.home+'/.config/autostart/openplotter-startup.desktop'): 206 | self.add_logger_data({'green':'','black':'','red':_('Autostart is not enabled and most features will not work. Please select "Autostart" in "OpenPlotter Settings"')}) 207 | else: 208 | self.add_logger_data({'green':'','black':_('enabled'),'red':''}) 209 | 210 | 211 | self.add_logger_data(_('Checking OpenPlotter packages source...')) 212 | sources = subprocess.check_output(['apt-cache', 'policy']).decode(sys.stdin.encoding) 213 | if 'https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian' in sources: 214 | self.add_logger_data({'green':'','black':_('added'),'red':''}) 215 | else: self.add_logger_data({'green':'','black':'','red':_('There are missing packages sources. Please add sources in "OpenPlotter Settings".')}) 216 | 217 | 218 | #starts apps 219 | if self.mode == 'start': 220 | for i in appsDict: 221 | name = i['module'] 222 | if name: 223 | startup = False 224 | try: 225 | startup = importlib.import_module(name+'.startup') 226 | if startup: self.startApp(startup) 227 | except Exception as e: 228 | if self.debug == 'yes': print(str(e)) 229 | 230 | 231 | #check apps 232 | for i in appsDict: 233 | name = i['module'] 234 | if name: 235 | startup = False 236 | try: 237 | startup = importlib.import_module(name+'.startup') 238 | if startup: self.checkApp(startup) 239 | except Exception as e: 240 | if self.debug == 'yes': print(str(e)) 241 | 242 | 243 | try: 244 | self.add_logger_data(_('Checking serial connections conflicts...')) 245 | allSerialPorts = SerialPorts() 246 | conflicts = allSerialPorts.conflicts() 247 | if conflicts: 248 | red = _('There are conflicts between the following serial connections:') 249 | for i in conflicts: 250 | red += '\n '+i 251 | self.add_logger_data({'green':'','black':'','red':red}) 252 | else: self.add_logger_data({'green':'','black':_('no conflicts'),'red':''}) 253 | except Exception as e: self.add_logger_data({'green':'','black':'','red':str(e)}) 254 | 255 | 256 | try: 257 | self.add_logger_data(_('Checking network connections conflicts...')) 258 | self.ports = Ports() 259 | conflicts = self.ports.conflicts() 260 | if conflicts: 261 | red = _('There are conflicts between the following server connections:') 262 | for i in conflicts: 263 | red += '\n '+i['description']+' ('+i['mode']+'): '+i['type']+' '+i['address']+':'+i['port'] 264 | self.add_logger_data({'green':'','black':'','red':red}) 265 | else: self.add_logger_data({'green':'','black':_('no conflicts'),'red':''}) 266 | except Exception as e: self.add_logger_data({'green':'','black':'','red':str(e)}) 267 | 268 | 269 | if self.isRPI: 270 | try: 271 | self.add_logger_data(_('Checking GPIO conflicts...')) 272 | gpios = Gpio() 273 | gpios.addUsedGpios() 274 | gpioMap = gpios.gpioMap 275 | red = '' 276 | for i in gpioMap: 277 | if not i['shared'] and len(i['usedBy']) > 1: 278 | if not red: red = _('There are GPIO conflicts between the following apps:') 279 | line = '' 280 | for ii in i['usedBy']: 281 | if line: line += ', ' 282 | line += ii['app']+' - '+ii['id'] 283 | red += '\n '+line 284 | if red: self.add_logger_data({'green':'','black':'','red':red}) 285 | else: self.add_logger_data({'green':'','black':_('no conflicts'),'red':''}) 286 | except Exception as e: self.add_logger_data({'green':'','black':'','red':str(e)}) 287 | 288 | backlightPath = "/sys/class/backlight" 289 | backlightDevices = os.listdir(backlightPath) 290 | if backlightDevices: 291 | backlightDevice = backlightPath+'/'+backlightDevices[0] 292 | self.add_logger_data(_('Checking backlight...')) 293 | try: 294 | if os.path.exists('/usr/share/applications/openplotter-brightness.desktop'): 295 | value = subprocess.check_output(['rpi-backlight', backlightDevice, '--get-brightness']).decode(sys.stdin.encoding) 296 | value = value.replace('\n','') 297 | value = value.strip() 298 | self.add_logger_data({'green':'','black':_('enabled')+' | '+_('Value (0-100):')+' '+value,'red':''}) 299 | else: 300 | self.add_logger_data({'green':'','black':_('disabled'),'red':''}) 301 | except Exception as e: self.add_logger_data({'green':'','black':'','red':str(e)}) 302 | 303 | 304 | try: 305 | try: config = open('/boot/firmware/config.txt', 'r') 306 | except: config = open('/boot/config.txt', 'r') 307 | data = config.read() 308 | config.close() 309 | self.add_logger_data(_('Checking Power off management...')) 310 | if 'dtoverlay=gpio-poweroff' in data and not '#dtoverlay=gpio-poweroff' in data: self.add_logger_data({'green':'','black':_('enabled'),'red':''}) 311 | else: self.add_logger_data({'green':'','black':_('disabled'),'red':''}) 312 | self.add_logger_data(_('Checking Shutdown management...')) 313 | if 'dtoverlay=gpio-shutdown' in data and not '#dtoverlay=gpio-shutdown' in data: 314 | try: 315 | subprocess.check_output(['systemctl', 'is-active', 'openplotter-shutdown.service']).decode(sys.stdin.encoding) 316 | self.add_logger_data({'green':_('service running'),'black':'','red':''}) 317 | except: 318 | self.add_logger_data({'green':'','black':'','red':_('service not running')}) 319 | else: 320 | try: 321 | subprocess.check_output(['systemctl', 'is-active', 'openplotter-shutdown.service']).decode(sys.stdin.encoding) 322 | self.add_logger_data({'green':'','black':'','red':_('service running')}) 323 | except: 324 | self.add_logger_data({'green':'','black':_('service not running'),'red':''}) 325 | except Exception as e: self.add_logger_data({'green':'','black':'','red':str(e)}) 326 | 327 | 328 | self.add_logger_data(_('Checking rescue mode...')) 329 | try: 330 | config = '/boot/firmware/config.txt' 331 | file = open(config, 'r') 332 | except: 333 | try: 334 | config = '/boot/config.txt' 335 | file = open(config, 'r') 336 | except Exception as e: self.add_logger_data({'green':'','black':'','red':str(e)}) 337 | rescue = '' 338 | while True: 339 | line = file.readline() 340 | if not line: break 341 | if 'OPrescue' in line and not '#' in line: 342 | items = line.split('=') 343 | rescue = items[1] 344 | rescue = rescue.strip() 345 | file.close() 346 | if rescue == '1': 347 | self.add_logger_data({'green':'','black':'','red':_('enabled')}) 348 | else: 349 | self.add_logger_data({'green':'','black':_('disabled'),'red':''}) 350 | 351 | 352 | try: 353 | self.add_logger_data(_('Checking WiFi password...')) 354 | out = subprocess.check_output('nmcli dev wifi show-password', shell=True).decode(sys.stdin.encoding) 355 | if 'Password: 12345678' in out: 356 | msg = _('The WiFi connection is using a default password. This is a security risk - please set a new password in "Network Manager > Advanced Options > Edit Connections" ') 357 | self.add_logger_data({'green':'','black':'','red':msg}) 358 | else: self.add_logger_data({'green':'','black':_('done'),'red':''}) 359 | except Exception as e: self.add_logger_data({'green':'','black':_('not found'),'red':''}) 360 | 361 | 362 | self.add_logger_data(_('Checking touchscreen optimization...')) 363 | try: 364 | if self.conf.get('GENERAL', 'touchscreen') == '1': 365 | self.add_logger_data({'green':'','black':_('enabled'),'red':''}) 366 | else: 367 | self.add_logger_data({'green':'','black':_('disabled'),'red':''}) 368 | except Exception as e: self.add_logger_data({'green':'','black':'','red':str(e)}) 369 | 370 | 371 | self.add_logger_data(_('Checking debugging mode...')) 372 | if self.debug == 'yes': 373 | self.add_logger_data({'green':'','black':'','red':_('enabled')}) 374 | else: 375 | self.add_logger_data({'green':'','black':_('disabled'),'red':''}) 376 | 377 | 378 | try: 379 | play = self.conf.get('GENERAL', 'play') 380 | if play: subprocess.Popen(['cvlc', '--play-and-exit', play]) 381 | except Exception as e: self.add_logger_data({'green':'','black':'','red':str(e)}) 382 | 383 | if self.mode == 'start': self.add_logger_data(_('STARTUP FINISHED')) 384 | else: self.add_logger_data(_('CHECK SYSTEM FINISHED')) 385 | 386 | 387 | c = 60 388 | while True: 389 | time.sleep(1) 390 | if c < 1: break 391 | else: self.add_logger_data(c) 392 | c = c - 1 393 | 394 | def OnCloseButton(self,e=0): 395 | self.timer.Stop() 396 | self.Destroy() 397 | 398 | def print_help(): 399 | print('This is part of OpenPlotter software') 400 | print('It starts or checks all needed server/services/background processes') 401 | print('Options are:') 402 | print(' openplotter-startup start (does only run on X display desktop)') 403 | print(' openplotter-startup check (does only run on X display desktop)') 404 | print('this:') 405 | print(' openplotter-startup -h') 406 | 407 | def main(): 408 | if len(sys.argv)>1: 409 | if sys.argv[1]=='start': 410 | app = wx.App() 411 | MyFrame('start').Show() 412 | time.sleep(1) 413 | app.MainLoop() 414 | elif sys.argv[1]=='check': 415 | app = wx.App() 416 | MyFrame('check').Show() 417 | time.sleep(1) 418 | app.MainLoop() 419 | else: print_help() 420 | else: print_help() 421 | 422 | if __name__ == '__main__': 423 | main() 424 | -------------------------------------------------------------------------------- /openplotterSettings/version.py: -------------------------------------------------------------------------------- 1 | version = '4.2.9' 2 | codeName = 'shiptogaza' 3 | state = 'stable' -------------------------------------------------------------------------------- /openplotterSettings/wayland.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2023 by Sailoog 5 | # 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import subprocess, os, sys 19 | 20 | subprocess.call(['raspi-config', 'nonint', 'do_wayland', sys.argv[1]]) 21 | 22 | if sys.argv[1] == 'W3': 23 | command = 'toggle-wvkbd' 24 | try: subprocess.call(['apt', 'install', '-y', 'wvkbd']) 25 | except: pass 26 | if sys.argv[1] == 'W1': command = 'toggle-matchbox' 27 | 28 | shortcut = '/usr/share/applications/inputmethods/matchbox-keyboard.desktop' 29 | if os.path.exists(shortcut): 30 | file = open(shortcut, 'r') 31 | file2 = '' 32 | while True: 33 | line = file.readline() 34 | if not line: break 35 | if 'Exec=' in line: file2 += 'Exec='+command+'\n' 36 | else: file2 += line 37 | file.close() 38 | file1 = open(shortcut, 'w') 39 | file1.write(file2) 40 | file1.close() -------------------------------------------------------------------------------- /openplotterSettings/xygribPostInstall.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2022 by Sailoog 5 | # 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | import os 19 | 20 | def main(): 21 | currentdir = os.path.dirname(os.path.abspath(__file__)) 22 | source = currentdir+'/data/xygrib.desktop' 23 | os.system('cp -f '+source+' /usr/share/applications') 24 | 25 | if __name__ == '__main__': 26 | main() 27 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of OpenPlotter. 4 | # Copyright (C) 2022 by sailoog 5 | # e-sailing 6 | # Openplotter is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 2 of the License, or 9 | # any later version. 10 | # Openplotter is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with Openplotter. If not, see . 17 | 18 | from setuptools import setup 19 | from openplotterSettings import version 20 | 21 | setup ( 22 | name = 'openplotterSettings', 23 | version = version.version, 24 | description = 'Main openplotter app', 25 | license = 'GPLv3', 26 | author="Sailoog", 27 | author_email='info@sailoog.com', 28 | url='https://github.com/openplotter/openplotter-settings', 29 | install_requires=['wxPython','pyudev','ujson'], 30 | packages=['openplotterSettings'], 31 | classifiers = ['Natural Language :: English', 32 | 'Operating System :: POSIX :: Linux', 33 | 'Programming Language :: Python :: 3'], 34 | include_package_data=True, 35 | entry_points={'console_scripts': ['openplotter-settings=openplotterSettings.openplotterSettings:main','openplotter-startup=openplotterSettings.startup:main','openplotterPostInstall=openplotterSettings.postInstall:main','settingsPreUninstall=openplotterSettings.settingsPreUninstall:main','settingsSourcesInstall=openplotterSettings.installSources:main','openplotter-shutdown=openplotterSettings.shutdown:main','openplotter-backlight-gui=openplotterSettings.backlightGui:main','openplotter-ap=openplotterSettings.ap:main']}, 36 | scripts=['bin/toggle-wvkbd','bin/toggle-matchbox','bin/create_ap_interface'], 37 | data_files=[('share/applications', ['openplotterSettings/data/openplotter-settings.desktop','openplotterSettings/data/openplotter-check.desktop']),('share/pixmaps', ['openplotterSettings/data/openplotter-settings.png', 'openplotterSettings/data/openplotter-48.png', 'openplotterSettings/data/openplotter-check.png', 'openplotterSettings/data/brightness-48.png']), 38 | ('share/sounds/openplotter', ['openplotterSettings/data/sounds/Bleep.mp3', 39 | 'openplotterSettings/data/sounds/House_Fire_Alarm.mp3', 40 | 'openplotterSettings/data/sounds/Ship_Bell.mp3', 41 | 'openplotterSettings/data/sounds/Store_Door_Chime.mp3', 42 | 'openplotterSettings/data/sounds/Tornado_Siren_II.mp3',]), 43 | ('share/matchbox-keyboard', ['openplotterSettings/data/keyboards/base-fragment-CAT.xml', 44 | 'openplotterSettings/data/keyboards/keyboard-CAT.xml', 45 | 'openplotterSettings/data/keyboards/base-fragment-EN.xml', 46 | 'openplotterSettings/data/keyboards/keyboard-EN.xml', 47 | 'openplotterSettings/data/keyboards/arrow2.png', 48 | 'openplotterSettings/data/keyboards/return2.png', 49 | 'openplotterSettings/data/keyboards/shift2.png', 50 | 'openplotterSettings/data/keyboards/shift_caps2.png', 51 | 'openplotterSettings/data/keyboards/keyboard-IT-normal.xml', 52 | 'openplotterSettings/data/keyboards/keyboard-IT-full.xml', 53 | 'openplotterSettings/data/keyboards/full-fragment-it_IT.xml', 54 | 'openplotterSettings/data/keyboards/normal-fragment-it_IT.xml', 55 | 'openplotterSettings/data/keyboards/key-up.png', 56 | 'openplotterSettings/data/keyboards/key-down.png', 57 | 'openplotterSettings/data/keyboards/key-right.png', 58 | 'openplotterSettings/data/keyboards/key-left.png', 59 | 'openplotterSettings/data/keyboards/control.png']) 60 | ] 61 | ) 62 | --------------------------------------------------------------------------------