Search in sources :

Example 1 with IServoPositionUpdateListener

use of com.neuronrobotics.sdk.dyio.peripherals.IServoPositionUpdateListener in project java-bowler by NeuronRobotics.

the class ServoPrismaticLink method setServoChannel.

public void setServoChannel(ServoChannel srv) {
    // System.out.println("Setting new servo channel: "+srv.getChannel().getNumber());
    srv.getChannel().setCachedMode(true);
    srv.addIServoPositionUpdateListener(new IServoPositionUpdateListener() {

        @Override
        public void onServoPositionUpdate(ServoChannel srv, int position, double time) {
            fireLinkListener(position);
        }
    });
    this.srv = srv;
}
Also used : ServoChannel(com.neuronrobotics.sdk.dyio.peripherals.ServoChannel) IServoPositionUpdateListener(com.neuronrobotics.sdk.dyio.peripherals.IServoPositionUpdateListener)

Example 2 with IServoPositionUpdateListener

use of com.neuronrobotics.sdk.dyio.peripherals.IServoPositionUpdateListener in project java-bowler by NeuronRobotics.

the class ServoRotoryLink method setServoChannel.

public void setServoChannel(ServoChannel srv) {
    // System.out.println("Setting new servo channel: "+srv.getChannel().getNumber());
    srv.getChannel().setCachedMode(true);
    srv.addIServoPositionUpdateListener(new IServoPositionUpdateListener() {

        @Override
        public void onServoPositionUpdate(ServoChannel srv, int position, double time) {
            fireLinkListener(position);
        }
    });
    this.srv = srv;
}
Also used : ServoChannel(com.neuronrobotics.sdk.dyio.peripherals.ServoChannel) IServoPositionUpdateListener(com.neuronrobotics.sdk.dyio.peripherals.IServoPositionUpdateListener)

Aggregations

IServoPositionUpdateListener (com.neuronrobotics.sdk.dyio.peripherals.IServoPositionUpdateListener)2 ServoChannel (com.neuronrobotics.sdk.dyio.peripherals.ServoChannel)2