Search found 12 matches

by socrates
Mon Dec 03, 2007 10:45 pm
Forum: NXJ Software
Topic: icommand and threads
Replies: 3
Views: 1435

I can't see those in the API, though I managed to work around with a synchronized handler thus, package uk.co.moons.handlers; import java.util.Vector; import icommand.nxt.*; /** * * @author Rupert Young */ public class CommandHandler { public static final int MOTOR_FORWARD = 0, MOTOR_BACKWARD =...
by socrates
Sun Dec 02, 2007 5:43 pm
Forum: NXJ Software
Topic: icommand and threads
Replies: 3
Views: 1435

icommand and threads

Is multithreading viable with icommand?

On the PC I am running two threads, one which controls a motor and one which reads the ultrasonic sensor continuously.

However, they both stop almost immediately. Is this because NXTCommand is not synchronised?

Regards,
Rupert
by socrates
Fri Nov 23, 2007 7:22 pm
Forum: NXJ Software
Topic: Ultrasonic reading time,with icommand
Replies: 1
Views: 1126

Ultrasonic reading time,with icommand

It appears that the time it takes to get a ultrasonic sensor reading with icommand takes 100-200ms. Is that normal? Here's the code. time = System.currentTimeMillis(); reading = sensor.getDistance(); logger.info("time "+ (System.currentTimeMillis()-time)); Is this due to the communication ...
by socrates
Thu Nov 15, 2007 9:35 am
Forum: NXJ Software
Topic: icommand functionality
Replies: 3
Views: 1494

Thanks. I didn't appreciate that forward() turns the motor indefinitley.

Regards,
Rupert
by socrates
Thu Nov 15, 2007 9:34 am
Forum: NXJ Software
Topic: icomand Motor getSpeed
Replies: 3
Views: 1540

There isn't a getActualSpeed() method in the icommand API, as far as I can see.

Regards,
Rupert
by socrates
Sat Nov 10, 2007 10:25 pm
Forum: NXJ Software
Topic: icommand functionality
Replies: 3
Views: 1494

icommand functionality

I have a loop which is (supposedly) controlling the motor speed. Within the loop I have the commands Motor.B.setSpeed((int)output); Motor.C.setSpeed((int)output); Motor.B.forward(); Motor.C.forward(); However, it is not quite acting as expected. Even thought the program exits the NXT continues opera...
by socrates
Sat Nov 10, 2007 10:20 pm
Forum: NXJ Software
Topic: motor speed and power
Replies: 2
Views: 1590

motor speed and power

What's the difference between the motor speed and power? Why isn't the latter available in the icommand API?

Regards,
Rupert
by socrates
Sat Nov 10, 2007 6:19 pm
Forum: NXJ Software
Topic: icomand Motor getSpeed
Replies: 3
Views: 1540

icomand Motor getSpeed

Hi,

When I do

int speed = Motor.B.getSpeed();

I always get the value 720, even if the motor isn't moving.

Is this method working, or am I doing something wrong?

Regards,
Rupert
by socrates
Thu Nov 01, 2007 12:36 pm
Forum: NXJ Software
Topic: Memory management
Replies: 4
Views: 2008

Memory management

I understand there are some issues with memory clean-up.

What guidelines should be followed to ensure that memory leaking is kept to a minimum, or avoided?

Regards,
Rupert
by socrates
Sun Oct 28, 2007 10:43 pm
Forum: NXJ Software
Topic: NXJ 0.4.0 Beta Bug Watch
Replies: 15
Views: 95692

Hi,

I am having a similar problem, see viewtopic.php?t=540.

Would you explain how you set a private reference, and to what?

Cheers,
Rupert
by socrates
Sun Oct 28, 2007 10:41 pm
Forum: NXJ Software
Topic: Polymorphism support
Replies: 0
Views: 3342

Polymorphism support

Does lejos support polymorphic classes? I have a class that extends a base abstract class which implements an interface. However, when, at runtime, a method is called on the subclass I get a nosuchmethod error, even though it is there, and public. Is there a way around this? Cheers, Rupert
by socrates
Sun Oct 28, 2007 7:43 pm
Forum: NXJ Software
Topic: Brick switch off after program finish
Replies: 6
Views: 2520

Remote termination

Yes, my preference would also be that the brick did not switch off; to avoid getting up after each update.

Is there a way of remotely terminating a running program? If so, we could make programs run indefinitely and terminate from the PC.

Cheers,
Rupert

Go to advanced search