schodet/nxt-python

Help with motorconotrl

Svein-Tore opened this issue · 1 comments

I want to uset he Linus Atorf's motor control. Going to the code motcont.py I see I first have to install MotorControl22.nxc,. But thats an easy task. So, looking at motcont.py I see the following:

 mc.start()

    mc.cmd((nxt.motor.Port.A, nxt.motor.Port.B), 50, 360)
    wait()

So my question is: Will the motors be synced with this command? In the docs (https://ni.srht.site/nxt-python/latest/api/motcont.html) I get:

cmd(ports, power, tacholimit, speedreg=True, smoothstart=False, brake=False)

In the code (from motcont.py above) there is not so many parameters added. Does this simply means the last parameters are omitted? And just to add in motcont.py if needed?

Yes they will be synced.

cmd(ports, power, tacholimit, speedreg=True, smoothstart=False, brake=False)

The three last parameters have default values, if you do not give them, the function will use the default value.