mirror of
https://github.com/meshtastic/meshtastic.git
synced 2024-11-09 23:24:10 -08:00
for crying out loud...
This commit is contained in:
parent
2964e30485
commit
64e173b8e4
|
@ -1,17 +1,17 @@
|
|||
export default function calculateADC() {
|
||||
//const variables
|
||||
let BAT_MILLIVOLTS_FULL = 4.2;
|
||||
let BAT_MILLIVOLTS_EMPTY = 3.27;
|
||||
let BAT_FULL_PERCENT = 1;
|
||||
const BAT_MILLIVOLTS_FULL = 4.2;
|
||||
const BAT_MILLIVOLTS_EMPTY = 3.27;
|
||||
const BAT_FULL_PERCENT = 1;
|
||||
//variable
|
||||
let batteryChargePercent =
|
||||
const batteryChargePercent =
|
||||
parseFloat(
|
||||
(<HTMLInputElement>document.getElementById("batteryChargePercent")).value
|
||||
) / 100;
|
||||
let operativeAdcMultiplier = parseFloat(
|
||||
const operativeAdcMultiplier = parseFloat(
|
||||
(<HTMLInputElement>document.getElementById("operativeAdcMultiplier")).value
|
||||
);
|
||||
let result =
|
||||
const result =
|
||||
(operativeAdcMultiplier *
|
||||
((BAT_FULL_PERCENT - 1) * BAT_MILLIVOLTS_EMPTY -
|
||||
BAT_FULL_PERCENT * BAT_MILLIVOLTS_FULL)) /
|
||||
|
|
Loading…
Reference in a new issue