SetOutputState direct command turn ratio not working
Posted: 04 Jan 2012, 17:49
Hey guys. I have a question about the turn ratio parameter for the SetOutputState direct command. I understand what it is supposed to do--that is, set the speed of a motor relative to the speed of the motor to which it is synchronized--but it does not seem to be working for me. Here is my code (Objective-C):
Unfortunately, this does not effect any sort of turning. Calls to GetOutputState for both motors (B and C) reveal that their turn ratios are correctly set to 100 and 0, respectively. So I do not understand why this isn't working. I am using the enhanced NXC/NBC firmware, v. 1.31. Any help would be appreciated.
Code: Select all
[anNXT setOutputState:kNXTMotorB
power:75
mode:kNXTMotorOn
regulationMode:kNXTRegulationModeMotorSync
turnRatio:100
runState:kNXTMotorRunStateRunning
tachoLimit:0];
[anNXT setOutputState:kNXTMotorC
power:75
mode:kNXTMotorOn
regulationMode:kNXTRegulationModeMotorSync
turnRatio:0
runState:kNXTMotorRunStateRunning
tachoLimit:0];