Skip to content

Commit

Permalink
lll
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMcInnes committed Dec 18, 2024
1 parent 33496e6 commit ec0275b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
9 changes: 2 additions & 7 deletions ApplicationContent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,11 @@ Item {
: "qrc:/qt/qml/Victron/VenusOS/components/WasmVirtualKeyboardHandler.qml"
}

// Sometimes, the wasm code may crash. Use a watchdog to detect this and reload the page when necessary.
Timer {
running: Qt.platform.os === "wasm" && BackendConnection.state === BackendConnection.Ready
repeat: true
interval: 1000

onTriggered: {
console.log("************ blah2")
console.log("************ onTriggered")
//BackendConnection.hitWatchdog()
}

onTriggered: BackendConnection.hitWatchdog()
}
}
1 change: 0 additions & 1 deletion src/backendconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ void BackendConnection::openUrl(const QString &url)
emscripten_run_script(ba.constData());
}

// Sometimes, the wasm code may crash. Use a watchdog to detect this and reload the page when necessary.
void BackendConnection::hitWatchdog()
{
emscripten_run_script("watchdogHit = true"); // 'watchdogHit' is defined in venus-gui-v2.html, which checks it periodically and reloads the page if not hit regularly.
Expand Down

0 comments on commit ec0275b

Please sign in to comment.