weston: treat all panels the same (#128)

* weston: treat all panels the same

* fix linter
This commit is contained in:
Adeeb Shihadeh
2023-05-01 19:02:51 -07:00
committed by GitHub
parent c3995b68db
commit d54e993b51
2 changed files with 49 additions and 3 deletions
+2 -3
View File
@@ -15,9 +15,8 @@ TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
# TODO: brightness setting doesn't work without this
ExecStartPre=/bin/bash -c "[ -d /sys/firmware/devicetree/base/soc/qcom,mdss_mdp@ae00000/qcom,mdss_dsi_mate10_lite_video ] && \
/usr/comma/modetest -M msm_drm -s 26:1080x2160-60 && \
# TODO: DCS commands (e.g. brightness setting) don't work without this on tizi
ExecStartPre=/bin/bash -c "/usr/comma/modetest -M msm_drm -s 26:1080x2160-60 && \
sleep 1"
ExecStartPre=/bin/bash -c "mkdir -p $XDG_RUNTIME_DIR"
+47
View File
@@ -0,0 +1,47 @@
#!/usr/bin/env python3
import os
import time
import subprocess
def run(cmd):
subprocess.check_call(cmd, shell=True)
def timestamp_cmd(cmd):
cnt = 0
while True:
cnt += 1
print("try ", cnt)
run("sudo chmod -R 770 /var/tmp/weston/")
proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
t = time.monotonic()
time.sleep(0.5)
r = proc.poll()
if r is not None:
continue
break
print("r", r)
return t
if __name__ == "__main__":
run("sudo systemctl stop weston")
run("sudo rm -rf /var/tmp/weston/wayland-0")
time.sleep(0.5)
#run("sudo systemctl restart weston-ready")
run("sudo systemctl restart weston --no-block")
st = time.monotonic()
#ts = defaultdict()
cnt = 0
while not os.path.exists("/var/tmp/weston/wayland-0"):
time.sleep(0.1)
cnt += 1
t = time.monotonic()
print(f"- socket at {t - st:.2f}s")
t = timestamp_cmd('/usr/comma/setup')
print(f"- setup works {t - st:.2f}s")
t = timestamp_cmd('cd /data/openpilot/selfdrive/ui/ && ./spinner')
print(f"- spinner works {t - st:.2f}s")