Open mkoval opened 14 years ago
IFI uses Timer4 for this. CCR{1,2} deal with the first one, CCR{3,4} with the second. See main.c::Set_MotorControl_Sw{1,2}, main.c::Set_MotorControl_To_Neutral(void), and main.c::Setup_timer4 in the original Vex_Default code.
Nice find. It should be pretty trivial to port this to Hax, although we will need to convert from signed to unsigned motor speeds as normal. Before we do anything, we must settle on a indexing convention that is somewhat intuitive. I'm inclined to make it have the same order as the physical labels (ie. 0 and 8 as high-strength motors).
There is no support for two-wire motors on the Cortex.