Skip to content

Commit

Permalink
fix: initialize throttle position to IDLE (#7185)
Browse files Browse the repository at this point in the history
  • Loading branch information
aguther committed May 11, 2022
1 parent 86e791b commit 1c904ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/fbw/src/ThrottleAxisMapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ bool ThrottleAxisMapping::loadFromFile() {
// update configuration
updateMappingFromConfiguration(configuration);

// set current value to idle
setCurrentValue(idleValue);

// success
return true;
}
Expand All @@ -129,6 +132,9 @@ bool ThrottleAxisMapping::saveToFile() {
// set data on structure
storeConfigurationInIniStructure(iniStructure, loadConfigurationFromLocalVariables());

// set current value to idle
setCurrentValue(idleValue);

// write to file
return iniFile.write(iniStructure, true);
}
Expand Down

0 comments on commit 1c904ca

Please sign in to comment.