NXC: how to SetRotationCount(OUT_A, longval) ?

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

NXC: how to SetRotationCount(OUT_A, longval) ?

Post by HaWe »

hi,
how can I set (patch) a RotationCount to a certain value?
by

Code: Select all

ResetRotationCount(OUT_A); 
I can set it to zero.

But if I want to set it e.g. to 300:

Code: Select all

SetRotationCount(OUT_A, 300);
how can I do this?
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: NXC: how to SetRotationCount(OUT_A, longval) ?

Post by mattallen37 »

I don't think you can. The best way to mimic this behavior is to use offsets.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: NXC: how to SetRotationCount(OUT_A, longval) ?

Post by afanofosc »

The firmware does not allow you to write to any of the tachometer fields of the Output module IOMap other than to reset the count to zero.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXC: how to SetRotationCount(OUT_A, longval) ?

Post by HaWe »

a pity, but thank you for replying!
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 3 guests