Skip to content

Commit fb92627

Browse files
authored
Set gyro_sample graph scaling to the same as other gyro graphs (#700)
set gyro_sample graph scaling to the same as others
1 parent a11ed06 commit fb92627

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

js/graph_config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,21 @@ GraphConfig.load = function(config) {
725725
default:
726726
return getCurveForMinMaxFields(fieldName);
727727
}
728+
case 'GYRO_SAMPLE':
729+
switch (fieldName) {
730+
case 'debug[0]': // Before downsampling
731+
case 'debug[1]': // After downsampling
732+
case 'debug[2]': // After RPM
733+
case 'debug[3]': // After all but Dyn Notch
734+
return {
735+
offset: 0,
736+
power: 0.25, /* Make this 1.0 to scale linearly */
737+
inputRange: maxDegreesSecond(gyroScaleMargin * highResolutionScale), // Maximum grad/s + 20%
738+
outputRange: 1.0
739+
};
740+
default:
741+
return getCurveForMinMaxFields(fieldName);
742+
}
728743
case 'RX_TIMING':
729744
switch (fieldName) {
730745
case 'debug[0]': // CRC 0 to max int16_t

0 commit comments

Comments
 (0)