From cb9ba84ed4682cde6d19aaf339785bd073e1fbc4 Mon Sep 17 00:00:00 2001 From: ctzsnooze Date: Mon, 8 Aug 2022 11:28:54 +1000 Subject: [PATCH 1/2] Provide reasonable scales for Altitude debug graph --- js/graph_config.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/js/graph_config.js b/js/graph_config.js index d928956c..0dccf634 100644 --- a/js/graph_config.js +++ b/js/graph_config.js @@ -737,6 +737,33 @@ 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); + } } } // if not found above then From 356cf0cd35bec5981be6aa162e0c1a05b439afea Mon Sep 17 00:00:00 2001 From: ctzsnooze Date: Mon, 8 Aug 2022 11:52:53 +1000 Subject: [PATCH 2/2] provide usable scales for Baro debug --- js/graph_config.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/js/graph_config.js b/js/graph_config.js index 0dccf634..8961e810 100644 --- a/js/graph_config.js +++ b/js/graph_config.js @@ -764,6 +764,27 @@ GraphConfig.load = function(config) { 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