mirror of
https://github.com/dekuNukem/USB4VC.git
synced 2025-10-31 11:26:46 -07:00
updated path, clean up code
This commit is contained in:
@@ -1,22 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2014-18 Richard Hull and contributors
|
||||
# See LICENSE.rst for details.
|
||||
|
||||
import sys
|
||||
import logging
|
||||
|
||||
from luma.core import cmdline, error
|
||||
|
||||
|
||||
# logging
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG,
|
||||
format='%(asctime)-15s - %(message)s'
|
||||
)
|
||||
# ignore PIL debug messages
|
||||
logging.getLogger('PIL').setLevel(logging.ERROR)
|
||||
|
||||
|
||||
def display_settings(device, args):
|
||||
"""
|
||||
Display a short summary of the settings.
|
||||
|
||||
@@ -32,11 +32,15 @@ sudo dfu-util --device ,0483:df11 -a 0 -D ~/usb4vc/firmware/PBFW_ADB_PBID2_V0_1_
|
||||
-----
|
||||
sudo apt install evtest
|
||||
|
||||
raspberry pi 5 uses a different GPIO chip, this is a compatibility package
|
||||
sudo apt remove python3-rpi.gpio
|
||||
sudo pip3 install --break-system-packages rpi-lgpio
|
||||
|
||||
cd ~
|
||||
git clone https://github.com/atar-axis/xpadneo.git
|
||||
sudo apt-get install dkms raspberrypi-kernel-headers
|
||||
|
||||
https://github.com/atar-axis/xpadneo
|
||||
--------------
|
||||
|
||||
sudo mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED.old
|
||||
@@ -84,11 +88,11 @@ echo 'options bluetooth disable_ertm=Y' | sudo tee -a /etc/modprobe.d/bluetooth.
|
||||
------------
|
||||
boot speedup:
|
||||
|
||||
sudo nano /boot/config.txt
|
||||
sudo nano /boot/firmware/config.txt
|
||||
disable_splash=1
|
||||
boot_delay=0
|
||||
|
||||
sudo nano /boot/cmdline.txt
|
||||
sudo nano /boot/firmware/cmdline.txt
|
||||
|
||||
Add quiet after rootwait
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ while 1:
|
||||
if ertm_status != 'Y':
|
||||
# print('ertm_status:', ertm_status)
|
||||
# print("Disabling ERTM....")
|
||||
subprocess.call('echo 1 > /sys/module/bluetooth/parameters/disable_ertm')
|
||||
subprocess.call('echo Y > /sys/module/bluetooth/parameters/disable_ertm')
|
||||
# print("DONE")
|
||||
except Exception:
|
||||
continue
|
||||
|
||||
@@ -384,7 +384,7 @@ def pair_device(mac_addr):
|
||||
def get_paired_devices():
|
||||
dev_set = set()
|
||||
try:
|
||||
device_str = subprocess.getoutput(f"timeout 5 bluetoothctl --agent NoInputNoOutput paired-devices")
|
||||
device_str = subprocess.getoutput(f"timeout 5 bluetoothctl --agent NoInputNoOutput devices Paired")
|
||||
for line in device_str.replace('\r', '').split('\n'):
|
||||
if 'device' not in line.lower():
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user