ROBOTC.net forums
http://robotc.net/forums/

Motor Setup Problem
http://robotc.net/forums/viewtopic.php?f=63&t=5639
Page 1 of 1

Author:  Coder A [ Thu Mar 21, 2013 7:34 pm ]
Post subject:  Motor Setup Problem

I'm here to report a bug in the motors and sensors setup. The platform is NXT robotc 3.60, and when I am configuring the motors, even if I select that a motor is not equipped to a specific port, it comes up as equipped. That is, I select motor C as no motor equipped, hit the "apply" button, and it pops up as this in my code:

Code:
#pragma config(Sensor, S4,     sonic,          sensorSONAR)
#pragma config(Motor,  motorA,          steering,      tmotorNXT, PIDControl, encoder)
#pragma config(Motor,  motorB,          drive,         tmotorNXT, openLoop, encoder)
#pragma config(Motor,  motorC,           ,             tmotorNXT, openLoop) <-- this should not be here
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//



Also, next time I open the M&S setup screen, it shows that motor C is equipped.

Does anyone else experience this problem?

Thanks!

-Coder A

Author:  tfriez [ Mon Mar 25, 2013 9:41 am ]
Post subject:  Re: Motor Setup Problem

On the NXT platform, the three on-board motors are enabled by default with Encoders and PID control "features" enabled.

When you set a NXT on-board motor to "No Motor" and then hit the apply button, ROBOTC will undo this action because it won't allow an NXT motor to be disabled. The GUI solution (and the bug) is then to simply turn the motor back on but disable the Encoder the PID Control fields.

The Motors and Sensor Setup Pragma configuration generator will not generate pragma statements when a motor is in it's default position (for NXT: Enabled/Encoder/PID Control), but because the previous action of setting the GUI to "No Motor" disabled the Encoder and the PID Control checkboxes, the Pragma generator recognizes this is different from the default configuration and generates a Pragma statement to recognize this new configuration.

It's a pretty innocuousness bug, so I doubt we'll be rushing 3.61 out just to fix it :) - but, I'll add it to the development list for the next release/beta.

Author:  Coder A [ Mon Mar 25, 2013 2:51 pm ]
Post subject:  Re: Motor Setup Problem

O.K. , that makes sense. Thanks!

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/