@@ -5,7 +5,7 @@ import MSP from "../msp";
55import FC from "../fc" ;
66import MSPCodes from "../msp/MSPCodes" ;
77import adjustBoxNameIfPeripheralWithModeID from "../peripherals" ;
8- import { API_VERSION_1_43 , API_VERSION_1_44 , API_VERSION_1_45 } from "../data_storage" ;
8+ import { API_VERSION_1_43 , API_VERSION_1_44 , API_VERSION_1_45 , API_VERSION_1_46 } from "../data_storage" ;
99import semver from 'semver' ;
1010
1111const failsafe = { } ;
@@ -295,14 +295,18 @@ failsafe.initialize = function (callback) {
295295 }
296296
297297 if ( semver . gte ( FC . CONFIG . apiVersion , API_VERSION_1_44 ) ) {
298+ if ( semver . gte ( FC . CONFIG . apiVersion , API_VERSION_1_46 ) ) {
299+ $ ( 'input[name="gps_rescue_min_dth"]' ) . attr ( "min" , 10 ) ;
300+ } else if ( semver . gte ( FC . CONFIG . apiVersion , API_VERSION_1_45 ) ) {
301+ $ ( 'input[name="gps_rescue_min_dth"]' ) . attr ( "min" , 20 ) ;
302+ }
303+
298304 $ ( 'input[name="gps_rescue_min_dth"]' ) . val ( FC . GPS_RESCUE . minRescueDth ) ;
299305 } else {
300306 $ ( 'input[name="gps_rescue_min_dth"]' ) . closest ( '.number' ) . hide ( ) ;
301307 }
302308
303- if ( semver . gte ( FC . CONFIG . apiVersion , API_VERSION_1_45 ) ) {
304- $ ( 'input[name="gps_rescue_min_dth"]' ) . attr ( "min" , 20 ) ;
305- }
309+
306310
307311 $ ( 'a.save' ) . click ( function ( ) {
308312 // gather data that doesn't have automatic change event bound
0 commit comments