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

Release 7.0.0 #1876

Merged
merged 23 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
376bd57
Read mixer profile from the last byte of MSP frame
DzikuVx Oct 31, 2023
ab4b758
Merge pull request #1874 from iNavFlight/dzikuvx-MSP2_INAV_STATUS_fix
DzikuVx Oct 31, 2023
b839663
Update SITL binaries with the ones from
mmosca Nov 2, 2023
5ccb534
Merge pull request #1880 from iNavFlight/mmosca-update-sitl
DzikuVx Nov 3, 2023
6a34f6b
Only show EzTune tab when platform is multirotor
MrD-RC Nov 4, 2023
76a0965
Merge pull request #1884 from iNavFlight/MrD_Only-show-EZ-Tune-when-p…
DzikuVx Nov 5, 2023
f4958e4
added mixer_profile switch detection to refresh
shota3527 Nov 9, 2023
cbf036e
detect profiles changes
shota3527 Nov 12, 2023
e691537
minor tweaks
shota3527 Nov 12, 2023
794f8f9
change font icon
breadoven Nov 16, 2023
bbbecb2
Merge pull request #1894 from breadoven/abo_analogue_alt_adjust_icon
breadoven Nov 17, 2023
413c1bb
Merge pull request #1892 from shota3527/sh_vtol
DzikuVx Nov 17, 2023
08e2c26
SITL update
DzikuVx Nov 20, 2023
9423d01
fix configurator updateActivatedTab
shota3527 Nov 26, 2023
7cfcb78
Merge pull request #1905 from shota3527/sh_profile_fix
DzikuVx Nov 28, 2023
9a2e179
Bugfix
Scavanger Dec 2, 2023
42e8cef
Bugfix of Bugfix ;)
Scavanger Dec 3, 2023
0e5f9fc
Merge pull request #1908 from Scavanger/Mixer-Bugfixes
DzikuVx Dec 4, 2023
60bdec2
Version update for release
DzikuVx Dec 4, 2023
bb95dad
Fix error
DzikuVx Dec 6, 2023
42f7a7f
Drop not used defaults
DzikuVx Dec 6, 2023
1dd24ab
Fix defaults dialog when mixer configuration is available
DzikuVx Dec 6, 2023
3a26db0
Reenable setting values for all profiles
DzikuVx Dec 6, 2023
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: 3 additions & 3 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,7 @@
"message": "Pitch trim for self-leveling flight modes. In degrees. +5 means airplane nose should be raised 5 deg from level"
},
"pidTuning_ButtonSave": {
"message": "Save"
"message": "Save and Reboot"
},
"pidTuning_ButtonRefresh": {
"message": "Refresh"
Expand Down Expand Up @@ -2220,7 +2220,7 @@
"message": "Blackbox configuration"
},
"blackboxButtonSave": {
"message": "Save and reboot"
"message": "Save and Reboot"
},
"serialLogging": {
"message": "Outboard serial logging device"
Expand Down Expand Up @@ -4452,7 +4452,7 @@
"message": "Confirm"
},
"mixerButtonSaveAndReboot": {
"message": "Save and reboot"
"message": "Save and Reboot"
},
"mixerApplyDescription": {
"message": "This action overrides all current mixer settings and replaces them with default values. There is no 'Undo' option!"
Expand Down
39 changes: 11 additions & 28 deletions js/defaults_dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ helper.defaultsDialog = (function () {
key: "dterm_lpf_type",
value: "PT3"
},
{
key: "dterm_lpf2_hz",
value: 0
},
{
key: "dterm_lpf2_type",
value: "PT1"
},
{
key: "dynamic_gyro_notch_enabled",
value: "ON"
Expand Down Expand Up @@ -270,14 +262,6 @@ helper.defaultsDialog = (function () {
key: "dterm_lpf_type",
value: "PT3"
},
{
key: "dterm_lpf2_hz",
value: 0
},
{
key: "dterm_lpf2_type",
value: "PT1"
},
{
key: "dynamic_gyro_notch_enabled",
value: "ON"
Expand Down Expand Up @@ -461,14 +445,6 @@ helper.defaultsDialog = (function () {
key: "dterm_lpf_type",
value: "PT3"
},
{
key: "dterm_lpf2_hz",
value: 0
},
{
key: "dterm_lpf2_type",
value: "PT1"
},
{
key: "dynamic_gyro_notch_enabled",
value: "ON"
Expand Down Expand Up @@ -1169,6 +1145,7 @@ helper.defaultsDialog = (function () {
privateScope.setSettings = function (selectedDefaultPreset) {
var currentControlProfile = parseInt($("#profilechange").val());
var currentBatteryProfile = parseInt($("#batteryprofilechange").val());

//Save analytics
googleAnalytics.sendEvent('Setting', 'Defaults', selectedDefaultPreset.title);
Promise.mapSeries(selectedDefaultPreset.settings, function (input, ii) {
Expand Down Expand Up @@ -1205,21 +1182,27 @@ helper.defaultsDialog = (function () {
mspHelper.sendServoMixer(function () {
mspHelper.sendMotorMixer(function () {
MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [currentControlProfile], false, function() {
MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [currentBatteryProfile], false, privateScope.finalize(selectedDefaultPreset));
MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [currentBatteryProfile], false, function() {
privateScope.setOriginalProfile(selectedDefaultPreset, currentBatteryProfile, currentControlProfile)
});
});
});
});
});

} else {
MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [currentControlProfile], false, function() {
MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [currentBatteryProfile], false, privateScope.finalize(selectedDefaultPreset));
});
privateScope.setOriginalProfile(selectedDefaultPreset, currentBatteryProfile, currentControlProfile);
}
})
});
};

privateScope.setOriginalProfile = function (selectedDefaultPreset, currentBatteryProfile, currentControlProfile) {
MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [currentControlProfile], false, function() {
MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [currentBatteryProfile], false, privateScope.finalize(selectedDefaultPreset));
});
};

privateScope.setSettingForAllControlProfiles = function (key, value) {
MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [0], false, function () {
mspHelper.setSetting(key, value, function() {
Expand Down
8 changes: 3 additions & 5 deletions js/fc.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ var FC = {
i2cError: 0,
activeSensors: 0,
mode: [],
mixer_profile: 0,
profile: 0,
battery_profile: 0,
mixer_profile: -1,
profile: -1,
battery_profile: -1,
uid: [0, 0, 0],
accelerometerTrims: [0, 0],
armingFlags: 0,
Expand Down Expand Up @@ -1439,8 +1439,6 @@ var FC = {
'max_angle_inclination_pit',
'dterm_lpf_hz',
'dterm_lpf_type',
'dterm_lpf2_hz',
'dterm_lpf2_type',
'yaw_lpf_hz',
'fw_iterm_throw_limit',
'fw_reference_airspeed',
Expand Down
8 changes: 7 additions & 1 deletion js/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,16 @@ GUI_control.prototype.updateStatusBar = function() {
$('span.arming-flags').text(activeArmFlags.length ? activeArmFlags.join(', ') : '-');
};

GUI_control.prototype.updateProfileChange = function() {
GUI_control.prototype.updateProfileChange = function(refresh) {
$('#mixerprofilechange').val(CONFIG.mixer_profile);
$('#profilechange').val(CONFIG.profile);
$('#batteryprofilechange').val(CONFIG.battery_profile);
if (refresh) {
GUI.log(chrome.i18n.getMessage('loadedMixerProfile', [CONFIG.mixer_profile + 1]));
GUI.log(chrome.i18n.getMessage('pidTuning_LoadedProfile', [CONFIG.profile + 1]));
GUI.log(chrome.i18n.getMessage('loadedBatteryProfile', [CONFIG.battery_profile + 1]));
updateActivatedTab();
}
};

GUI_control.prototype.fillSelect = function ($element, values, currentValue, unit) {
Expand Down
28 changes: 21 additions & 7 deletions js/msp/MSPHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ var mspHelper = (function (gui) {
color;
if (!dataHandler.unsupported || dataHandler.unsupported) switch (dataHandler.code) {
case MSPCodes.MSPV2_INAV_STATUS:
let profile_changed = false;
CONFIG.cycleTime = data.getUint16(offset, true);
offset += 2;
CONFIG.i2cError = data.getUint16(offset, true);
Expand All @@ -76,15 +77,28 @@ var mspHelper = (function (gui) {
offset += 2;
CONFIG.cpuload = data.getUint16(offset, true);
offset += 2;

profile_byte = data.getUint8(offset++)
CONFIG.profile = profile_byte & 0x0F;
CONFIG.battery_profile = (profile_byte & 0xF0) >> 4;
profile_byte = data.getUint8(offset++)
CONFIG.mixer_profile = profile_byte & 0x0F;
let profile = profile_byte & 0x0F;
profile_changed |= (profile !== CONFIG.profile) && (CONFIG.profile !==-1);
CONFIG.profile = profile;

let battery_profile = (profile_byte & 0xF0) >> 4;
profile_changed |= (battery_profile !== CONFIG.battery_profile) && (CONFIG.battery_profile !==-1);
CONFIG.battery_profile = battery_profile;

CONFIG.armingFlags = data.getUint32(offset, true);
offset += 4;

//As there are 8 bytes for mspBoxModeFlags (number of bytes is actually variable)
//read mixer profile as the last byte in the the message
profile_byte = data.getUint8(dataHandler.message_length_expected - 1);
let mixer_profile = profile_byte & 0x0F;
profile_changed |= (mixer_profile !== CONFIG.mixer_profile) && (CONFIG.mixer_profile !==-1);
CONFIG.mixer_profile = mixer_profile;

gui.updateStatusBar();
gui.updateProfileChange();
gui.updateProfileChange(profile_changed);
break;

case MSPCodes.MSP_ACTIVEBOXES:
Expand Down Expand Up @@ -2910,7 +2924,7 @@ var mspHelper = (function (gui) {
MSP.send_message(MSPCodes.MSP2_INAV_TIMER_OUTPUT_MODE, false, false, callback);
}

self.sendTimerOutputModes = function(callback) {
self.sendTimerOutputModes = function(onCompleteCallback) {
var nextFunction = send_next_output_mode;
var idIndex = 0;

Expand All @@ -2935,7 +2949,7 @@ var mspHelper = (function (gui) {
// prepare for next iteration
idIndex++;
if (idIndex == overrideIds.length) {
nextFunction = callback;
nextFunction = onCompleteCallback;

}
MSP.send_message(MSPCodes.MSP2_INAV_SET_TIMER_OUTPUT_MODE, buffer, false, nextFunction);
Expand Down
1 change: 1 addition & 0 deletions js/serial_backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ function onValidFirmware()

$('#tabs ul.mode-connected .tab_setup a').click();

updateEzTuneTabVisibility(true);
updateFirmwareVersion();
});
});
Expand Down
27 changes: 25 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ $(document).ready(function () {
var profile = parseInt($(this).val());
MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [profile], false, function () {
GUI.log(chrome.i18n.getMessage('pidTuning_LoadedProfile', [profile + 1]));
updateActivatedTab();
});
});

Expand All @@ -577,7 +576,6 @@ $(document).ready(function () {
var batteryprofile = parseInt($(this).val());
MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [batteryprofile], false, function () {
GUI.log(chrome.i18n.getMessage('loadedBatteryProfile', [batteryprofile + 1]));
updateActivatedTab();
});
});
});
Expand Down Expand Up @@ -717,3 +715,28 @@ function updateFirmwareVersion() {
globalSettings.docsTreeLocation = 'https://github.com/iNavFlight/inav/blob/master/docs/';
}
}

function updateEzTuneTabVisibility(loadMixerConfig) {
let useEzTune = true;
if (CONFIGURATOR.connectionValid) {
if (loadMixerConfig) {
mspHelper.loadMixerConfig(function() {
if (MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER) {
$('.tab_ez_tune').removeClass("is-hidden");
} else {
$('.tab_ez_tune').addClass("is-hidden");
useEzTune = false;
}
});
} else {
if (MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER) {
$('.tab_ez_tune').removeClass("is-hidden");
} else {
$('.tab_ez_tune').addClass("is-hidden");
useEzTune = false;
}
}
}

return useEzTune;
}
36 changes: 18 additions & 18 deletions resources/osd/analogue/bold.mcm
Original file line number Diff line number Diff line change
Expand Up @@ -16068,34 +16068,37 @@ MAX7456
01010101
01010101
01010101
01010101
01010101
01010101
01010101
00010101
01010101
01010100
01010101
10000101
01010101
01010010
00010101
10100001
01010101
01001010
10101000
01010101
01010000
10000001
01010101
01010100
10000101
01010101
00101010
10100001
01010000
10000001
01010101
01000010
00000101
01001010
10101000
01010100
01010010
00010101
10100001
01010010
00010010
00010101
00010100
10000101
01010010
10000100
01010101
10000101
00010101
01001010
10000101
01000101
Expand Down Expand Up @@ -16130,9 +16133,6 @@ MAX7456
01010101
01010101
01010101
01010101
01010101
01010101
01010100
00010000
00010101
Expand Down
Binary file modified resources/osd/analogue/bold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 18 additions & 18 deletions resources/osd/analogue/clarity.mcm
Original file line number Diff line number Diff line change
Expand Up @@ -16068,34 +16068,37 @@ MAX7456
01010101
01010101
01010101
01010101
01010101
01010101
01010101
00010101
01010101
01010100
01010101
10000101
01010101
01010010
00010101
10100001
01010101
01001010
10101000
01010101
01010000
10000001
01010101
01010100
10000101
01010101
00101010
10100001
01010000
10000001
01010101
01000010
00000101
01001010
10101000
01010100
01010010
00010101
10100001
01010010
00010010
00010101
00010100
10000101
01010010
10000100
01010101
10000101
00010101
01001010
10000101
01000101
Expand Down Expand Up @@ -16130,9 +16133,6 @@ MAX7456
01010101
01010101
01010101
01010101
01010101
01010101
01010100
00010000
00010101
Expand Down
Binary file modified resources/osd/analogue/clarity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading