display diagram

This commit is contained in:
Paul Wieland 2024-11-13 04:57:31 -05:00
parent 8dd09d2c29
commit c11a748608
1 changed files with 2 additions and 2 deletions

View File

@ -295,10 +295,10 @@
var hardware = document.querySelector('input[name="hardware"]:checked').value;
var diagram_protocol = protocol.replace("v1","").replace("v2","");
var img = new Image();
var img = document.querySelector("#wiring_diagram");
img.onerror = function() {
console.log(`img not found: ${this.src}`);
document.querySelector("#wiring_diagram").src = "wiring_diagrams/v25iboard_secplus.png";
this.src = "wiring_diagrams/v25iboard_secplus.png";
}
img.src = `wiring_diagrams/${hardware}_${diagram_protocol}.png`;