mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-13 11:29:53 +03:00
Add Assistnow Key configuration and some basic build setup
This commit is contained in:
parent
05f6d3e8df
commit
e497b7f360
6 changed files with 31 additions and 0 deletions
|
@ -89,6 +89,7 @@ sources.js = [
|
||||||
'./js/msp/MSPCodes.js',
|
'./js/msp/MSPCodes.js',
|
||||||
'./js/msp/MSPHelper.js',
|
'./js/msp/MSPHelper.js',
|
||||||
'./js/msp/MSPchainer.js',
|
'./js/msp/MSPchainer.js',
|
||||||
|
'./js/ublox/UBLOX.js',
|
||||||
'./js/port_handler.js',
|
'./js/port_handler.js',
|
||||||
'./js/connection/connection.js',
|
'./js/connection/connection.js',
|
||||||
'./js/connection/connectionBle.js',
|
'./js/connection/connectionBle.js',
|
||||||
|
|
|
@ -81,6 +81,7 @@ $(function() {
|
||||||
globalSettings.unitType = store.get('unit_type', UnitType.none);
|
globalSettings.unitType = store.get('unit_type', UnitType.none);
|
||||||
globalSettings.mapProviderType = store.get('map_provider_type', 'osm');
|
globalSettings.mapProviderType = store.get('map_provider_type', 'osm');
|
||||||
globalSettings.mapApiKey = store.get('map_api_key', '');
|
globalSettings.mapApiKey = store.get('map_api_key', '');
|
||||||
|
globalSettings.assistnowApiKey = store.get('assistnow_api_key', '');
|
||||||
globalSettings.proxyURL = store.get('proxyurl', 'http://192.168.1.222/mapproxy/service?');
|
globalSettings.proxyURL = store.get('proxyurl', 'http://192.168.1.222/mapproxy/service?');
|
||||||
globalSettings.proxyLayer = store.get('proxylayer', 'your_proxy_layer_name');
|
globalSettings.proxyLayer = store.get('proxylayer', 'your_proxy_layer_name');
|
||||||
globalSettings.showProfileParameters = store.get('show_profile_parameters', 1);
|
globalSettings.showProfileParameters = store.get('show_profile_parameters', 1);
|
||||||
|
@ -340,6 +341,7 @@ $(function() {
|
||||||
$('#proxylayer').val(globalSettings.proxyLayer);
|
$('#proxylayer').val(globalSettings.proxyLayer);
|
||||||
$('#showProfileParameters').prop('checked', globalSettings.showProfileParameters);
|
$('#showProfileParameters').prop('checked', globalSettings.showProfileParameters);
|
||||||
$('#cliAutocomplete').prop('checked', globalSettings.cliAutocomplete);
|
$('#cliAutocomplete').prop('checked', globalSettings.cliAutocomplete);
|
||||||
|
$('#assistnow-api-key').val(globalSettings.assistnowApiKey);
|
||||||
|
|
||||||
i18n.getLanguages().forEach(lng => {
|
i18n.getLanguages().forEach(lng => {
|
||||||
$('#languageOption').append("<option value='{0}'>{1}</option>".format(lng, i18n.getMessage("language_" + lng)));
|
$('#languageOption').append("<option value='{0}'>{1}</option>".format(lng, i18n.getMessage("language_" + lng)));
|
||||||
|
@ -383,6 +385,11 @@ $(function() {
|
||||||
store.set('proxylayer', $(this).val());
|
store.set('proxylayer', $(this).val());
|
||||||
globalSettings.proxyLayer = $(this).val();
|
globalSettings.proxyLayer = $(this).val();
|
||||||
});
|
});
|
||||||
|
$('#assistnow-api-key').on('change', function () {
|
||||||
|
store.set('assistnow_api_key', $(this).val());
|
||||||
|
globalSettings.assistnowApiKey = $(this).val();
|
||||||
|
});
|
||||||
|
|
||||||
$('#demoModeReset').on('click', function () {
|
$('#demoModeReset').on('click', function () {
|
||||||
SITLProcess.deleteEepromFile('demo.bin');
|
SITLProcess.deleteEepromFile('demo.bin');
|
||||||
});
|
});
|
||||||
|
|
|
@ -21,6 +21,7 @@ var globalSettings = {
|
||||||
// tree target for documents
|
// tree target for documents
|
||||||
docsTreeLocation: 'master',
|
docsTreeLocation: 'master',
|
||||||
cliAutocomplete: true,
|
cliAutocomplete: true,
|
||||||
|
assistnowApiKey: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = { globalSettings, UnitType };
|
module.exports = { globalSettings, UnitType };
|
|
@ -3383,6 +3383,10 @@ var mspHelper = (function () {
|
||||||
MSP.send_message(MSPCodes.MSP2_SET_CF_SERIAL_CONFIG, mspHelper.crunch(MSPCodes.MSP2_SET_CF_SERIAL_CONFIG), false, callback);
|
MSP.send_message(MSPCodes.MSP2_SET_CF_SERIAL_CONFIG, mspHelper.crunch(MSPCodes.MSP2_SET_CF_SERIAL_CONFIG), false, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.sendUbloxCommand = function (ubloxData, callback) {
|
||||||
|
MSP.send_message(MSPCodes.MSP2_INAV_GPS_UBLOX_COMMAND, ubloxData, false, callback);
|
||||||
|
};
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
|
@ -5911,5 +5911,11 @@
|
||||||
},
|
},
|
||||||
"maintenanceFlushSettingsCache": {
|
"maintenanceFlushSettingsCache": {
|
||||||
"message": "Flush settings cache"
|
"message": "Flush settings cache"
|
||||||
|
},
|
||||||
|
"gpsOptions": {
|
||||||
|
"message": "GPS Options"
|
||||||
|
},
|
||||||
|
"gpsOptionsAssistnowToken": {
|
||||||
|
"message": "AssitNow Token"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,5 +97,17 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="options-section gui_box grey">
|
||||||
|
<div class="gui_box_titlebar">
|
||||||
|
<div class="spacer_box_title" data-i18n="gpsOptions"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="spacer_box settings">
|
||||||
|
<div class="number">
|
||||||
|
<input type="password" id="assistnow-api-key" style="border: solid 1px black" />
|
||||||
|
<label for="assistnow-api-key" data-i18n="gpsOptionsAssistnowToken"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
Loading…
Add table
Add a link
Reference in a new issue