diff --git a/js/graph_config.js b/js/graph_config.js index d928956c..8961e810 100644 --- a/js/graph_config.js +++ b/js/graph_config.js @@ -737,6 +737,54 @@ GraphConfig.load = function(config) { default: return getCurveForMinMaxFields(fieldName); } + case 'ALTITUDE': + switch (fieldName) { + case 'debug[0]': // GPS Trust + return { + offset: 0, + power: 1.0, + inputRange: 200, + outputRange: 1.0, + }; + case 'debug[1]': // Baro Alt + case 'debug[2]': // GPS Alt + return { + offset: 0, + power: 1.0, + inputRange: 5000, + outputRange: 1.0, + }; + case 'debug[3]': // Vario + return { + offset: 0, + power: 1.0, + inputRange: 500, + outputRange: 1.0, + }; + default: + return getCurveForMinMaxFields(fieldName); + } + case 'BARO': + switch (fieldName) { + case 'debug[0]': // Baro state 0-10 + return { + offset: 0, + power: 1.0, + inputRange: 20, + outputRange: 1.0, + }; + case 'debug[1]': // Baro Temp + case 'debug[2]': // Baro Raw + case 'debug[3]': // Baro smoothed + return { + offset: 0, + power: 1.0, + inputRange: 2000, + outputRange: 1.0, + }; + default: + return getCurveForMinMaxFields(fieldName); + } } } // if not found above then