Skip to content

Commit 7059dbe

Browse files
authored
Add GNNS VIRTUAL device option (betaflight#4298)
* Add GNNS VIRTUAL device option * Add earlier to show up * virtual gnss does not need auto config
1 parent aa09e59 commit 7059dbe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/js/tabs/gps.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { i18n } from "../localization";
22
import semver from "semver";
3-
import { API_VERSION_1_46 } from "../data_storage";
3+
import { API_VERSION_1_46, API_VERSION_1_47 } from "../data_storage";
44
import GUI, { TABS } from "../gui";
55
import FC from "../fc";
66
import MSP from "../msp";
@@ -90,6 +90,10 @@ gps.initialize = async function (callback) {
9090
// generate GPS
9191
const gpsProtocols = ["NMEA", "UBLOX", "MSP"];
9292

93+
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47)) {
94+
gpsProtocols.push("VIRTUAL");
95+
}
96+
9397
const gpsBaudRates = ["115200", "57600", "38400", "19200", "9600"];
9498

9599
const gpsSbas = [
@@ -150,7 +154,7 @@ gps.initialize = async function (callback) {
150154
gpsAutoBaudGroup.toggle(
151155
(ubloxSelected || mspSelected) && semver.lt(FC.CONFIG.apiVersion, API_VERSION_1_46),
152156
);
153-
gpsAutoConfigGroup.toggle(ubloxSelected || mspSelected);
157+
gpsAutoConfigGroup.toggle(ubloxSelected);
154158
})
155159
.prop("checked", FC.GPS_CONFIG.auto_config === 1)
156160
.trigger("change");

0 commit comments

Comments
 (0)