Compare commits

..

No commits in common. "c11a7486080bd9f8322e88ccc07ef808e0201427" and "12af6603fb8d21d54ef5d388ea9bd9ad67a1e290" have entirely different histories.

1 changed files with 8 additions and 5 deletions

View File

@ -295,12 +295,15 @@
var hardware = document.querySelector('input[name="hardware"]:checked').value;
var diagram_protocol = protocol.replace("v1","").replace("v2","");
var img = document.querySelector("#wiring_diagram");
img.onerror = function() {
console.log(`img not found: ${this.src}`);
this.src = "wiring_diagrams/v25iboard_secplus.png";
}
var img = new Image();
img.src = `wiring_diagrams/${hardware}_${diagram_protocol}.png`;
if(img.height !== 0){
console.log(`diagram: ${img.src}`);
document.querySelector("#wiring_diagram").src = img.src;
}else{
console.log(`img not found: ${img.src}`);
document.querySelector("#wiring_diagram").src = "wiring_diagrams/v25iboard_secplus.png";
}
if(protocol !== "secplusv2" && (hardware === "v2board_esp8266_d1_mini" || hardware === "v2board_esp32_d1_mini")){
alert("ratgdo version 2.0 only works with Security + 2.0");