Skip to content

Commit

Permalink
Merge pull request #6 from furbrain/debug-mode-usability
Browse files Browse the repository at this point in the history
Make debug mode detection more friendly
  • Loading branch information
furbrain authored Jan 8, 2024
2 parents e58c779 + 831276f commit 996d48f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion firmware/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
pass

logger = adafruit_logging.getLogger()
files = os.listdir()
files = os.listdir("/")
files = [x.split('.')[0].upper() for x in files]
if "DEBUG" in files:
logger.setLevel(adafruit_logging.DEBUG)
elif "INFO" in files:
Expand Down
7 changes: 4 additions & 3 deletions firmware/docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,10 @@ In the top level director of the USB Drive, you may see:
Debug info stored here if the device crashes or encounters an error

``DEBUG``
If this file is present, then the device is in debug mode. You won't see the normal battery charging screen, but you
can double click and start the main device running. You also get a serial connection on
``/dev/ttyACM0`` or ``/dev/ttyUSB0`` on linux or ``COM1`` on windows
If this file is present, then the device is in debug mode. You can also use ``debug.txt``, or in fact
any file with ``debug`` (any capitalisation) as the basename. You won't see the normal battery charging screen,
but you can double click **A** and start the main device running. You also get a serial connection on
``/dev/ttyACM0`` or ``/dev/ttyUSB0`` on linux or ``COM1`` on windows, which will show debug information.

Hardware
++++++++
Expand Down

0 comments on commit 996d48f

Please sign in to comment.