Skip to content

Commit

Permalink
Remove autobaud and autoconfig for NMEA
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed Feb 8, 2023
1 parent c5b8c77 commit 48e6abb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/js/tabs/gps.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,22 @@ gps.initialize = async function (callback) {

gpsAutoBaudElement.prop('checked', FC.GPS_CONFIG.auto_baud === 1);

gpsAutoConfigElement.change(function () {
gpsAutoConfigElement.on('change', function () {
const checked = $(this).is(":checked");

const ubloxSelected = FC.GPS_CONFIG.provider === gpsProtocols.indexOf('UBLOX');
const mspSelected = FC.GPS_CONFIG.provider === gpsProtocols.indexOf('MSP');

const enableGalileoVisible = checked && ubloxSelected && semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43);
gpsUbloxGalileoGroup.toggle(enableGalileoVisible);

const enableSbasVisible = checked && ubloxSelected;
gpsUbloxSbasGroup.toggle(enableSbasVisible);

}).prop('checked', FC.GPS_CONFIG.auto_config === 1).change();
gpsAutoBaudGroup.toggle(ubloxSelected || mspSelected);
gpsAutoConfigGroup.toggle(ubloxSelected || mspSelected);

gpsAutoBaudGroup.show();
gpsAutoConfigGroup.show();
}).prop('checked', FC.GPS_CONFIG.auto_config === 1).trigger('change');

gpsUbloxGalileoElement.change(function() {
FC.GPS_CONFIG.ublox_use_galileo = $(this).is(':checked') ? 1 : 0;
Expand Down

0 comments on commit 48e6abb

Please sign in to comment.