parent
397aba07aa
commit
e15cb55e24
|
@ -901,6 +901,9 @@
|
|||
"initialSetupBatteryAValue": {
|
||||
"message": "$1 A"
|
||||
},
|
||||
"initialSetupCpuTemp": {
|
||||
"message": "CPU Temperature:"
|
||||
},
|
||||
"initialSetupRSSI": {
|
||||
"message": "RSSI:"
|
||||
},
|
||||
|
|
|
@ -16,6 +16,7 @@ const INITIAL_CONFIG = {
|
|||
cycleTime: 0,
|
||||
i2cError: 0,
|
||||
cpuload: 0,
|
||||
cpuTemp: 0,
|
||||
activeSensors: 0,
|
||||
mode: 0,
|
||||
profile: 0,
|
||||
|
@ -43,6 +44,7 @@ const INITIAL_CONFIG = {
|
|||
signature: [],
|
||||
mcuTypeId: 255,
|
||||
configurationState: 0,
|
||||
configStateFlag: 0,
|
||||
sampleRateHz: 0,
|
||||
configurationProblems: 0,
|
||||
hardwareName: '',
|
||||
|
|
|
@ -213,6 +213,14 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
|||
FC.CONFIG.armingDisableCount = data.readU8(); // Flag count
|
||||
FC.CONFIG.armingDisableFlags = data.readU32();
|
||||
|
||||
// Read config state flags - bits to indicate the state of the configuration, reboot required, etc.
|
||||
FC.CONFIG.configStateFlag = data.readU8();
|
||||
|
||||
// Read CPU temp, from API version 1.46
|
||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
|
||||
FC.CONFIG.cpuTemp = data.readU16();
|
||||
}
|
||||
|
||||
sensor_status(FC.CONFIG.activeSensors, FC.GPS_DATA.fix);
|
||||
break;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import FC from '../fc';
|
|||
import MSP from '../msp';
|
||||
import Model from '../model';
|
||||
import MSPCodes from '../msp/MSPCodes';
|
||||
import CONFIGURATOR, { API_VERSION_1_42, API_VERSION_1_43 } from '../data_storage';
|
||||
import CONFIGURATOR, { API_VERSION_1_42, API_VERSION_1_43, API_VERSION_1_46 } from '../data_storage';
|
||||
import { gui_log } from '../gui_log';
|
||||
|
||||
const setup = {
|
||||
|
@ -190,6 +190,7 @@ setup.initialize = function (callback) {
|
|||
bat_mah_drawn_e = $('.bat-mah-drawn'),
|
||||
bat_mah_drawing_e = $('.bat-mah-drawing'),
|
||||
rssi_e = $('.rssi'),
|
||||
cputemp_e = $('.cpu-temp'),
|
||||
arming_disable_flags_e = $('.arming-disable-flags'),
|
||||
gpsFix_e = $('.gpsFix'),
|
||||
gpsSats_e = $('.gpsSats'),
|
||||
|
@ -400,6 +401,9 @@ setup.initialize = function (callback) {
|
|||
bat_mah_drawn_e.text(i18n.getMessage('initialSetupBatteryMahValue', [FC.ANALOG.mAhdrawn]));
|
||||
bat_mah_drawing_e.text(i18n.getMessage('initialSetupBatteryAValue', [FC.ANALOG.amperage.toFixed(2)]));
|
||||
rssi_e.text(i18n.getMessage('initialSetupRSSIValue', [((FC.ANALOG.rssi / 1023) * 100).toFixed(0)]));
|
||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
|
||||
cputemp_e.html(`${FC.CONFIG.cpuTemp.toFixed(0)} ℃`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -167,6 +167,10 @@
|
|||
<td i18n="initialSetupRSSI"></td>
|
||||
<td class="rssi">0 %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="cpu-temp" i18n="initialSetupCpuTemp"></td>
|
||||
<td class="cpu-temp">0 ℃</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="sensor-hw" i18n="initialSetupSensorHardware"></td>
|
||||
<td class="sensor-hw"></td>
|
||||
|
|
Loading…
Reference in New Issue