import org.ocera.orte.types.NtpTime;
import org.ocera.orte.types.RecvInfo;
import org.ocera.orte.types.SubsProp;
+import org.ocera.orte.types.ORTEConstant;
public class MotionSpeedSubscribe extends SubscriptionCallback{
- public final static int IMMEDIATE = 0x02;
- public final static int BEST_EFFORTS = 0x01;
-
private Subscription sub;
private HokuyoView view;
private SpeedMotionType speedmsg;
"motion_speed",
minSeparation,
deadline,
- IMMEDIATE,
- BEST_EFFORTS,
+ ORTEConstant.IMMEDIATE,
+ ORTEConstant.BEST_EFFORTS,
0);
}
}
public void callback(RecvInfo info, MessageData msg) {
- view.setDataMotion(((SpeedMotionType)msg).speed);
- //System.out.println(msg);
- }
-}
\ No newline at end of file
+ if (info.getRecvStatus() == ORTEConstant.NEW_DATA)
+ view.setDataMotion(((SpeedMotionType)msg).speed);
+ }
+}