Skip to content

Commit

Permalink
Fix analog sensor status not clearing when switching sites
Browse files Browse the repository at this point in the history
  • Loading branch information
salbahra committed Sep 11, 2023
1 parent fbcdc95 commit c2e6aae
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions www/js/analog.js
Expand Up @@ -41,9 +41,11 @@ function updateAnalogSensor( callback ) {
}

function updateSensorShowArea( page ) {
var showArea = page.find( "#os-sensor-show" ),
html = "";

if ( checkAnalogSensorAvail() ) {
var showArea = page.find( "#os-sensor-show" );
var html = "", i, j;
var i, j;
for ( i = 0; i < progAdjusts.length; i++ ) {
var progAdjust = progAdjusts[ i ];
var sensorName = "";
Expand All @@ -70,11 +72,12 @@ function updateSensorShowArea( page ) {
html += "</div>";
}
}
while ( showArea.firstChild ) {
showArea.removeChild( showArea.firstChild );
}
showArea.html( html );
}

while ( showArea.firstChild ) {
showArea.removeChild( showArea.firstChild );
}
showArea.html( html );
}

function toByteArray( b ) {
Expand Down

0 comments on commit c2e6aae

Please sign in to comment.