Summary Files Commits Branches @commit @diff @stats
path: root / Year 3 / Internet of things / goam / webserver
diff options
context:
space:
mode:
Commita2ecddfd0351b6c53b3cb9d5f8d88743924d9e01 (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-05-28 15:50:35 +0300
Committer
 Syndamia <kamen@syndamia.com>
2024-05-28 15:50:35 +0300
Files0e5525188882a0052a4bf578d2a3973dc645a16f /Year 3/Internet of things/goam/webserver
uni-projects-a2ecddfd0351b6c53b3cb9d5f8d88743924d9e01.tar
uni-projects-a2ecddfd0351b6c53b3cb9d5f8d88743924d9e01.tar.gz
uni-projects-a2ecddfd0351b6c53b3cb9d5f8d88743924d9e01.zip
Parent6270409b28e06b34a9e2e911843d7feca2e68b79 (diff)
[iot/goam] Moved configuration forms from having an address for each to a global /config address
1 files changed, 11 insertions, 9 deletions
-rw-r--r--Year 3/Internet of things/goam/webserver/index.html20
diff --git a/Year 3/Internet of things/goam/webserver/index.html b/Year 3/Internet of things/goam/webserver/index.html
index c43bdac..afce35c 100644
--- a/Year 3/Internet of things/goam/webserver/index.html
+++ b/Year 3/Internet of things/goam/webserver/index.html
@@ -63,29 +63,31 @@ iframe {
<h1>Configure static network</h1>
<p>Upon boot up, the device first tries to connect to the (static) network with stored name/password. If that fails, then it tries connecting to an open network. If that fails too, after 2 seconds connection logic is restarted.</p>
- <form action="/network" target="dummyframe" method="POST">
- <input id="network-ssid" name="ssid" type="text" placeholder="Name (SSID)">
- <input id="network-pass" name="pass" type="text" placeholder="Password">
+ <form action="/config" target="dummyframe" method="POST">
+ <input name="ssid" type="text" placeholder="Name (SSID)">
+ <input name="pass" type="text" placeholder="Password">
<input class="button" type="submit" value="Save">
</form>
<h1>Configure timelapse</h1>
- <form action="/timelapse_period" target="dummyframe" method="POST">
+ <form action="/config" target="dummyframe" method="POST">
<input name="timelapse_period" type="number" placeholder="Timelapse period" min="10">
<input class="button" type="submit" value="Save">
</form>
- <form action="/start_timelapse" target="dummyframe" method="GET">
+ <form action="/config" target="dummyframe" method="POST">
+ <input name="timelapse_change" type="hidden" value="1">
<input class="button" type="submit" value="Start timelapse">
</form>
- <form action="/stop_timelapse" target="dummyframe" method="GET">
+ <form action="/config" target="dummyframe" method="POST">
+ <input name="timelapse_change" type="hidden" value="0">
<input class="button" type="submit" value="Stop timelapse">
</form>
<h1>Configure behaviour</h1>
<p><i>Beware, these values may not represent what the device is doing! To be certain, always check the display!</i></p>
- <form action="/imagesave" target="dummyframe" method="POST">
+ <form action="/config" target="dummyframe" method="POST">
<select name="imagesave">
<option value="0">Only save to camera</option>
<option value="&#x01;">Only send to <code>/camera</code> listeners</option>
@@ -94,7 +96,7 @@ iframe {
<input class="button" type="submit" value="Apply">
</form>
<br>
- <form action="/resolution" target="dummyframe" method="POST">
+ <form action="/config" target="dummyframe" method="POST">
<select name="resolution">
<option value="0" selected>640x480</option>
<option value="&#x11;">320x240</option>
@@ -103,7 +105,7 @@ iframe {
<input class="button" type="submit" value="Apply">
</form>
<br>
- <form action="/invertion" target="dummyframe" method="POST">
+ <form action="/config" target="dummyframe" method="POST">
<select name="invertion">
<option value="&#xA6;" selected>Normal</option>
<option value="&#xA7;">Inverted</option>