1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-24 16:55:22 +03:00

Removed MSP parts

This commit is contained in:
Darren Lines 2022-08-15 18:02:07 +01:00
parent bd70d431c0
commit dac6ff3616

View file

@ -43,27 +43,13 @@ function generateFilename(prefix, suffix) {
if (CONFIG) {
if (CONFIG.flightControllerIdentifier) {
filename = CONFIG.flightControllerIdentifier + '_' + CONFIG.flightControllerVersion + "_" + filename;
}
}
if (CONFIG.name && CONFIG.name.trim() !== '') {
filename = filename + '_' + CONFIG.name.trim().replace(' ', '_');
}
} else {
// Attempt to get the version number and
MSPHelper.getSetting("version").then(function (data) {
if (data.value) {
let version = data.value.split('/')[0] + "_" + data.value.split(' ')[1];
filename = "" + version + "_" + filename;
}
});
MSPHelper.getSetting("name").then(function (data) {
if (data.value && data.value.trim() !== '') {
filename += "_" + data.value.trim().replace(' ', '_');
}
});
}
filename = filename + '_' + date.getFullYear()
+ zeroPad(date.getMonth() + 1, 2)
+ zeroPad(date.getDate(), 2)