From 84aef17bb023232f6bd5df7fe8f2b5e75927cb86 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 12 Feb 2012 20:26:44 +1100 Subject: [PATCH] fixed initialisation of RC_Channel class --- libraries/RC_Channel/RC_Channel.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/libraries/RC_Channel/RC_Channel.h b/libraries/RC_Channel/RC_Channel.h index 24e281a978..80d2c99101 100644 --- a/libraries/RC_Channel/RC_Channel.h +++ b/libraries/RC_Channel/RC_Channel.h @@ -18,8 +18,16 @@ class RC_Channel{ /// @param key EEPROM storage key for the channel trim parameters. /// @param name Optional name for the group. /// - RC_Channel() - {} + RC_Channel() : + radio_min (1100), + radio_trim(1500), + radio_max (1900), + _high(1), + _filter(false), + _reverse(1), + _dead_zone(0), + scale_output(1.0) + {} // setup min and max radio values in CLI void update_min_max(); @@ -86,12 +94,10 @@ class RC_Channel{ static const struct AP_Param::GroupInfo var_info[]; - AP_Int8 _reverse; - AP_Int16 _dead_zone; - private: bool _filter; - //int16_t _dead_zone; // used to keep noise down and create a dead zone. + AP_Int8 _reverse; + AP_Int16 _dead_zone; uint8_t _type; int16_t _high; int16_t _low;