WARNING: All protocols shoul dbe testing on stock board again.
Fixed a number of problems relating to the (dis)enabling of hardware
switched PPM_OUT for the G9XV4 board. I also broke a lot of stuff along
the way over several previous commits, as I slowly learned how all the
code went together and the 'whys' for some stuff. My bad.
In other words, this commit finally has DSM2=PPM mode working on the
G9XV4 board without breaking a bunch of other stuff -- hopefully.
!! STOCK BOARD TESTING NEEDED !!
I am pretty sure I have not broken anything for the stock board code --
BUT it MUST be tested before the next release, because I have made quite
a few changes in and around that code.
added to DSM2=SERIAL code.
Hopefully also fixed DSMX mode bind omission from previous commit.
IMPORTANT: I do not have a DSMX module for testing -- only DSM2. Can someone
with DSM2=PPM mode and DSMX please test and confirm that both bind and range
check mode are working. Thanks.
I have modified the DSM2=PPM code to implelent bind and range check the
same way as for DSM2=SERIAL.
NOTE: I have checked for clean compile but do not have hardware to test
that the protocol is working correctly. PLEASE TEST. Thanks.
Tidied up Timer1 ISR code -- numerous little issues resolved, comments corrected.
Obviously, anything to do with this ISR requires thorough physical testing.
I have tested DSM2_SERIAL and the PCBV4 PPM_out is working properly. Someone
should double-check PPM/16/sim and I guess DSM2=PPM, on the stock board.
Thanks.
However, I don't like that the only place I could find to turn off range check mode when the SETUP menus is exited, was in popMenu ...
void popMenu()
{
if (g_menuStackPtr>0) {
#ifdef DSM2
s_rangecheck_mode = 0;
#endif
...
}
It was the only way I could find to trap the event of [EXIT long] being pressed
while in the RANGE field and s_editMode==true. But this solution gets executed
for all menu exits -- not just menuProcModels. It works, but there must be a
more eloquent method?
(It only took me about an hour and a half! :-/)
Also increased max filename length handled by "Restore Model" to 16 chars
(only when long filename support is configured in FatFs/ffconf.h)
Bertrand: I had to comment out a call to sdPollmS() as it doesn't seem to exist.
Hopefully the system freeze when I try to select "Restore Model" is
just a symptom of this same issue ... though I fear not.
Half -- because I don't yet know how to make warning sounds in this
new code. HELP! :P
... otherwise it's working. I have confirmed that
the range check bit appears on the scope, while watching the DSM2
data stream.