diff --git a/static/index.html b/static/index.html
index 17168d1..618b4b3 100644
--- a/static/index.html
+++ b/static/index.html
@@ -250,7 +250,7 @@
Wiring Diagram
-
+
Documentation
@@ -294,10 +294,13 @@
var protocol = document.querySelector('input[name="protocol"]:checked').value;
var hardware = document.querySelector('input[name="hardware"]:checked').value;
- if(protocol === "drycontact"){
- document.querySelector("#wiring_diagram").src = "wiring_diagrams/dry_contact_diagram.png";
+ var diagram_protocol = protocol.replace("v1","").replace("v2","");
+ var img = new Image();
+ img.src = `wiring_diagrams/${hardware}_${protocol}.png`;
+ if(img.height !== 0){
+ document.querySelector("#wiring_diagram").src = img.src;
}else{
- document.querySelector("#wiring_diagram").src = "wiring_diagrams/secplus_diagram.png";
+ document.querySelector("#wiring_diagram").src = "v25iboard_secplus.png";
}
if(protocol !== "secplusv2" && (hardware === "v2board_esp8266_d1_mini" || hardware === "v2board_esp32_d1_mini")){
diff --git a/static/wiring_diagrams/dry_contact_diagram.png b/static/wiring_diagrams/v25iboard_drycontact.png
similarity index 100%
rename from static/wiring_diagrams/dry_contact_diagram.png
rename to static/wiring_diagrams/v25iboard_drycontact.png
diff --git a/static/wiring_diagrams/secplus_diagram.png b/static/wiring_diagrams/v25iboard_secplus.png
similarity index 100%
rename from static/wiring_diagrams/secplus_diagram.png
rename to static/wiring_diagrams/v25iboard_secplus.png
diff --git a/static/wiring_diagrams/v32disco_drycontact.png b/static/wiring_diagrams/v32disco_drycontact.png
new file mode 100644
index 0000000..211e933
Binary files /dev/null and b/static/wiring_diagrams/v32disco_drycontact.png differ
diff --git a/static/wiring_diagrams/v32disco_secplus.png b/static/wiring_diagrams/v32disco_secplus.png
new file mode 100644
index 0000000..c645e7e
Binary files /dev/null and b/static/wiring_diagrams/v32disco_secplus.png differ