Skip to content

Commit

Permalink
Merge pull request #2119 from iNavFlight/dzikuvx-fix-wizard-gps-step
Browse files Browse the repository at this point in the history
Fix GPS wizard step in case no GPS port is preselected
  • Loading branch information
DzikuVx authored Jun 22, 2024
2 parents 16f62ed + abb6b51 commit beca79d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions js/wizard_ui_bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,11 @@ const wizardUiBindings = (function () {

$port.on('change', function () {
let port = $(this).val();

let portConfig = serialPortHelper.getPortByIdentifier(currentPort);
$baud.val(portConfig.sensors_baudrate);

$baud.val(serialPortHelper.getRuleByName('GPS').defaultBaud);
if (port == -1) {
$('#wizard-gps-baud-container').hide();
$('#wizard-gps-protocol-container').hide();
$baud.val(serialPortHelper.getRuleByName('GPS').defaultBaud);
} else {
$('#wizard-gps-baud-container').show();
$('#wizard-gps-protocol-container').show();
Expand Down

0 comments on commit beca79d

Please sign in to comment.