Open GoogleCodeExporter opened 8 years ago
To further elaborate on the commands
I've followed Andrew's lead throughout and so MotorControl Commands are
implemented almost exactly as with the classic direct motor commands. The only
real difference is that SetMotorControlState() also has an 'IsMotorReady'
command send this to the brick and then use GetMotorControlState() to retrieve
the response from the brick.
Original comment by wilmotst...@gmail.com
on 10 Aug 2011 at 4:00
The idea seems to be interesting, however did not try running it ...
Anyway, few comment about the code:
1) Personally I would prefer having additional class, which interfaces with the
MotorControl application. This application is not standard and is not loaded
onto NXT brick by default. So I would prefer keeping all custom stuff in a
separate class. Plus it will increase maintainability of the code.
2) Documentation for new methods does not say anything about the fact that user
must load additional RXE onto the brick to make those commands working.
3) Camel notation must be used and underscores should be avoided. Thing like
CONTROLLED_MOTORCMD are not acceptable. It should be ControlledMotorCommand,
for example.
4) Documentation like this is not acceptable, since it does not really tell
much: "<returns>Returns Boolean result of Message.</returns>". If the intention
was to write something like "/// <returns>Returns true if command was executed
successfully or false otherwise.</returns>", then it must be written so.
5)
/// <summary>
/// Not yet implemented.
/// </summary>
JUMBOPACKET = 0x35,
If it is not implemented, then why do we need it in documentation? It could be
put as a comment in code, so developers could see it, but does not have much
sense when exposed to user. Plus SetMotorControlState() does not throw
exception or anything to tell about unsupported command.
6)
>> GetMotorControlState() returns whether the motor is running or not.
>>Currently this seems to have a 1 or 2sec delay and doesn't work as well
>> as I'd like.
Does not sound nice :(
Original comment by andrew.k...@gmail.com
on 23 Aug 2011 at 1:19
Original comment by andrew.k...@gmail.com
on 8 Feb 2012 at 10:02
Original issue reported on code.google.com by
wilmotst...@gmail.com
on 10 Aug 2011 at 3:50