Examples of SumoProperties


Examples of com.cos399.sumo.utils.SumoProperties

    Behavior startupBehavior = new Startup();
    Behavior contactBehavior = new Contact();
    Behavior searchBehavior = new Search();
    Behavior[] behaviorArray = {startupBehavior, contactBehavior, searchBehavior};
   
    SumoProperties sp = SumoProperties.getInstance();
    SensorInitializer.initializeSensors();
   
    LCD.clear();
   
    de.setDrive(Drive.getInstance(sp.getLeftMotorPort(), sp.getRightMotorPort(),
        sp.getCenterMotorPort(), sp.getMaxRotationSpeed()));
   
    (new Arbitrator(behaviorArray)).start();
  }
View Full Code Here

Examples of com.cos399.sumo.utils.SumoProperties

 
  public static ActionTest getInstance() {
    if (at == null) {
      at = new ActionTest();
      de = SumoDataExchange.getInstance();
      SumoProperties sp = SumoProperties.getInstance();
      de.setDrive(Drive.getInstance(sp.getLeftMotorPort(), sp.getRightMotorPort(),
          sp.getCenterMotorPort(), sp.getMaxRotationSpeed()));
    }
   
    return at;
  }
View Full Code Here

Examples of com.cos399.sumo.utils.SumoProperties

  private MotorTest() { }
 
  public static MotorTest getInstance() {
    if (mt == null) {
      mt = new MotorTest();
      SumoProperties sp = SumoProperties.getInstance();
      testDrive = Drive.getInstance(sp.getLeftMotorPort(), sp.getRightMotorPort(),
          sp.getCenterMotorPort(), sp.getMaxRotationSpeed());
    }
   
    return mt;
  }
View Full Code Here

Examples of com.cos399.sumo.utils.SumoProperties

  private static Ultrasonic us = null;
 
  private SensorInitializer() { }
 
  public static void initializeSensors() {
    SumoProperties sp = SumoProperties.getInstance();
   
    ts = Touch.getInstance(sp.getTouchSensorPort());
    ls = Light.getInstance(sp.getLightSensorPort(), sp.getColorSensorPort());
    us = Ultrasonic.getInstance(sp.getUltrasonicSensorPort());
    us.setContinuous();
   
    ts.start();
    ls.start();
    us.start();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.