Hi all,
I’ve enabled the USER_PARAMS feature and added some extra parameters for an algorithm I’m working on. However, the default parameter values are not being applied and the params are always initialized to zero.
For instance, AP_GROUPINFO("_WV_CUTOFF", 14, UserParameters, wv_cutoff, 0.06f). The last argument of this function does nothing. I don’t know how to fix this myself.
I’ve also enabled the USERHOOK_AUXSWITCH. But there were compilation errors. I traced down the problem and found that channel_flag typedef changed. I fixed it by editing the RC_Channel.cpp to look like this:
#ifdef USERHOOK_AUXSWITCH
case AUX_FUNC::USER_FUNC1:
if (ch_flag == AuxSwitchPos::HIGH) {
copter.userhook_auxSwitch1();
}
break;
case AUX_FUNC::USER_FUNC2:
if (ch_flag == AuxSwitchPos::HIGH) {
copter.userhook_auxSwitch2();
}
break;
case AUX_FUNC::USER_FUNC3:
if (ch_flag == AuxSwitchPos::HIGH) {
copter.userhook_auxSwitch3();
}
break;
#endif