mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-15 12:25:13 +03:00
Show PID output in GUI
This commit is contained in:
parent
0101ee329d
commit
f320aa4f02
3 changed files with 20 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
let ProgrammingPid = function (enabled, setpointType, setpointValue, measurementType, measurementValue, gainP, gainI, gainD, gainFF) {
|
||||
let self = {};
|
||||
let $row;
|
||||
|
||||
self.getEnabled = function () {
|
||||
return !!enabled;
|
||||
|
@ -211,5 +212,13 @@ let ProgrammingPid = function (enabled, setpointType, setpointValue, measurement
|
|||
|
||||
}
|
||||
|
||||
self.update = function (index, value, $container) {
|
||||
if (typeof $row === 'undefined') {
|
||||
return;
|
||||
}
|
||||
|
||||
$row.find('.pid_cell__output').html(value);
|
||||
}
|
||||
|
||||
return self;
|
||||
};
|
|
@ -44,5 +44,15 @@ let ProgrammingPidCollection = function () {
|
|||
GUI.switchery();
|
||||
};
|
||||
|
||||
self.update = function(statuses) {
|
||||
let $table = $container.find(".pid__table")
|
||||
|
||||
for (let k in self.get()) {
|
||||
if (self.get().hasOwnProperty(k)) {
|
||||
self.get()[k].update(k, statuses.get(k), $table);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return self;
|
||||
};
|
|
@ -66,6 +66,7 @@ TABS.programming.initialize = function (callback, scrollPosition) {
|
|||
function onStatusPullDone() {
|
||||
LOGIC_CONDITIONS.update(LOGIC_CONDITIONS_STATUS);
|
||||
GLOBAL_VARIABLES_STATUS.update($('.tab-programming'));
|
||||
PROGRAMMING_PID.update(PROGRAMMING_PID_STATUS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue