1
1
import FC from "./fc.js" ;
2
- import { API_VERSION_1_46 , API_VERSION_1_47 } from "./data_storage " ;
3
- import semver from "semver " ;
2
+ import compareVersions from "./utils/compareVersions.js " ;
3
+ import { API_VERSION_1_46 , API_VERSION_25_12 } from "./data_storage " ;
4
4
import { removeArrayElement , addArrayElement , replaceArrayElement , addArrayElementAfter } from "./utils/array" ;
5
5
6
6
const DEBUG = {
@@ -809,7 +809,7 @@ const DEBUG = {
809
809
} ;
810
810
811
811
function update ( ) {
812
- if ( semver . gte ( FC . CONFIG . apiVersion , API_VERSION_1_46 ) ) {
812
+ if ( compareVersions . gte ( FC . CONFIG . apiVersion , API_VERSION_1_46 ) ) {
813
813
DEBUG . fieldNames . ATTITUDE = {
814
814
"debug[all]" : "Attitude" ,
815
815
"debug[0]" : "Roll Angle" ,
@@ -823,7 +823,7 @@ function update() {
823
823
} ;
824
824
}
825
825
826
- if ( semver . gte ( FC . CONFIG . apiVersion , API_VERSION_1_47 ) ) {
826
+ if ( compareVersions . gte ( FC . CONFIG . apiVersion , API_VERSION_25_12 ) ) {
827
827
replaceArrayElement ( DEBUG . modes , "GPS_RESCUE_THROTTLE_PID" , "AUTOPILOT_ALTITUDE" ) ;
828
828
removeArrayElement ( DEBUG . modes , "GYRO_SCALED" ) ;
829
829
addArrayElementAfter ( DEBUG . modes , "RANGEFINDER_QUALITY" , "OPTICALFLOW" ) ;
@@ -835,7 +835,7 @@ function update() {
835
835
836
836
delete DEBUG . fieldNames . GPS_RESCUE_THROTTLE_PID ;
837
837
delete DEBUG . fieldNames . GYRO_SCALED ;
838
-
838
+
839
839
DEBUG . fieldNames [ "MULTI_GYRO_RAW" ] = DEBUG . fieldNames . DUAL_GYRO_RAW ;
840
840
DEBUG . fieldNames [ "MULTI_GYRO_DIFF" ] = DEBUG . fieldNames . DUAL_GYRO_DIFF ;
841
841
DEBUG . fieldNames [ "MULTI_GYRO_SCALED" ] = DEBUG . fieldNames . DUAL_GYRO_SCALED ;
0 commit comments