Compare commits
4 Commits
f0cf81b5dd
...
12af6603fb
Author | SHA1 | Date |
---|---|---|
Paul Wieland | 12af6603fb | |
Paul Wieland | fbcc2ae75d | |
Paul Wieland | 4ee1ddf0bc | |
Paul Wieland | e919ff53da |
|
@ -250,7 +250,7 @@
|
||||||
|
|
||||||
|
|
||||||
<h2>Wiring Diagram</h2>
|
<h2>Wiring Diagram</h2>
|
||||||
<img id="wiring_diagram" src="wiring_diagrams/secplus_diagram.png" alt="Security + 1 and 2 wiring diagram" />
|
<img id="wiring_diagram" src="wiring_diagrams/v25iboard_secplus.png" alt="Security + 1 and 2 wiring diagram" />
|
||||||
|
|
||||||
<h3>Documentation</h3>
|
<h3>Documentation</h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -294,10 +294,15 @@
|
||||||
var protocol = document.querySelector('input[name="protocol"]:checked').value;
|
var protocol = document.querySelector('input[name="protocol"]:checked').value;
|
||||||
var hardware = document.querySelector('input[name="hardware"]:checked').value;
|
var hardware = document.querySelector('input[name="hardware"]:checked').value;
|
||||||
|
|
||||||
if(protocol === "drycontact"){
|
var diagram_protocol = protocol.replace("v1","").replace("v2","");
|
||||||
document.querySelector("#wiring_diagram").src = "wiring_diagrams/dry_contact_diagram.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{
|
}else{
|
||||||
document.querySelector("#wiring_diagram").src = "wiring_diagrams/secplus_diagram.png";
|
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")){
|
if(protocol !== "secplusv2" && (hardware === "v2board_esp8266_d1_mini" || hardware === "v2board_esp32_d1_mini")){
|
||||||
|
|
After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 554 KiB After Width: | Height: | Size: 554 KiB |
After Width: | Height: | Size: 1.9 MiB |
After Width: | Height: | Size: 2.1 MiB |