Public Access
A key sent through the Debug Console could turn the screen "off" for a tick
The `key` command stamps the power timer from millis(); the power tick then compared with its pass's older time, and the unsigned difference read as 49 days without a key. The screen state went Off for one tick, and the next key was swallowed as a wake-up: about one remote key in twenty-five. Keys from the keyboard pass the loop's own time and were never affected. The same shape as #46. PowerPolicy::update now treats a stamp from the future as "just now", with a test. rdbg.py: piped lines written while it was still connecting stayed in Python's read buffer until the next line arrived (readline() behind select()). It reads the descriptor directly now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
+8
-3
@@ -224,10 +224,15 @@ def interactive(sock):
|
||||
sys.stdout.write(data.decode(errors="replace"))
|
||||
sys.stdout.flush()
|
||||
if sys.stdin in ready:
|
||||
line = sys.stdin.readline()
|
||||
if not line:
|
||||
# Straight from the descriptor: readline() takes every waiting line into Python's own
|
||||
# buffer and hands over one, and select() then sees nothing more to read. Piped input
|
||||
# written while we were still connecting got stuck until the next line came.
|
||||
data = os.read(sys.stdin.fileno(), 4096)
|
||||
if not data:
|
||||
return
|
||||
sock.sendall(line.encode())
|
||||
sock.setblocking(True)
|
||||
sock.sendall(data)
|
||||
sock.setblocking(False)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user