diff --git a/README.MD b/README.MD new file mode 100644 index 0000000..dbad94f --- /dev/null +++ b/README.MD @@ -0,0 +1,7 @@ +# Signalman +Signalman is a simple and small web application for controlling Werma 640.840.00 USB modules. +It connects the the module via WebSerial (meaning you need to use a Chromiumbased browser) and then sends commands. +It offers a visual configuration to setup your tower. Please beware, this is a small and incomplete testing tool. Some functionality might be broken or not implemented. + +# Screenshot +![Screenshot](imgs/mainPage.png) \ No newline at end of file diff --git a/imgs/mainPage.png b/imgs/mainPage.png new file mode 100644 index 0000000..5dbf273 Binary files /dev/null and b/imgs/mainPage.png differ diff --git a/index.html b/index.html index 6866c00..4142614 100644 --- a/index.html +++ b/index.html @@ -3,45 +3,110 @@ - Werma Signal Controler - + Werma Signal Controller +

Werma Light Control

- This is a small web interface to control the lights and buzzer of a Werma signal tower using the 640.840.00 connection module. It assumes that: Ring 1 is green, Ring 2 is yellow, Ring 3 is red, Ring 4 is buzzer. Ring 5 is assumed to be unconnected -
-

Buzzer

-

- -
- -
-

-
-

Lights

- Auto applies changes - Ring 1 - Red:
- Ring 2 - Yellow:
- Ring 3 - Green:
-
-

- 0 - Off
- 1 - On
- 2 - Pulse
- 3 - Pulse (alternate) -

-
-

Connection control

-

-
+ This is a small web interface which allows you to controll a Werma signal tower using the 640.840.00 connection module. + You can configure the web interface to match your tower's configuration. The default configuration is: Ring 1 is green, Ring 2 is yellow, Ring 3 is red, Ring 4 is buzzer. Ring 5 is assumed to be unconnected.
+ All "product photos" are the property of Werma, I did not take them myself. If you are Werma and want me to take down the images, reach out to me via the contact mail in the legal notes on my main domain. -
- - +
Currently unsupported features
+ + + + +
+
+

Preview

+ +
+ +
+ +
+ + +
+
+ +
+

Control

+
+ +
+ + +
+
+
+ +
+
+

Serial

+ + + +
+
+

Setup

+ +
+ Load config from string + + +
+ +
+
+
+ Export current config + +
+
+
+				
+
+

Configure light

+ + + +
+
+ +
Ring 5
+
+ +
+
Ring 4
+
+ +
+
Ring 3
+
+ +
+
Ring 2
+
+ +
+
Ring 1
+
+ +
+
+ +
+
+
+ - \ No newline at end of file diff --git a/nxtRender.js b/nxtRender.js index 8e94560..4d8edcf 100644 --- a/nxtRender.js +++ b/nxtRender.js @@ -89,7 +89,7 @@ let myConfig = { 1: 0, 2: 0, 3: 0, - 4: 0 + 4: 0, } } @@ -244,6 +244,12 @@ function writeAction(ring, state){ "alternate1": 2, "alternate2": 3 } + // Check if the ring is empty and check if buzzer is enabled + if(myConfig.rings[ring] === "empty" && myConfig.extras.top === "buzzer") { + // Write to buzzer + + return; + } myConfig.states[ring] = actionToState[state]; applyConfig(); serial_send(); diff --git a/v2.html b/v2.html deleted file mode 100644 index 4142614..0000000 --- a/v2.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - Werma Signal Controller - - - -

Werma Light Control

- This is a small web interface which allows you to controll a Werma signal tower using the 640.840.00 connection module. - You can configure the web interface to match your tower's configuration. The default configuration is: Ring 1 is green, Ring 2 is yellow, Ring 3 is red, Ring 4 is buzzer. Ring 5 is assumed to be unconnected.
- All "product photos" are the property of Werma, I did not take them myself. If you are Werma and want me to take down the images, reach out to me via the contact mail in the legal notes on my main domain. - -
Currently unsupported features
- - - - -
-
-

Preview

- -
- -
- -
- - -
-
- -
-

Control

-
- -
- - -
-
-
- -
-
-

Serial

- - - -
-
-

Setup

- -
- Load config from string - - -
- -
-
-
- Export current config - -
-
-
-				
-
-

Configure light

- - - -
-
- -
Ring 5
-
- -
-
Ring 4
-
- -
-
Ring 3
-
- -
-
Ring 2
-
- -
-
Ring 1
-
- -
-
- -
-
-
- - - \ No newline at end of file