@@ -58,7 +58,9 @@ function HeaderDialog(dialog, onSave) {
5858 { name :'setpointRelaxRatio' , type :FIRMWARE_TYPE_BETAFLIGHT , min :'3.1.0' , max :'999.9.9' } ,
5959 { name :'antiGravityGain' , type :FIRMWARE_TYPE_BETAFLIGHT , min :'3.1.0' , max :'999.9.9' } ,
6060 { name :'antiGravityThreshold' , type :FIRMWARE_TYPE_BETAFLIGHT , min :'3.1.0' , max :'999.9.9' } ,
61- { name :'itermWindupPointPercent' , type :FIRMWARE_TYPE_BETAFLIGHT , min :'3.1.0' , max :'999.9.9' }
61+ { name :'itermWindupPointPercent' , type :FIRMWARE_TYPE_BETAFLIGHT , min :'3.1.0' , max :'999.9.9' } ,
62+ { name :'pidSumLimit' , type :FIRMWARE_TYPE_BETAFLIGHT , min :'3.3.0' , max :'999.9.9' } ,
63+ { name :'pidSumLimitYaw' , type :FIRMWARE_TYPE_BETAFLIGHT , min :'3.3.0' , max :'999.9.9' }
6264 ] ;
6365
6466 function isParameterValid ( name ) {
@@ -208,30 +210,35 @@ function HeaderDialog(dialog, onSave) {
208210 // generate features
209211 var features = [
210212 { bit : 0 , group : 'rxMode' , mode : 'group' , name : 'RX_PPM' , description : 'PPM Receiver Selected' } ,
211- { bit : 1 , group : 'battery' , name : 'VBAT' , description : 'Battery Monitoring' } ,
212213 { bit : 2 , group : 'other' , name : 'INFLIGHT_ACC_CAL' , description : 'In-flight level calibration' } ,
213214 { bit : 3 , group : 'rxMode' , mode : 'group' , name : 'RX_SERIAL' , description : 'Serial Receiver Selected' } ,
214215 { bit : 4 , group : 'other' , name : 'MOTOR_STOP' , description : 'Motor Stop on low throttle' } ,
215216 { bit : 5 , group : 'other' , name : 'SERVO_TILT' , description : 'Servo gimbal' } ,
216217 { bit : 6 , group : 'other' , name : 'SOFTSERIAL' , description : 'Enable CPU based serial port' } ,
217218 { bit : 7 , group : 'other' , name : 'GPS' , description : 'GPS device connected' } ,
218- { bit : 8 , group : 'other' , name : 'FAILSAFE' , description : 'Failsafe mode enabled' } ,
219219 { bit : 9 , group : 'other' , name : 'SONAR' , description : 'Sonar' } ,
220220 { bit : 10 , group : 'other' , name : 'TELEMETRY' , description : 'Telemetry Output' } ,
221- { bit : 11 , group : 'battery' , name : 'CURRENT_METER' , description : 'Battery current monitoring' } ,
222221 { bit : 12 , group : 'other' , name : '3D' , description : '3D mode (for use with reversible ESCs)' } ,
223222 { bit : 13 , group : 'rxMode' , mode : 'group' , name : 'RX_PARALLEL_PWM' , description : 'PWM receiver selected' } ,
224223 { bit : 14 , group : 'rxMode' , mode : 'group' , name : 'RX_MSP' , description : 'Controller over MSP' } ,
225224 { bit : 15 , group : 'other' , name : 'RSSI_ADC' , description : 'ADC RSSI Monitoring' } ,
226225 { bit : 16 , group : 'other' , name : 'LED_STRIP' , description : 'Addressible RGB LED strip support' } ,
227- { bit : 17 , group : 'other' , name : 'DISPLAY' , description : 'OLED Screen Display' } ,
228- { bit : 19 , group : 'other' , name : 'BLACKBOX' , description : 'Blackbox flight data recorder' } ,
226+ { bit : 17 , group : 'other' , name : 'DISPLAY' , description : 'OLED Screen Display' } ,
229227 { bit : 20 , group : 'other' , name : 'CHANNEL_FORWARDING' , description : 'Forward aux channels to servo outputs' } ,
230- { bit : 21 , group : 'other' , name : 'TRANSPONDER' , description : 'Transponder enabled' }
228+ { bit : 21 , group : 'other' , name : 'TRANSPONDER' , description : 'Race Transponder' } ,
231229 ] ;
232230
233231
234- // Add specific features for betaflight v2.8 onwards....
232+ // Add specific features for betaflight v2.8 onwards....
233+ if ( semver . lte ( sysConfig . firmwareVersion , "3.2.0" ) ) {
234+ features . push (
235+ { bit : 1 , group : 'battery' , name : 'VBAT' , description : 'Battery Monitoring' } ,
236+ { bit : 11 , group : 'battery' , name : 'CURRENT_METER' , description : 'Battery current monitoring' } ,
237+ { bit : 8 , group : 'other' , name : 'FAILSAFE' , description : 'Failsafe mode enabled' } ,
238+ { bit : 19 , group : 'other' , name : 'BLACKBOX' , description : 'Blackbox flight data recorder' } ,
239+ ) ;
240+ }
241+
235242 if ( semver . gte ( sysConfig . firmwareVersion , "2.8.0" ) ) {
236243 features . push (
237244 { bit : 22 , group : 'other' , name : 'AIRMODE' , description : 'Airmode always enabled, set off to use modes' }
@@ -258,7 +265,9 @@ function HeaderDialog(dialog, onSave) {
258265
259266 if ( semver . gte ( sysConfig . firmwareVersion , "3.1.0" ) ) {
260267 features . push (
261- { bit : 27 , group : 'other' , name : 'ESC_SENSOR' , description : 'Use KISS ESC 24A telemetry as sensor' }
268+ { bit : 27 , group : 'other' , name : 'ESC_SENSOR' , description : 'Use KISS ESC 24A telemetry as sensor' } ,
269+ { bit : 28 , group : 'other' , name : 'ANTI_GRAVITY' , description : 'Temporary boost I-Term on high throttle changes' } ,
270+ { bit : 29 , group : 'other' , name : 'DYNAMIC_FILTER' , description : 'Dynamic gyro notch filtering' }
262271 )
263272 }
264273
@@ -516,7 +525,9 @@ function HeaderDialog(dialog, onSave) {
516525 setParameter ( 'digitalIdleOffset' , sysConfig . digitalIdleOffset , 2 ) ;
517526 setParameter ( 'antiGravityGain' , sysConfig . anti_gravity_gain , 0 ) ;
518527 setParameter ( 'antiGravityThreshold' , sysConfig . anti_gravity_threshold , 0 ) ;
519- setParameter ( 'setpointRelaxRatio' , sysConfig . setpointRelaxRatio , 2 ) ;
528+ setParameter ( 'setpointRelaxRatio' , sysConfig . setpointRelaxRatio , 2 ) ;
529+ setParameter ( 'pidSumLimit' , sysConfig . pidSumLimit , 0 ) ;
530+ setParameter ( 'pidSumLimitYaw' , sysConfig . pidSumLimitYaw , 0 ) ;
520531
521532 /* Packed Flags */
522533
@@ -622,8 +633,10 @@ function HeaderDialog(dialog, onSave) {
622633
623634 this . show = function ( sysConfig ) {
624635 dialog . modal ( 'show' ) ;
625- renderSysConfig ( sysConfig ) ;
626-
636+ renderSysConfig ( sysConfig ) ;
637+ // Disable changing input and dropdowns
638+ $ ( '#dlgHeaderDialog input' ) . prop ( 'disabled' , 'disabled' ) ;
639+ $ ( '#dlgHeaderDialog select' ) . prop ( 'disabled' , 'disabled' ) ;
627640 }
628641
629642 // Buttons
0 commit comments