Skip to content

Commit

Permalink
Align with new config
Browse files Browse the repository at this point in the history
  • Loading branch information
lbussy committed Mar 22, 2020
1 parent c4c9468 commit c95ba4a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions data/settings.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!-- TODO: Update JSON key names -->
<!doctype html>
<html lang="en" class="h-100">

Expand Down Expand Up @@ -357,18 +356,18 @@ <h4 class="card-title">Reset WiFi</h4>
.done(function (config) {
try {
$('input[name="mdnsID"]').val(config.hostname);
$('input[name="bubname"]').val(config.bubbleconfig.name);
if (config.bubbleconfig.tempinf) {
$('input[name="bubname"]').val(config.bubble.name);
if (config.bubble.tempinf) {
$('input[name="tempInF"]')[1].checked = true; // Farenheit
} else {
$('input[name="tempInF"]')[0].checked = true; // Celcius
}
$('input[name="calRoom"]').val(config.calibrate.room);
$('input[name="calVessel"]').val(config.calibrate.vessel);
$('input[name="target"]').val(config.targetconfig.targeturl);
$('input[name="tfreq"]').val(config.targetconfig.freq);
$('input[name="bfkey"]').val(config.bfconfig.bfkey);
$('input[name="bfreq"]').val(config.bfconfig.freq);
$('input[name="target"]').val(config.urltarget.url);
$('input[name="tfreq"]').val(config.urltarget.freq);
$('input[name="bfkey"]').val(config.brewersfriend.key);
$('input[name="bfreq"]').val(config.brewersfriend.freq);
}
catch {
alert("Unable to parse configuration data from SPIFFS.");
Expand Down

0 comments on commit c95ba4a

Please sign in to comment.