mirror of
https://github.com/OSURoboticsClub/Rover_2017_2018.git
synced 2025-11-08 18:21:15 +00:00
Updated strings for status updates. Added settingssystems package and ubiquiti settings file. Allows for setting of the ubiquiti 2.4GHz channel from the GUI. Connected and working.
This commit is contained in:
@@ -0,0 +1,120 @@
|
|||||||
|
# coding=utf-8
|
||||||
|
#####################################
|
||||||
|
# Imports
|
||||||
|
#####################################
|
||||||
|
# Python native imports
|
||||||
|
from PyQt5 import QtCore, QtWidgets
|
||||||
|
import logging
|
||||||
|
from time import time
|
||||||
|
import paramiko
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Global Variables
|
||||||
|
#####################################
|
||||||
|
THREAD_HERTZ = 5
|
||||||
|
|
||||||
|
ACCESS_POINT_IP = "192.168.1.20" # The channel only has to be set on the access point. The staion will adjust.
|
||||||
|
ACCESS_POINT_USER = "ubnt"
|
||||||
|
ACCESS_POINT_PASSWORD = "rover4lyfe^" # We don't care about this password, don't freak out. Wifi is open anyways...
|
||||||
|
|
||||||
|
GET_CURRENT_CHANNEL_COMMAND = "iwlist ath0 channel"
|
||||||
|
SET_CHANNEL_COMMAND = "iwconfig ath0 channel"
|
||||||
|
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# UbiquitiRadioSettings Class Definition
|
||||||
|
#####################################
|
||||||
|
class UbiquitiRadioSettings(QtCore.QThread):
|
||||||
|
|
||||||
|
show_channel__signal = QtCore.pyqtSignal(int)
|
||||||
|
set_gui_elements_enabled__signal = QtCore.pyqtSignal(bool)
|
||||||
|
|
||||||
|
def __init__(self, shared_objects):
|
||||||
|
super(UbiquitiRadioSettings, self).__init__()
|
||||||
|
|
||||||
|
# ########## Reference to class init variables ##########
|
||||||
|
self.shared_objects = shared_objects
|
||||||
|
self.left_screen = self.shared_objects["screens"]["left_screen"]
|
||||||
|
|
||||||
|
self.ubiquiti_channel_spin_box = self.left_screen.ubiquiti_channel_spin_box # type: QtWidgets.QSpinBox
|
||||||
|
self.ubiquiti_channel_apply_button = self.left_screen.ubiquiti_channel_apply_button # type: QtWidgets.QPushButton
|
||||||
|
|
||||||
|
# ########## Get the settings instance ##########
|
||||||
|
self.settings = QtCore.QSettings()
|
||||||
|
|
||||||
|
# ########## Get the Pick And Plate instance of the logger ##########
|
||||||
|
self.logger = logging.getLogger("groundstation")
|
||||||
|
|
||||||
|
# ########## Thread Flags ##########
|
||||||
|
self.run_thread_flag = True
|
||||||
|
|
||||||
|
# ########## Class Variables ##########
|
||||||
|
self.wait_time = 1.0 / THREAD_HERTZ
|
||||||
|
|
||||||
|
self.channel_change_needed = False
|
||||||
|
self.new_channel = 0
|
||||||
|
|
||||||
|
self.ssh_client = None
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
self.set_gui_elements_enabled__signal.emit(False)
|
||||||
|
self.setup_and_connect_ssh_client()
|
||||||
|
self.get_and_show_current_channel()
|
||||||
|
|
||||||
|
while self.run_thread_flag:
|
||||||
|
start_time = time()
|
||||||
|
|
||||||
|
self.apply_channel_if_needed()
|
||||||
|
|
||||||
|
time_diff = time() - start_time
|
||||||
|
|
||||||
|
self.msleep(max(int(self.wait_time - time_diff), 0))
|
||||||
|
|
||||||
|
def setup_and_connect_ssh_client(self):
|
||||||
|
self.ssh_client = paramiko.SSHClient()
|
||||||
|
self.ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
|
self.ssh_client.connect(ACCESS_POINT_IP, username=ACCESS_POINT_USER, password=ACCESS_POINT_PASSWORD,
|
||||||
|
compress=True)
|
||||||
|
|
||||||
|
def apply_channel_if_needed(self):
|
||||||
|
if self.channel_change_needed:
|
||||||
|
self.show_channel__signal.emit(0)
|
||||||
|
self.set_gui_elements_enabled__signal.emit(False)
|
||||||
|
self.ssh_client.exec_command(SET_CHANNEL_COMMAND + " %02d" % self.new_channel)
|
||||||
|
self.get_and_show_current_channel()
|
||||||
|
self.channel_change_needed = False
|
||||||
|
|
||||||
|
def get_and_show_current_channel(self):
|
||||||
|
channel = 0
|
||||||
|
|
||||||
|
ssh_stdin, ssh_stdout, ssh_stderr = self.ssh_client.exec_command(GET_CURRENT_CHANNEL_COMMAND)
|
||||||
|
output = ssh_stdout.read()
|
||||||
|
|
||||||
|
for line in output.split("\n"):
|
||||||
|
if "Current Frequency:" in line:
|
||||||
|
channel = line.strip("()").split("Channel ")[1]
|
||||||
|
break
|
||||||
|
|
||||||
|
self.msleep(500) # From the gui, this helps show something is actually happening
|
||||||
|
|
||||||
|
self.show_channel__signal.emit(int(channel))
|
||||||
|
self.set_gui_elements_enabled__signal.emit(True)
|
||||||
|
|
||||||
|
def on_ubiquiti_channel_apply_pressed__slot(self):
|
||||||
|
self.new_channel = self.ubiquiti_channel_spin_box.value()
|
||||||
|
self.channel_change_needed = True
|
||||||
|
|
||||||
|
def connect_signals_and_slots(self):
|
||||||
|
self.ubiquiti_channel_apply_button.clicked.connect(self.on_ubiquiti_channel_apply_pressed__slot)
|
||||||
|
self.show_channel__signal.connect(self.ubiquiti_channel_spin_box.setValue)
|
||||||
|
|
||||||
|
self.set_gui_elements_enabled__signal.connect(self.ubiquiti_channel_spin_box.setEnabled)
|
||||||
|
self.set_gui_elements_enabled__signal.connect(self.ubiquiti_channel_apply_button.setEnabled)
|
||||||
|
|
||||||
|
def setup_signals(self, start_signal, signals_and_slots_signal, kill_signal):
|
||||||
|
start_signal.connect(self.start)
|
||||||
|
signals_and_slots_signal.connect(self.connect_signals_and_slots)
|
||||||
|
kill_signal.connect(self.on_kill_threads_requested__slot)
|
||||||
|
|
||||||
|
def on_kill_threads_requested__slot(self):
|
||||||
|
self.run_thread_flag = False
|
||||||
@@ -159,16 +159,16 @@ class SensorCore(QtCore.QThread):
|
|||||||
self.bogie_connection_3_stylesheet_change_ready__signal.emit("background-color: darkgreen;")
|
self.bogie_connection_3_stylesheet_change_ready__signal.emit("background-color: darkgreen;")
|
||||||
|
|
||||||
def __jetson_callback(self, data):
|
def __jetson_callback(self, data):
|
||||||
self.jetson_cpu_update_ready__signal.emit("Jetson CPU\n" + str(data.jetson_CPU) + "%")
|
self.jetson_cpu_update_ready__signal.emit("TX2 CPU\n" + str(data.jetson_CPU) + "%")
|
||||||
|
|
||||||
if data.jetson_CPU > 79:
|
if data.jetson_CPU > 85:
|
||||||
self.jetson_cpu_stylesheet_change_ready__signal.emit("background-color: orange;")
|
self.jetson_cpu_stylesheet_change_ready__signal.emit("background-color: orange;")
|
||||||
elif data.jetson_CPU > 89:
|
elif data.jetson_CPU > 95:
|
||||||
self.jetson_cpu_stylesheet_change_ready__signal.emit("background-color: darkred;")
|
self.jetson_cpu_stylesheet_change_ready__signal.emit("background-color: darkred;")
|
||||||
else:
|
else:
|
||||||
self.jetson_cpu_stylesheet_change_ready__signal.emit("background-color: darkgreen;")
|
self.jetson_cpu_stylesheet_change_ready__signal.emit("background-color: darkgreen;")
|
||||||
|
|
||||||
self.jetson_ram_update_ready__signal.emit("Jetson RAM\n" + str(data.jetson_RAM) + "%")
|
self.jetson_ram_update_ready__signal.emit("TX2 RAM\n" + str(data.jetson_RAM) + "%")
|
||||||
|
|
||||||
if data.jetson_RAM > 79:
|
if data.jetson_RAM > 79:
|
||||||
self.jetson_ram_stylesheet_change_ready__signal.emit("background-color: orange;")
|
self.jetson_ram_stylesheet_change_ready__signal.emit("background-color: orange;")
|
||||||
@@ -177,7 +177,7 @@ class SensorCore(QtCore.QThread):
|
|||||||
else:
|
else:
|
||||||
self.jetson_ram_stylesheet_change_ready__signal.emit("background-color: darkgreen;")
|
self.jetson_ram_stylesheet_change_ready__signal.emit("background-color: darkgreen;")
|
||||||
|
|
||||||
self.jetson_gpu_temp_update_ready__signal.emit("Jetson EMMC Used\n" + str(data.jetson_GPU_temp) + "%")
|
self.jetson_gpu_temp_update_ready__signal.emit("TX2 TEMP\n" + str(data.jetson_GPU_temp) + "°C")
|
||||||
|
|
||||||
if data.jetson_GPU_temp > 64:
|
if data.jetson_GPU_temp > 64:
|
||||||
self.jetson_gpu_temp_stylesheet_change_ready__signal.emit("background-color: orange;")
|
self.jetson_gpu_temp_stylesheet_change_ready__signal.emit("background-color: orange;")
|
||||||
@@ -186,7 +186,7 @@ class SensorCore(QtCore.QThread):
|
|||||||
else:
|
else:
|
||||||
self.jetson_gpu_temp_stylesheet_change_ready__signal.emit("background-color: darkgreen;")
|
self.jetson_gpu_temp_stylesheet_change_ready__signal.emit("background-color: darkgreen;")
|
||||||
|
|
||||||
self.jetson_emmc_update_ready__signal.emit("Jetson Max Temp\n" + str(data.jetson_EMMC) + "°C")
|
self.jetson_emmc_update_ready__signal.emit("TX2 EMMC\n" + str(data.jetson_EMMC) + "%")
|
||||||
|
|
||||||
if data.jetson_EMMC > 79:
|
if data.jetson_EMMC > 79:
|
||||||
self.jetson_emmc_stylesheet_change_ready__signal.emit("background-color: orange;")
|
self.jetson_emmc_stylesheet_change_ready__signal.emit("background-color: orange;")
|
||||||
|
|||||||
@@ -79,34 +79,8 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="4">
|
<item row="6" column="2">
|
||||||
<widget class="QLabel" name="emmc">
|
<widget class="QLabel" name="main_cam">
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background-color: darkred;</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string><html><head/><body><p align="center"><span style=" font-weight:600;">EMMC</span></p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="5">
|
|
||||||
<widget class="QLabel" name="gpu_temp">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background-color: darkred;</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string><html><head/><body><p align="center"><span style=" font-size:9pt; font-weight:600;">GPU Temp C</span></p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="4">
|
|
||||||
<widget class="QLabel" name="right_bogie">
|
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -132,14 +106,14 @@
|
|||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoFillBackground">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">background-color:darkred;</string>
|
<string notr="true">background-color:darkred;</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Right Bogie
|
<string>Main Nav Camera
|
||||||
Connected</string>
|
Connected</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
@@ -147,10 +121,10 @@ Connected</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="5">
|
<item row="0" column="4">
|
||||||
<widget class="QLCDNumber" name="timer"/>
|
<widget class="QLCDNumber" name="clock"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="QLabel" name="gps">
|
<widget class="QLabel" name="gps">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
@@ -192,8 +166,8 @@ Fix</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="5" column="4">
|
||||||
<widget class="QLabel" name="zed">
|
<widget class="QLabel" name="right_bogie">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -219,21 +193,22 @@ Fix</string>
|
|||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">background-color:darkred;</string>
|
<string notr="true">background-color:darkred;</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>ZED Connected</string>
|
<string>Right Bogie
|
||||||
|
Connected</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="5">
|
<item row="5" column="5">
|
||||||
<widget class="QLabel" name="rear_bogie">
|
<widget class="QLabel" name="rear_bogie">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
@@ -276,7 +251,7 @@ Connected</string>
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="2">
|
<item row="5" column="2">
|
||||||
<widget class="QLabel" name="main_cam">
|
<widget class="QLabel" name="left_bogie">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -309,7 +284,7 @@ Connected</string>
|
|||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Main Nav Camera
|
<string>Left Bogie
|
||||||
Connected</string>
|
Connected</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
@@ -317,8 +292,8 @@ Connected</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="4">
|
<item row="6" column="1">
|
||||||
<widget class="QLabel" name="nav_mouse">
|
<widget class="QLabel" name="zed">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -344,60 +319,27 @@ Connected</string>
|
|||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoFillBackground">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">background-color:darkred;</string>
|
<string notr="true">background-color:darkred;</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>3D Nav Mouse
|
<string>ZED Connected</string>
|
||||||
Connected</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2">
|
<item row="2" column="1">
|
||||||
<widget class="QLabel" name="frsky">
|
<widget class="QLabel" name="cpu">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>9999999</width>
|
|
||||||
<height>9999999</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="sizeIncrement">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">background-color:darkred;</string>
|
<string notr="true">background-color: darkred;</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>FrSky
|
<string><html><head/><body><p align="center"><span style=" font-weight:600;">TX2 CPU</span></p></body></html></string>
|
||||||
Connected</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
@@ -405,93 +347,45 @@ Connected</string>
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="5">
|
<item row="2" column="5">
|
||||||
<widget class="QLabel" name="joystick">
|
<widget class="QLabel" name="gpu_temp">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>9999999</width>
|
|
||||||
<height>9999999</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">background-color:darkred;</string>
|
<string notr="true">background-color: darkred;</string>
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Logitech Joystick
|
<string><html><head/><body><p align="center"><span style=" font-size:9pt; font-weight:600;">TX2 TEMP</span></p></body></html></string>
|
||||||
Connected</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="4">
|
<item row="2" column="2">
|
||||||
<widget class="QLCDNumber" name="clock"/>
|
<widget class="QLabel" name="ram">
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLabel" name="rover">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>9999999</width>
|
|
||||||
<height>9999999</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">background-color:darkred;</string>
|
<string notr="true">background-color: darkred;</string>
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rover
|
<string><html><head/><body><p align="center"><span style=" font-weight:600;">TX2 RAM</span></p></body></html></string>
|
||||||
Connected</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="5">
|
<item row="2" column="4">
|
||||||
|
<widget class="QLabel" name="emmc">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: darkred;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><html><head/><body><p align="center"><span style=" font-weight:600;">TX2 EMMC</span></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="5">
|
||||||
<widget class="QLabel" name="chassis_cam">
|
<widget class="QLabel" name="chassis_cam">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
@@ -536,33 +430,7 @@ Connected</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="6" column="4">
|
||||||
<widget class="QLabel" name="ram">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background-color: darkred;</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string><html><head/><body><p align="center"><span style=" font-weight:600;">RAM</span></p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLabel" name="cpu">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background-color: darkred;</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string><html><head/><body><p align="center"><span style=" font-weight:600;">CPU %</span></p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="4">
|
|
||||||
<widget class="QLabel" name="under_cam">
|
<widget class="QLabel" name="under_cam">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
@@ -607,8 +475,11 @@ Connected</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="2">
|
<item row="0" column="5">
|
||||||
<widget class="QLabel" name="left_bogie">
|
<widget class="QLCDNumber" name="timer"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLabel" name="rover">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -641,7 +512,136 @@ Connected</string>
|
|||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Left Bogie
|
<string>Rover
|
||||||
|
Connected</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QLabel" name="frsky">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>9999999</width>
|
||||||
|
<height>9999999</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sizeIncrement">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color:darkred;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>FrSky
|
||||||
|
Connected</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="4">
|
||||||
|
<widget class="QLabel" name="nav_mouse">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>9999999</width>
|
||||||
|
<height>9999999</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color:darkred;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>3D Nav Mouse
|
||||||
|
Connected</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="5">
|
||||||
|
<widget class="QLabel" name="joystick">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>9999999</width>
|
||||||
|
<height>9999999</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color:darkred;</string>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Logitech Joystick
|
||||||
Connected</string>
|
Connected</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
@@ -955,17 +955,23 @@ Connected</string>
|
|||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="spinBox">
|
<widget class="QSpinBox" name="ubiquiti_channel_spin_box">
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>11</number>
|
<number>11</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_10">
|
<widget class="QPushButton" name="ubiquiti_channel_apply_button">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Apply</string>
|
<string>Apply</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import Framework.JoystickControlSystems.JoystickControlSender as JoystickControl
|
|||||||
import Framework.NavigationSystems.SpeedAndHeadingIndication as SpeedAndHeading
|
import Framework.NavigationSystems.SpeedAndHeadingIndication as SpeedAndHeading
|
||||||
import Framework.ArmSystems.ArmIndication as ArmIndication
|
import Framework.ArmSystems.ArmIndication as ArmIndication
|
||||||
import Framework.StatusSystems.StatusCore as StatusCore
|
import Framework.StatusSystems.StatusCore as StatusCore
|
||||||
|
import Framework.SettingsSystems.UbiquitiRadioSettings as UbiquitiRadioSettings
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Global Variables
|
# Global Variables
|
||||||
@@ -105,6 +106,7 @@ class GroundStation(QtCore.QObject):
|
|||||||
self.__add_thread("Speed and Heading", SpeedAndHeading.SpeedAndHeadingIndication(self.shared_objects))
|
self.__add_thread("Speed and Heading", SpeedAndHeading.SpeedAndHeadingIndication(self.shared_objects))
|
||||||
self.__add_thread("Arm Indication", ArmIndication.ArmIndication(self.shared_objects))
|
self.__add_thread("Arm Indication", ArmIndication.ArmIndication(self.shared_objects))
|
||||||
self.__add_thread("Rover Status", StatusCore.SensorCore(self.shared_objects))
|
self.__add_thread("Rover Status", StatusCore.SensorCore(self.shared_objects))
|
||||||
|
self.__add_thread("Ubiquiti Radio Settings", UbiquitiRadioSettings.UbiquitiRadioSettings(self.shared_objects))
|
||||||
|
|
||||||
self.connect_signals_and_slots_signal.emit()
|
self.connect_signals_and_slots_signal.emit()
|
||||||
self.__connect_signals_to_slots()
|
self.__connect_signals_to_slots()
|
||||||
|
|||||||
Reference in New Issue
Block a user