updated path, clean up code

This commit is contained in:
dekuNukem
2024-03-14 12:46:31 +00:00
parent 42bf075466
commit eebe3f1e30
4 changed files with 8 additions and 20 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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