Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add props in configuration to mixer page #1489

Merged
merged 2 commits into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4072,6 +4072,12 @@
"illegalStateRestartRequired": {
"message": "Illegal state. Restart required."
},
"motor_direction_inverted": {
"message": "Reversed motor direction / Props In configuration"
},
"motor_direction_inverted_hint": {
"message": "Enable if the motor direction is reversed and the props are mounted in the opposite direction."
},
"blackboxFields": {
"message": "Blackbox fields"
},
Expand Down
5 changes: 5 additions & 0 deletions tabs/mixer.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
<span data-i18n="platformType"></span>
</label>
</div>
<div class="checkbox">
<input id="motor_direction_inverted" type="checkbox" class="toggle" data-setting="motor_direction_inverted" />
<label for="motor_direction_inverted"><span data-i18n="motor_direction_inverted"></span></label>
<div class="helpicon cf_tip" data-i18n_title="motor_direction_inverted_hint"></div>
</div>
</div>
</div>
</div>
Expand Down
7 changes: 6 additions & 1 deletion tabs/mixer.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@ TABS.mixer.initialize = function (callback, scrollPosition) {
mspHelper.saveMixerConfig,
mspHelper.sendServoMixer,
mspHelper.sendMotorMixer,
saveSettings,
mspHelper.saveToEeprom
]);
saveChainer.setExitPoint(reboot);

function saveSettings(onComplete) {
Settings.saveInputs().then(onComplete);
}

function reboot() {
//noinspection JSUnresolvedVariable
GUI.log(chrome.i18n.getMessage('configurationEepromSaved'));
Expand All @@ -57,7 +62,7 @@ TABS.mixer.initialize = function (callback, scrollPosition) {
}

function loadHtml() {
GUI.load("./tabs/mixer.html", processHtml);
GUI.load("./tabs/mixer.html", Settings.processHtml(processHtml));
}

function renderOutputTable() {
Expand Down