fix(web): automate cold-boot power hold
This commit is contained in:
@@ -18,15 +18,9 @@ Worked around by forcing store-containing TBs to TCI (`wasm_tci_only_tb = true`
|
||||
|
||||
The reader drew a crisp BW page, then a 4-level grayscale antialiasing pass (inverted plane polarity, near-empty planes) that the old model rendered as a full frame, wiping the page to an inverted muddle. The `xteink_x3_eink` model now keeps a persistent surface, identifies known BW and grayscale modes by exact comparison of the complete loaded LUT bank, and treats grayscale level 0 as no-drive (keep pixel) so only antialiased edges repaint over the retained BW page. Unknown LUTs are logged and skipped instead of guessed from pixel content. Reader text renders sharp on native and wasm.
|
||||
|
||||
## Cold boot requires a manual power-button hold
|
||||
## Resolved: cold boot required a manual power-button hold
|
||||
|
||||
If the power button is not held until the Booting icon appears, the firmware can enter an unwanted watchdog reboot path:
|
||||
|
||||
```text
|
||||
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)
|
||||
```
|
||||
|
||||
The emulator should model a cold-boot power hold and release automatically rather than requiring precisely timed user input. The preceding NVS `NOT_FOUND` messages are expected first-boot initialization noise.
|
||||
The browser now presses power after the panel's initial frame, releases it on the next frame (the Booting screen), and only then enables controls. This mirrors the previously reliable browser-test sequence without relying on a wall-clock delay. The browser test no longer presses power itself, proving cold boot is automatic. The preceding NVS `NOT_FOUND` messages remain expected first-boot initialization noise.
|
||||
|
||||
## WASM heap balloons after watchdog reboot
|
||||
|
||||
|
||||
@@ -39,11 +39,6 @@ try:
|
||||
return current
|
||||
raise RuntimeError('display did not settle')
|
||||
|
||||
power = driver.find_element(By.CSS_SELECTOR, '[data-button="power"]')
|
||||
before = generation()
|
||||
ActionChains(driver).click_and_hold(power).perform()
|
||||
wait_frame(before)
|
||||
ActionChains(driver).release(power).perform()
|
||||
wait_stable()
|
||||
|
||||
def press(button):
|
||||
|
||||
+8
-2
@@ -104,6 +104,7 @@ function drawFrame(module, canvas) {
|
||||
|
||||
function startDisplayLoop(module, canvas, setStatus, onReady) {
|
||||
let generation = -1;
|
||||
let powerHeld = false;
|
||||
let ready = false;
|
||||
const update = () => {
|
||||
const nextGeneration = module._xteink_wasm_frame_generation();
|
||||
@@ -112,9 +113,14 @@ function startDisplayLoop(module, canvas, setStatus, onReady) {
|
||||
const indicator = document.querySelector('#frame-generation');
|
||||
indicator.value = String(generation);
|
||||
document.dispatchEvent(new CustomEvent('xteink-frame', { detail: { generation } }));
|
||||
setStatus('Running.');
|
||||
if (!ready) {
|
||||
if (!powerHeld) {
|
||||
powerHeld = true;
|
||||
setButton(module, 'power', true);
|
||||
setStatus('Holding power for cold boot…');
|
||||
} else if (!ready) {
|
||||
setButton(module, 'power', false);
|
||||
ready = true;
|
||||
setStatus('Running.');
|
||||
onReady();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user