Skip to content

Commit

Permalink
Added more frame options
Browse files Browse the repository at this point in the history
  • Loading branch information
dbambus committed Feb 15, 2023
1 parent e4776b3 commit 7ee5329
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion include/Uhr.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ enum class MinuteVariant {
enum class SecondVariant {
Off = 0,
FrameDot = 1,
FrameToggle = 2,
FrameSector = 2,
FrameSectorToggle = 3,
};

struct GLOBAL {
Expand Down
12 changes: 6 additions & 6 deletions webpage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -272,16 +272,16 @@ <h2>Sekundenoptionen</h2>
<form class="pure-form pure-form-aligned">
<fieldset>
<div class="pure-control-group">
<label for="show-seconds">Sekundenanzeige im Rahmen</label>
<label class="switch">
<input type="checkbox" id="show-seconds">
<span class="slider round"></span>
</label>
<label for="show-seconds">Sekundenanzeige im Rahmen</label><select name="show-seconds" id="show-seconds" size="1">
<option value="0" selected>Off</option>
<option value="1">Punkt</option>
<option value="2">Sektor</option>
<option value="3">Umlaufender Sektor</option>
</select>
</div>
</fieldset>
</form>
</div>

</div>
<!-- Specific UHR169 End-->
<div class="pure-u-1 pure-u-lg-1">
Expand Down
4 changes: 2 additions & 2 deletions webpage/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ function initWebsocket() {
$("ldr-cal").set("value", data.ldrCal);
$("#slider-brightness").set("value", data.effectBri);
$("#slider-speed").set("value", data.effectSpeed); // TODO: there is no property effectSpeed!
document.getElementById("show-seconds").checked = data.secondVariant;
$("#show-seconds").set("value", data.secondVariant);
$("#show-minutes").set("value", data.minuteVariant);

$("#owm-api-key").set("value", data.apiKey);
Expand Down Expand Up @@ -885,7 +885,7 @@ $.ready(function() {
debugMessage("MinuteVariant" + debugMessageReconfigured);
});
$("#show-seconds").on("change", function() {
var showSecondsValue = $("#show-seconds").get("checked") | 0;
var showSecondsValue = $("#show-seconds").get("value");

sendCmd(COMMAND_SET_SETTING_SECOND, nstr(showSecondsValue));
debugMessage("SecondVariant" + debugMessageReconfigured);
Expand Down

0 comments on commit 7ee5329

Please sign in to comment.