From 7cf87ee58a2024c195a1d383efbdaf3d5b9be2b8 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 12 Jun 2023 15:02:51 -0400 Subject: [PATCH] Add notes for rebooting status Turns out, long shutdown-before-reboot is why things get desynced after a while. There's a random thread that can wait up to 10s before dying, and that's what causes the "drops", which are actually more akin to "desync"s. --- notes.md | 6 ++++++ src/device.rs | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 notes.md diff --git a/notes.md b/notes.md new file mode 100644 index 0000000..da1f519 --- /dev/null +++ b/notes.md @@ -0,0 +1,6 @@ +Boot time isn't static. +Boot time can (in theory) be sped up by forcing a clearing of the screen of all vitals before rebooting. +Clearing the screen of all vitals is theoretically possible in the UI menu, with a Spoof Touch, but I don't know the object name of the 'clear' button. + +Can check for reboot completed by reading in serial, check for `reboot: Restarting System` +once done, read for `login:` diff --git a/src/device.rs b/src/device.rs index a09ddce..256b6b5 100755 --- a/src/device.rs +++ b/src/device.rs @@ -2,8 +2,8 @@ use std::{fs::{self, File}, path::Path, io::Write, thread, time::Duration}; use crate::tty::{TTY, Response,Command}; use rppal::gpio::{Gpio,OutputPin}; -const BOOT_TIME:Duration = Duration::new(40, 0); -const BP_RUN:Duration = Duration::new(55, 0); +const BOOT_TIME:Duration = Duration::new(50, 0); +const BP_RUN:Duration = Duration::new(60, 0); const REBOOTS_SECTION: &str = "Reboots: "; const BP_SECTION: &str = "Successful BP tests: "; const TEMP_SECTION: &str = "Successful temp tests: ";