From ef3374b0c2d728cdaa167ec2c233ac02d09253c5 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Wed, 19 Aug 2015 11:57:39 +0200 Subject: [PATCH] ROMFS: Add transitional support for RC map default reset in --- ROMFS/px4fmu_common/init.d/rcS | 64 ++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index dfa3af4a79..2f474fa539 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -89,6 +89,70 @@ then fi fi + # Compare existing params and save defaults + # this only needs to be in for 1-2 releases + if param compare RC_MAP_THROTTLE 0 + then + # So this is a default setup, + # now lets find out if channel 3 + # is calibrated + if param compare RC3_MIN 1000 + then + # This is default, do nothing + else + # Set old default + param set RC_MAP_THROTTLE 3 + fi + fi + + # Compare existing params and save defaults + # this only needs to be in for 1-2 releases + if param compare RC_MAP_ROLL 0 + then + # So this is a default setup, + # now lets find out if channel 3 + # is calibrated + if param compare RC1_MIN 1000 + then + # This is default, do nothing + else + # Set old default + param set RC_MAP_ROLL 1 + fi + fi + + # Compare existing params and save defaults + # this only needs to be in for 1-2 releases + if param compare RC_MAP_PITCH 0 + then + # So this is a default setup, + # now lets find out if channel 3 + # is calibrated + if param compare RC2_MIN 1000 + then + # This is default, do nothing + else + # Set old default + param set RC_MAP_ROLL 2 + fi + fi + + # Compare existing params and save defaults + # this only needs to be in for 1-2 releases + if param compare RC_MAP_YAW 0 + then + # So this is a default setup, + # now lets find out if channel 3 + # is calibrated + if param compare RC4_MIN 1000 + then + # This is default, do nothing + else + # Set old default + param set RC_MAP_ROLL 4 + fi + fi + # # Start system state indicator #