Fixed reporting of PID loop settings.

10.7.0-preview
mikeller 2020-06-07 12:04:41 +12:00
parent e14b560c6f
commit 899063b998
1 changed files with 4 additions and 5 deletions

View File

@ -1225,13 +1225,12 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
const value = parseInt(pidSelectElement.val()); const value = parseInt(pidSelectElement.val());
let newDenominator = undefined;
let newFrequency = undefined;
if (value !== PID_ADVANCED_CONFIG.pid_process_denom) { if (value !== PID_ADVANCED_CONFIG.pid_process_denom) {
newDenominator = value; const newFrequency = pidSelectElement.find('option:selected').text();
newFrequency = pidSelectElement.find('option:selected').text(); self.analyticsChanges['PIDLoopSettings'] = `denominator: ${value} | frequency: ${newFrequency}`;
} else {
self.analyticsChanges['PIDLoopSettings'] = undefined;
} }
self.analyticsChanges['PIDLoopSettings'] = `denominator: ${newDenominator} | frequency: ${newFrequency}`;
PID_ADVANCED_CONFIG.pid_process_denom = value; PID_ADVANCED_CONFIG.pid_process_denom = value;