In the latest MatrixPilot source code, in the file rollCntrl.c , at around line 125, there's this function call:
rollAccum._.W1 = determine_navigation_deflection( 'r' ) ;
But when I look inside the implementation of determine_navigation_deflection, I do not see it using the char 'r', is this a mistake?
Thanks,
Hieu
Replies
Hi Hieu,
You're right that the 2.5.1 code was confusing, and that the 'r' you mention should have been an 'a'. But it turned out not to matter since the code just checked for 'h' or 'y', and treated everything else as an 'a'. But it was messy, and so it was all cleaned up in the more recent development code. This code is available in the subversion repository that Pete linked to, and this fix will be released as part of MatrixPilot 3.0 in the coming weeks.
Thanks for bringing this up, and if I've still missed something in there, please let me know!
Ben
Hieu, It's an interesting question. I'll ask Ben to respond (author of the code). Pete
Ben, (and others),
The call is made here (in current trunk development),
and the routine that responds to thecall is here.
I believe this routine used only macros in the past (MP2.5.1) and but now uses a case statement, and that may be the reason for the code being like this.
Pete