File tree Expand file tree Collapse file tree 2 files changed +30
-13
lines changed
Expand file tree Collapse file tree 2 files changed +30
-13
lines changed Original file line number Diff line number Diff line change @@ -156,19 +156,21 @@ var
156156 "FIR" ,
157157 ] ) ,
158158
159- DEBUG_MODE = makeReadOnly ( [
160- "NONE" ,
161- "CYCLETIME" ,
162- "BATTERY" ,
163- "GYRO" ,
164- "ACCELEROMETER" ,
165- "MIXER" ,
166- "AIRMODE" ,
167- "PIDLOOP" ,
168- "NOTCH" ,
169- "RC_INTERPOLATION" ,
170- "VELOCITY" ,
171- "DTERM_FILTER" ,
159+ DEBUG_MODE = [ ] ,
160+
161+ DEBUG_MODE_COMPLETE = makeReadOnly ( [
162+ "NONE" ,
163+ "CYCLETIME" ,
164+ "BATTERY" ,
165+ "GYRO" ,
166+ "ACCELEROMETER" ,
167+ "MIXER" ,
168+ "AIRMODE" ,
169+ "PIDLOOP" ,
170+ "NOTCH" ,
171+ "RC_INTERPOLATION" ,
172+ "VELOCITY" ,
173+ "DTERM_FILTER" ,
172174 "ANGLERATE" ,
173175 "ESC_SENSOR" ,
174176 "SCHEDULER" ,
248250 "LANDING" ,
249251 "LANDED"
250252 ] ) ;
253+
254+ function adjustFieldDefsList ( firmwareType , firmwareVersion ) {
255+ if ( ( firmwareType == FIRMWARE_TYPE_BETAFLIGHT ) && semver . gte ( firmwareVersion , '3.3.0' ) ) {
256+ DEBUG_MODE = DEBUG_MODE_COMPLETE . slice ( 0 ) ;
257+ DEBUG_MODE . splice ( DEBUG_MODE . indexOf ( 'MIXER' ) , 1 ) ;
258+ DEBUG_MODE . splice ( DEBUG_MODE . indexOf ( 'AIRMODE' ) , 1 ) ;
259+ DEBUG_MODE . splice ( DEBUG_MODE . indexOf ( 'VELOCITY' ) , 1 ) ;
260+ DEBUG_MODE . splice ( DEBUG_MODE . indexOf ( 'DFILTER' ) , 1 ) ;
261+ DEBUG_MODE = makeReadOnly ( DEBUG_MODE ) ;
262+ } else {
263+ DEBUG_MODE = DEBUG_MODE_COMPLETE ;
264+ }
265+ }
Original file line number Diff line number Diff line change @@ -1372,6 +1372,8 @@ var FlightLogParser = function(logData) {
13721372 }
13731373 }
13741374
1375+ adjustFieldDefsList ( that . sysConfig . firmwareType , that . sysConfig . firmwareVersion ) ;
1376+
13751377 if ( ! isFrameDefComplete ( this . frameDefs . I ) ) {
13761378 throw "Log is missing required definitions for I frames, header may be corrupt" ;
13771379 }
You can’t perform that action at this time.
0 commit comments