KMKfw / kmk_firmware

Clackety Keyboards Powered by Python
https://kmkfw.zulipchat.com
Other
1.32k stars 458 forks source link

Add automatic debug logs #912

Closed xs5871 closed 7 months ago

xs5871 commented 8 months ago

Automatically enable debug output if a serial monitor is connected to the serial interface.

xs5871 commented 7 months ago

Boot configuration doesn't really affect this. If the serial console is disabled, then of course no debug messages are processed. If, as by default, the serial endpoint is connected: if and only if a serial monitor is actually connected (picocom, screen, etc.) debug messages are enabled. They are disabled again once the monitor is properly disconnected/closed. There's one stumbling block where a serial monitor can be closed without resetting the connection (in picocom that's ctrl-q vs. ctrl-x) -- but that'll only happen if debugging was enabled intentionally in the first place. That's a reasonable trade-off for the convenience in my opinion and shouldn't affect any casual users. Does this explanation address your concerns? I'll wait with the merge for your feedback.

regicidalplutophage commented 7 months ago

U-huh, I misunderstood it then. All good, I don't have any issues with this 👍