Compare commits
3 Commits
26381de1b3
...
e82cd6afd5
Author | SHA1 | Date |
---|---|---|
Paul Wieland | e82cd6afd5 | |
Paul Wieland | c11a748608 | |
Paul Wieland | 8dd09d2c29 |
|
@ -295,15 +295,12 @@
|
||||||
var hardware = document.querySelector('input[name="hardware"]:checked').value;
|
var hardware = document.querySelector('input[name="hardware"]:checked').value;
|
||||||
|
|
||||||
var diagram_protocol = protocol.replace("v1","").replace("v2","");
|
var diagram_protocol = protocol.replace("v1","").replace("v2","");
|
||||||
var img = new Image();
|
var img = document.querySelector("#wiring_diagram");
|
||||||
img.src = `wiring_diagrams/${hardware}_${diagram_protocol}.png`;
|
img.onerror = function() {
|
||||||
if(img.height !== 0){
|
console.log(`img not found: ${this.src}`);
|
||||||
console.log(`diagram: ${img.src}`);
|
this.src = "wiring_diagrams/v25iboard_secplus.png";
|
||||||
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";
|
|
||||||
}
|
}
|
||||||
|
img.src = `wiring_diagrams/${hardware}_${diagram_protocol}.png`;
|
||||||
|
|
||||||
if(protocol !== "secplusv2" && (hardware === "v2board_esp8266_d1_mini" || hardware === "v2board_esp32_d1_mini")){
|
if(protocol !== "secplusv2" && (hardware === "v2board_esp8266_d1_mini" || hardware === "v2board_esp32_d1_mini")){
|
||||||
alert("ratgdo version 2.0 only works with Security + 2.0");
|
alert("ratgdo version 2.0 only works with Security + 2.0");
|
||||||
|
|
Loading…
Reference in New Issue