From d22271ce61b8414281dbac145a6089a6bf7cc538 Mon Sep 17 00:00:00 2001 From: tricopterY Date: Sun, 10 Jan 2016 13:25:03 +1100 Subject: [PATCH] Sanity Check 3D-Neutral limits --- tabs/motors.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tabs/motors.js b/tabs/motors.js index 1ddb0fcc..e950f5b9 100644 --- a/tabs/motors.js +++ b/tabs/motors.js @@ -318,6 +318,11 @@ TABS.motors.initialize = function (callback) { $('div.values li:not(:last)').text(MISC.mincommand); if(self.feature3DEnabled && self.feature3DSupported) { + //Arbitrary sanity checks + //Note: values may need to be revisited + if(_3D.neutral3d > 1575 || _3D.neutral3d < 1425) + _3D.neutral3d = 1500; + $('div.sliders input').val(_3D.neutral3d); } else { $('div.sliders input').val(MISC.mincommand); @@ -502,4 +507,4 @@ TABS.motors.initialize = function (callback) { TABS.motors.cleanup = function (callback) { if (callback) callback(); -}; \ No newline at end of file +};