File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -66,15 +66,16 @@ def plugin_run(
6666 first = False
6767 continue
6868
69- # copy from handygccs
69+ # Use the oxp-platform driver if available
7070 if os .path .exists ("/sys/devices/platform/oxp-platform/tt_toggle" ):
71- command = f"echo 1 > /sys/devices/platform/oxp-platform/tt_toggle"
72- os .popen (command , "r" , 1 ).read ().strip ()
71+ try :
72+ with open ("/sys/devices/platform/oxp-platform/tt_toggle" , "w" ) as f :
73+ f .write ("1" )
74+ except Exception :
75+ logger .warn (
76+ f"Turbo takeover failed. Ensure you have the latest oxp-sensors driver installed."
77+ )
7378 logger .info (f"Turbo button takeover enabled" )
74- else :
75- logger .warn (
76- f"Turbo takeover failed. Ensure you have the latest oxp-sensors driver installed."
77- )
7879
7980 try :
8081 logger .info ("Launching emulated controller." )
You can’t perform that action at this time.
0 commit comments