missed to add function to websocket.js

This commit is contained in:
Marcel Peterkau 2024-05-31 03:06:00 +02:00
parent 170c66ff49
commit d9ee193e26

View File

@ -84,7 +84,6 @@ function onMessage(event) {
processDTCNotifications(dtcArray); processDTCNotifications(dtcArray);
fillDTCTable(dtcArray); fillDTCTable(dtcArray);
} else if (data.startsWith("MAPPING_STATUS:")) { } else if (data.startsWith("MAPPING_STATUS:")) {
const data_sliced = data.slice(15); const data_sliced = data.slice(15);
statusMapping = createMapping(data_sliced); statusMapping = createMapping(data_sliced);
@ -194,6 +193,19 @@ function fillValuesToHTML(dataset) {
} }
} }
function formatTime(seconds) {
var hrs = Math.floor(seconds / 3600);
var mins = Math.floor((seconds % 3600) / 60);
var secs = seconds % 60;
return (
String(hrs).padStart(2, "0") +
":" +
String(mins).padStart(2, "0") +
":" +
String(secs).padStart(2, "0")
);
}
// Funktion zum Setzen des ausgewählten Werts für Dropdowns // Funktion zum Setzen des ausgewählten Werts für Dropdowns
function setDropdownValue(selectElement, value) { function setDropdownValue(selectElement, value) {