diff --git a/css/header_dialog.css b/css/header_dialog.css index 755c7704..f08accf9 100644 --- a/css/header_dialog.css +++ b/css/header_dialog.css @@ -290,7 +290,7 @@ select { .header-dialog table td, .header-dialog .pid_titlebar th { padding: 1px; - width: 20%; + width: 15%; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; } diff --git a/index.html b/index.html index a32de6b3..54cbb958 100644 --- a/index.html +++ b/index.html @@ -695,6 +695,9 @@ + + + @@ -714,6 +717,9 @@ + + + @@ -730,6 +736,9 @@ + + + @@ -746,6 +755,9 @@ + + + @@ -759,6 +771,7 @@ + @@ -774,6 +787,7 @@ + @@ -860,38 +874,6 @@
VEL
- - - - - - - - - - - - - - - -
D Min
- - - - - - - - - - - - - - -
- @@ -946,30 +928,6 @@
- - - - - - - - - - - - - -
TPA and Airmode
- - - - - - - - -
- @@ -1008,6 +966,50 @@
+ + + + + + + + + + + + +
D Min
+ + + + + +
+ + + + + + + + + + + + + + +
TPA and Airmode
+ + + + + + + + +
+ diff --git a/js/flightlog_parser.js b/js/flightlog_parser.js index 63129922..f2827e8e 100644 --- a/js/flightlog_parser.js +++ b/js/flightlog_parser.js @@ -806,13 +806,13 @@ var FlightLogParser = function(logData) { var expoParams = parseCommaSeparatedString(fieldValue); that.sysConfig.superExpoFactor = expoParams[0]; that.sysConfig.superExpoFactorYaw = expoParams[1]; - } else { that.sysConfig.superExpoFactor = parseInt(fieldValue, 10); } break; /* CSV packed values */ + case "rates": case "rate_limits": case "rollPID": @@ -831,24 +831,30 @@ var FlightLogParser = function(logData) { case "rc_smoothing_active_cutoffs_ff_sp_thr": case "gyro_lowpass_dyn_hz": case "dterm_lpf_dyn_hz": - case "d_min": that.sysConfig[fieldName] = parseCommaSeparatedString(fieldValue); break; case "magPID": that.sysConfig.magPID = parseCommaSeparatedString(fieldValue,3); //[parseInt(fieldValue, 10), null, null]; break; + case "d_min": + // Add Dmin values as Derivative numbers to PID array + var dMinValues = parseCommaSeparatedString(fieldValue); + that.sysConfig["rollPID"].push(dMinValues[0]); + that.sysConfig["pitchPID"].push(dMinValues[1]); + that.sysConfig["yawPID"].push(dMinValues[2]); + break; case "ff_weight": - // Add it to the end of the rollPID, pitchPID and yawPID + // Add feedforward values to the PID array var ffValues = parseCommaSeparatedString(fieldValue); that.sysConfig["rollPID"].push(ffValues[0]); that.sysConfig["pitchPID"].push(ffValues[1]); that.sysConfig["yawPID"].push(ffValues[2]); break; + /* End of CSV packed values */ case "vbatcellvoltage": var vbatcellvoltageParams = parseCommaSeparatedString(fieldValue); - that.sysConfig.vbatmincellvoltage = vbatcellvoltageParams[0]; that.sysConfig.vbatwarningcellvoltage = vbatcellvoltageParams[1]; that.sysConfig.vbatmaxcellvoltage = vbatcellvoltageParams[2]; @@ -856,14 +862,12 @@ var FlightLogParser = function(logData) { case "currentMeter": case "currentSensor": var currentMeterParams = parseCommaSeparatedString(fieldValue); - that.sysConfig.currentMeterOffset = currentMeterParams[0]; that.sysConfig.currentMeterScale = currentMeterParams[1]; break; case "gyro.scale": case "gyro_scale": that.sysConfig.gyroScale = hexToFloat(fieldValue); - /* Baseflight uses a gyroScale that'll give radians per microsecond as output, whereas Cleanflight produces degrees * per second and leaves the conversion to radians per us to the IMU. Let's just convert Cleanflight's scale to * match Baseflight so we can use Baseflight's IMU for both: */ diff --git a/js/header_dialog.js b/js/header_dialog.js index a72aaec8..7a7d77b9 100644 --- a/js/header_dialog.js +++ b/js/header_dialog.js @@ -235,7 +235,7 @@ function HeaderDialog(dialog, onSave) { case 0: if(data[i]!=null) { $(this).val((data[i]).toFixed(0)); - $(this).attr('decPl', 1); + $(this).attr('decPl', 0); $(this).removeClass('missing'); } else { $(this).addClass('missing'); @@ -245,7 +245,7 @@ function HeaderDialog(dialog, onSave) { case 1: if(data[i]!=null) { $(this).val((data[i]).toFixed(0)); - $(this).attr('decPl', 3); + $(this).attr('decPl', 0); $(this).removeClass('missing'); } else { $(this).addClass('missing'); @@ -265,7 +265,18 @@ function HeaderDialog(dialog, onSave) { case 3: if(data[i]!=null) { $(this).val(data[i].toFixed(0)); - $(this).attr('decPl', 2); + $(this).attr('decPl', 0); + $(this).removeClass('missing'); + } else { + $(this).val(''); + $(this).addClass('missing'); + } + i++; + break; + case 4: + if(data[i]!=null) { + $(this).val(data[i].toFixed(0)); + $(this).attr('decPl', 0); $(this).removeClass('missing'); } else { $(this).val('');