mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
display current draw in A not mA
This commit is contained in:
parent
d68bd29191
commit
46cf844e7e
4 changed files with 6 additions and 3 deletions
|
@ -222,6 +222,9 @@
|
|||
"initialSetupBatteryMahValue": {
|
||||
"message": "$1 mAh"
|
||||
},
|
||||
"initialSetupBatteryAValue": {
|
||||
"message": "$1 A"
|
||||
},
|
||||
"initialSetupRSSI": {
|
||||
"message": "RSSI:"
|
||||
},
|
||||
|
|
|
@ -241,7 +241,7 @@ MSP.process_data = function(code, message_buffer, message_length) {
|
|||
ANALOG.voltage = data.getUint8(0) / 10.0;
|
||||
ANALOG.mAhdrawn = data.getUint16(1, 1);
|
||||
ANALOG.rssi = data.getUint16(3, 1); // 0-1023
|
||||
ANALOG.amperage = data.getUint16(5, 1) * 1000; // convert from A to mA
|
||||
ANALOG.amperage = data.getUint16(5, 1) / 100; // A
|
||||
break;
|
||||
case MSP_codes.MSP_RC_TUNING:
|
||||
RC_tuning.RC_RATE = parseFloat((data.getUint8(0) / 100).toFixed(2));
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<dl>
|
||||
<dt i18n="initialSetupBattery"></dt><dd class="bat-voltage">0 V</dd>
|
||||
<dt i18n="initialSetupDrawn"></dt><dd class="bat-mah-drawn">0 mAh</dd>
|
||||
<dt i18n="initialSetupDrawing"></dt><dd class="bat-mah-drawing">0 mAh</dd>
|
||||
<dt i18n="initialSetupDrawing"></dt><dd class="bat-mah-drawing">0 A</dd>
|
||||
<dt i18n="initialSetupRSSI"></dt><dd class="rssi">0 %</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
|
|
@ -245,7 +245,7 @@ function tab_initialize_initial_setup() {
|
|||
// Update voltage indicator
|
||||
$('.bat-voltage').text(chrome.i18n.getMessage('initialSetupBatteryValue', [ANALOG.voltage]));
|
||||
$('.bat-mah-drawn').text(chrome.i18n.getMessage('initialSetupBatteryMahValue', [ANALOG.mAhdrawn]));
|
||||
$('.bat-mah-drawing').text(chrome.i18n.getMessage('initialSetupBatteryMahValue', [ANALOG.amperage]));
|
||||
$('.bat-mah-drawing').text(chrome.i18n.getMessage('initialSetupBatteryAValue', [ANALOG.amperage.toFixed(2)]));
|
||||
$('.rssi').text(chrome.i18n.getMessage('initialSetupRSSIValue', [((ANALOG.rssi / 1023) * 100).toFixed(0)]));
|
||||
|
||||
// Update cube
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue