mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +02:00
Added back debug logs to Spoolbuddy test scripts
This commit is contained in:
@@ -7,6 +7,7 @@ spoolbuddy/daemon/pn5180.py and is imported from there.
|
||||
Supports: Bambu (MIFARE Classic) + NTAG (SpoolEase/OpenPrintTag)
|
||||
"""
|
||||
|
||||
import logging
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
@@ -15,6 +16,9 @@ from pathlib import Path
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
||||
from daemon.pn5180 import BAMBU_BLOCKS, PN5180
|
||||
|
||||
# Show driver debug output during diagnostics
|
||||
logging.basicConfig(level=logging.DEBUG, format=" %(message)s")
|
||||
|
||||
|
||||
def _print_hex_dump(data: bytes, label: str, bytes_per_line: int = 16):
|
||||
"""Print a hex dump with ASCII sidebar."""
|
||||
|
||||
@@ -5,6 +5,7 @@ Standalone diagnostic script — the NAU7802 driver lives in
|
||||
spoolbuddy/daemon/nau7802.py and is imported from there.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
@@ -15,6 +16,9 @@ import smbus2
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
||||
from daemon.nau7802 import I2C_BUS, NAU7802, NAU7802_ADDR
|
||||
|
||||
# Show driver debug output (init steps, etc.) during diagnostics
|
||||
logging.basicConfig(level=logging.DEBUG, format=" %(message)s")
|
||||
|
||||
|
||||
def main():
|
||||
print("=" * 60)
|
||||
|
||||
Reference in New Issue
Block a user