mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-23 06:52:07 +08:00
pj: update thermal layout + layout test (#26224)
This commit is contained in:
@@ -1,82 +1,83 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<root>
|
||||
<tabbed_widget name="Main Window" parent="main_window">
|
||||
<Tab containers="1" tab_name="tab1">
|
||||
<Tab tab_name="tab1" containers="1">
|
||||
<Container>
|
||||
<DockSplitter count="5" sizes="0.200198;0.199703;0.200198;0.199703;0.200198" orientation="-">
|
||||
<DockSplitter orientation="-" count="5" sizes="0.199688;0.200468;0.199688;0.200468;0.199688">
|
||||
<DockArea name="...">
|
||||
<plot style="Lines" mode="TimeSeries" flip_x="false" flip_y="false">
|
||||
<range bottom="63.929997" top="96.270000" right="2052.279275" left="0.000000"/>
|
||||
<plot flip_x="false" style="Lines" flip_y="false" mode="TimeSeries">
|
||||
<range left="0.001973" right="4522.285082" bottom="59.907502" top="80.592498"/>
|
||||
<limitY/>
|
||||
<curve color="#1f77b4" name="/deviceState/cpuTempC/0"/>
|
||||
<curve color="#d62728" name="/deviceState/cpuTempC/1"/>
|
||||
<curve color="#1ac938" name="/deviceState/cpuTempC/2"/>
|
||||
<curve color="#ff7f0e" name="/deviceState/cpuTempC/3"/>
|
||||
<curve color="#f14cc1" name="/deviceState/cpuTempC/4"/>
|
||||
<curve color="#9467bd" name="/deviceState/cpuTempC/5"/>
|
||||
<curve color="#17becf" name="/deviceState/cpuTempC/6"/>
|
||||
<curve color="#bcbd22" name="/deviceState/cpuTempC/7"/>
|
||||
<curve name="/deviceState/cpuTempC/0" color="#1f77b4"/>
|
||||
<curve name="/deviceState/cpuTempC/1" color="#d62728"/>
|
||||
<curve name="/deviceState/cpuTempC/2" color="#1ac938"/>
|
||||
<curve name="/deviceState/cpuTempC/3" color="#ff7f0e"/>
|
||||
<curve name="/deviceState/cpuTempC/4" color="#f14cc1"/>
|
||||
<curve name="/deviceState/cpuTempC/5" color="#9467bd"/>
|
||||
<curve name="/deviceState/cpuTempC/6" color="#17becf"/>
|
||||
<curve name="/deviceState/cpuTempC/7" color="#bcbd22"/>
|
||||
</plot>
|
||||
</DockArea>
|
||||
<DockArea name="...">
|
||||
<plot style="Lines" mode="TimeSeries" flip_x="false" flip_y="false">
|
||||
<range bottom="55.402226" top="98.526775" right="2052.279275" left="0.000000"/>
|
||||
<plot flip_x="false" style="Lines" flip_y="false" mode="TimeSeries">
|
||||
<range left="0.001973" right="4522.285082" bottom="53.190350" top="81.063652"/>
|
||||
<limitY/>
|
||||
<curve color="#1f77b4" name="/deviceState/pmicTempC/0"/>
|
||||
<curve color="#d62728" name="/deviceState/gpuTempC/0"/>
|
||||
<curve color="#1ac938" name="/deviceState/gpuTempC/1"/>
|
||||
<curve color="#f14cc1" name="/deviceState/memoryTempC"/>
|
||||
<curve name="/deviceState/pmicTempC/0" color="#1f77b4"/>
|
||||
<curve name="/deviceState/gpuTempC/0" color="#d62728"/>
|
||||
<curve name="/deviceState/gpuTempC/1" color="#1ac938"/>
|
||||
<curve name="/deviceState/memoryTempC" color="#f14cc1"/>
|
||||
</plot>
|
||||
</DockArea>
|
||||
<DockArea name="...">
|
||||
<plot style="Lines" mode="TimeSeries" flip_x="false" flip_y="false">
|
||||
<range bottom="-0.050000" top="2.050000" right="2052.279275" left="0.000000"/>
|
||||
<plot flip_x="false" style="Lines" flip_y="false" mode="TimeSeries">
|
||||
<range left="0.001973" right="4522.285082" bottom="-0.100000" top="0.100000"/>
|
||||
<limitY/>
|
||||
<curve color="#1f77b4" name="/deviceState/thermalStatus"/>
|
||||
<curve name="/deviceState/thermalStatus" color="#1f77b4"/>
|
||||
</plot>
|
||||
</DockArea>
|
||||
<DockSplitter count="3" sizes="0.333333;0.333333;0.333333" orientation="|">
|
||||
<DockSplitter orientation="|" count="3" sizes="0.333333;0.333333;0.333333">
|
||||
<DockArea name="...">
|
||||
<plot style="Lines" mode="TimeSeries" flip_x="false" flip_y="false">
|
||||
<range bottom="5.045103" top="12.507322" right="2052.279275" left="0.000000"/>
|
||||
<plot flip_x="false" style="Lines" flip_y="false" mode="TimeSeries">
|
||||
<range left="0.001973" right="4522.285082" bottom="4.522255" top="12.156595"/>
|
||||
<limitY/>
|
||||
<curve color="#ff7f0e" name="/deviceState/powerDrawW"/>
|
||||
<curve name="/deviceState/powerDrawW" color="#ff7f0e"/>
|
||||
</plot>
|
||||
</DockArea>
|
||||
<DockArea name="...">
|
||||
<plot style="Lines" mode="TimeSeries" flip_x="false" flip_y="false">
|
||||
<range bottom="0.000000" top="100.000000" right="2052.279275" left="0.000000"/>
|
||||
<plot flip_x="false" style="Lines" flip_y="false" mode="TimeSeries">
|
||||
<range left="0.001973" right="4522.285082" bottom="0.000000" top="100.000000"/>
|
||||
<limitY min="0" max="100"/>
|
||||
<curve color="#9467bd" name="/deviceState/fanSpeedPercentDesired"/>
|
||||
<curve name="/deviceState/fanSpeedPercentDesired" color="#9467bd"/>
|
||||
<curve name="/pandaStates/0/fanPower" color="#1f77b4"/>
|
||||
</plot>
|
||||
</DockArea>
|
||||
<DockArea name="...">
|
||||
<plot style="Lines" mode="TimeSeries" flip_x="false" flip_y="false">
|
||||
<range bottom="2409.750000" top="5780.250000" right="2052.279275" left="0.000000"/>
|
||||
<plot flip_x="false" style="Lines" flip_y="false" mode="TimeSeries">
|
||||
<range left="0.001973" right="4522.285082" bottom="-118.075000" top="4841.075000"/>
|
||||
<limitY/>
|
||||
<curve color="#1f77b4" name="/peripheralState/fanSpeedRpm"/>
|
||||
<curve name="/peripheralState/fanSpeedRpm" color="#1f77b4"/>
|
||||
</plot>
|
||||
</DockArea>
|
||||
</DockSplitter>
|
||||
<DockSplitter count="2" sizes="0.502632;0.497368" orientation="|">
|
||||
<DockSplitter orientation="|" count="2" sizes="0.502445;0.497555">
|
||||
<DockArea name="...">
|
||||
<plot style="Lines" mode="TimeSeries" flip_x="false" flip_y="false">
|
||||
<range bottom="-0.350000" top="98.350000" right="2052.279275" left="0.000000"/>
|
||||
<plot flip_x="false" style="Lines" flip_y="false" mode="TimeSeries">
|
||||
<range left="0.001973" right="4522.285082" bottom="-2.300000" top="94.300000"/>
|
||||
<limitY/>
|
||||
<curve color="#1f77b4" name="/deviceState/cpuUsagePercent/0"/>
|
||||
<curve color="#d62728" name="/deviceState/cpuUsagePercent/1"/>
|
||||
<curve color="#1ac938" name="/deviceState/cpuUsagePercent/2"/>
|
||||
<curve color="#ff7f0e" name="/deviceState/cpuUsagePercent/3"/>
|
||||
<curve name="/deviceState/cpuUsagePercent/0" color="#1f77b4"/>
|
||||
<curve name="/deviceState/cpuUsagePercent/1" color="#d62728"/>
|
||||
<curve name="/deviceState/cpuUsagePercent/2" color="#1ac938"/>
|
||||
<curve name="/deviceState/cpuUsagePercent/3" color="#ff7f0e"/>
|
||||
</plot>
|
||||
</DockArea>
|
||||
<DockArea name="...">
|
||||
<plot style="Lines" mode="TimeSeries" flip_x="false" flip_y="false">
|
||||
<range bottom="-2.500000" top="102.500000" right="2052.279275" left="0.000000"/>
|
||||
<plot flip_x="false" style="Lines" flip_y="false" mode="TimeSeries">
|
||||
<range left="0.001973" right="4522.285082" bottom="-2.450000" top="100.450000"/>
|
||||
<limitY/>
|
||||
<curve color="#f14cc1" name="/deviceState/cpuUsagePercent/4"/>
|
||||
<curve color="#9467bd" name="/deviceState/cpuUsagePercent/5"/>
|
||||
<curve color="#17becf" name="/deviceState/cpuUsagePercent/6"/>
|
||||
<curve color="#bcbd22" name="/deviceState/cpuUsagePercent/7"/>
|
||||
<curve name="/deviceState/cpuUsagePercent/4" color="#f14cc1"/>
|
||||
<curve name="/deviceState/cpuUsagePercent/5" color="#9467bd"/>
|
||||
<curve name="/deviceState/cpuUsagePercent/6" color="#17becf"/>
|
||||
<curve name="/deviceState/cpuUsagePercent/7" color="#bcbd22"/>
|
||||
</plot>
|
||||
</DockArea>
|
||||
</DockSplitter>
|
||||
@@ -92,8 +93,8 @@
|
||||
<plugin ID="DataLoad Rlog"/>
|
||||
<plugin ID="Cereal Subscriber"/>
|
||||
</Plugins>
|
||||
<!-- - - - - - - - - - - - - - - -->
|
||||
<!-- - - - - - - - - - - - - - - -->
|
||||
<customMathEquations/>
|
||||
<snippets/>
|
||||
<!-- - - - - - - - - - - - - - - -->
|
||||
</root>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import glob
|
||||
import signal
|
||||
import subprocess
|
||||
import time
|
||||
@@ -9,12 +10,14 @@ from common.basedir import BASEDIR
|
||||
from common.timeout import Timeout
|
||||
from tools.plotjuggler.juggle import install
|
||||
|
||||
PJ_DIR = os.path.join(BASEDIR, "tools/plotjuggler")
|
||||
|
||||
class TestPlotJuggler(unittest.TestCase):
|
||||
|
||||
def test_demo(self):
|
||||
install()
|
||||
|
||||
pj = os.path.join(BASEDIR, "tools/plotjuggler/juggle.py")
|
||||
pj = os.path.join(PJ_DIR, "juggle.py")
|
||||
p = subprocess.Popen(f'QT_QPA_PLATFORM=offscreen {pj} --demo None 1 --qlog',
|
||||
stderr=subprocess.PIPE, shell=True, start_new_session=True)
|
||||
|
||||
@@ -29,5 +32,22 @@ class TestPlotJuggler(unittest.TestCase):
|
||||
self.assertEqual(p.poll(), None)
|
||||
os.killpg(os.getpgid(p.pid), signal.SIGTERM)
|
||||
|
||||
# TODO: also test that layouts successfully load
|
||||
def test_layouts(self):
|
||||
bad_strings = (
|
||||
# if a previously loaded file is defined,
|
||||
# PJ will throw a warning when loading the layout
|
||||
"fileInfo",
|
||||
"previouslyLoaded_Datafiles",
|
||||
)
|
||||
for fn in glob.glob(os.path.join(PJ_DIR, "layouts/*")):
|
||||
name = os.path.basename(fn)
|
||||
with self.subTest(layout=name):
|
||||
with open(fn) as f:
|
||||
layout = f.read()
|
||||
violations = [s for s in bad_strings if s in layout]
|
||||
assert len(violations) == 0, f"These should be stripped out of the layout: {str(violations)}"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user