diff --git a/Server/app_routes/selfcheck.py b/Server/app_routes/selfcheck.py index bee341f..acf5329 100644 --- a/Server/app_routes/selfcheck.py +++ b/Server/app_routes/selfcheck.py @@ -14,7 +14,7 @@ def selfcheck_selected(): time = copter.refresh() data = { 'anim_id': copter.anim_id, - 'batt_voltage': copter.batt_voltage, + 'batt_voltage': ((float(copter.batt_voltage) - 3.2) / (4.2 - 3.2)) * 100, 'cell_voltage': copter.cell_voltage, 'selfcheck': copter.selfcheck, 'time': round(float(copter.time) - time, 3), @@ -32,7 +32,7 @@ def selfcheck_all(): time = copter.refresh() data.append({ 'anim_id': copter.anim_id, - 'batt_voltage': copter.batt_voltage, + 'batt_voltage': ((float(copter.batt_voltage) - 3.2) / (4.2 - 3.2)) * 100, 'cell_voltage': copter.cell_voltage, 'selfcheck': copter.selfcheck, 'ip': copter.ip, diff --git a/Server/static/js/main.js b/Server/static/js/main.js index 629f2cf..e7093c7 100644 --- a/Server/static/js/main.js +++ b/Server/static/js/main.js @@ -116,7 +116,6 @@ function refreshRows(selectedRows) { let response = JSON.parse(req.response); Object.keys(response).forEach(function (item) { element._row.data[item] = response[item]; - colorRow(element); }); }); spinner.style.display = 'none';