update
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-check mb-3">
|
||||
<input class="form-check-input" type="checkbox" value="" id="check_envea" onchange="update_config_sqlite('envea', this.checked)">
|
||||
<input class="form-check-input" type="checkbox" value="" id="check_envea" onchange="update_config_sqlite('envea', this.checked);add_sondeEnveaContainer() ">
|
||||
<label class="form-check-label" for="check_envea">
|
||||
Send Envea sensor data
|
||||
</label>
|
||||
@@ -341,6 +341,11 @@ window.onload = function() {
|
||||
checkbox_nmp5channels.checked = response.npm_5channel;
|
||||
checkbox_wind.checked = response["windMeter"];
|
||||
checkbox_uSpot.checked = response["send_uSpot"];
|
||||
|
||||
// If envea is enabled, show the envea sondes container
|
||||
if (response["envea"]) {
|
||||
add_sondeEnveaContainer();
|
||||
}
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
@@ -726,11 +731,14 @@ function add_sondeEnveaContainer() {
|
||||
onchange="updateSondeStatus(${sonde.id}, this.checked)">
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="Name" value="${sonde.name}"
|
||||
id="${sondeId}_name" onchange="updateSondeName(${sonde.id}, this.value)">
|
||||
<input type="text" class="form-control" placeholder="Port" value="${sonde.port}"
|
||||
id="${sondeId}_port" onchange="updateSondePort(${sonde.id}, this.value)">
|
||||
id="${sondeId}_name" readonly style="background-color: #f8f9fa;">
|
||||
<select class="form-control" id="${sondeId}_port" onchange="updateSondePort(${sonde.id}, this.value)">
|
||||
<option value="ttyAMA3" ${sonde.port === 'ttyAMA3' ? 'selected' : ''}>ttyAMA3</option>
|
||||
<option value="ttyAMA4" ${sonde.port === 'ttyAMA4' ? 'selected' : ''}>ttyAMA4</option>
|
||||
<option value="ttyAMA5" ${sonde.port === 'ttyAMA5' ? 'selected' : ''}>ttyAMA5</option>
|
||||
</select>
|
||||
<input type="number" class="form-control" placeholder="Coefficient" value="${sonde.coefficient}"
|
||||
id="${sondeId}_coefficient" onchange="updateSondeCoefficient(${sonde.id}, this.value)">
|
||||
id="${sondeId}_coefficient" readonly style="background-color: #f8f9fa;">
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user