add wust typr mpc and mutipule x

This commit is contained in:
cyy_mac
2026-03-27 03:41:42 +08:00
parent 2c64655fae
commit 7dcb53bb77
192 changed files with 29571 additions and 9 deletions

View File

@@ -0,0 +1,35 @@
function showTab(tab) {
document.getElementById("video-tab").style.display = tab === "video" ? "flex" : "none";
}
document.addEventListener("DOMContentLoaded", () => {
updateCharts();
updateMainRange();
setInterval(() => {
fetchDataAndUpdateCharts();
fetchAndDisplayJsonWithTree("json-target", "/target_log");
fetchAndDisplayJsonWithTree("json-serial", "/serial_log");
}, 200);
});
function toggleFullscreen() {
const container = document.querySelector('.video-container');
if (!document.fullscreenElement) {
container.requestFullscreen().then(() => {
document.body.classList.add('fullscreen-mode');
}).catch((err) => {
alert(`无法进入全屏模式: ${err.message}`);
});
} else {
document.exitFullscreen().then(() => {
document.body.classList.remove('fullscreen-mode');
});
}
}
// 监听用户按 ESC 或其他方式退出全屏
document.addEventListener('fullscreenchange', () => {
if (!document.fullscreenElement) {
document.body.classList.remove('fullscreen-mode');
}
});