
package frc.team4215.stronghold;

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Victor;
import jaci.openrio.toast.lib.log.Logger;
import jaci.openrio.toast.lib.module.IterativeModule;
import jaci.openrio.toast.lib.registry.Registrar;

public class RobotModule extends IterativeModule {

	
	Victor left;
    Victor right;
    Victor left2;
    Victor right2;
    
    private DriveTrain chassis;
    
    Joystick  leftStick;
    Joystick rightStick;
    Joystick thirdstick;

    
    private UI driveStation;
    
    UltraSonic ult;
    
    public static Logger logger;
    
    private static final String ModuleName = "stronghold";
    
    private static final String ModuleVersion = "0.0.1";
    
    @Override
    public String getModuleName() {
        
        return ModuleName;
    }
    
    @Override
    public String getModuleVersion() {
        
        return ModuleVersion;
    }
    
    @Override
    public void robotInit() {
        
        logger = new Logger("stronghold", Logger.ATTR_DEFAULT);
        
        left = Registrar.victor(0);
        left2 = Registrar.victor(1);
        right = Registrar.victor(2);
        right2 = Registrar.victor(3);
        
        chassis = new DriveTrain(left,left2, right,right2);
      
        leftStick = new Joystick(1);
        rightStick = new Joystick(0);
        thirdstick = new Joystick(2);
        
        driveStation = new UI(rightStick, thirdstick);
        ult = new UltraSonic(1);
    }
    
    @Override
    public void teleopInit(){
    	
    }
    
    @Override
    public void teleopPeriodic(){
    	double[] inputs = driveStation.getInputs();
    	chassis.drive(inputs[0], inputs[1]);
    	logger.info("Hello");

    }
    
    @Override
    public void autonomousPeriodic(){
    	
    }
    
    public void autonomousInit(){
    	startTimer();
    	
    }
}

@@ -69,16 +69,17 @@
 oystick;
+%0D
 %0Aimport 
@@ -107,16 +107,17 @@
 .Victor;
+%0D
 %0Aimport 
@@ -316,75 +316,48 @@
  %7B%0D%0A
-%0A%09%0D%0A%09Victor left;%0D%0A    Victor right;%0D%0A    Victor left2;%0D%0A    Victor
+%0D%0A    private Victor left, right, left2,
  rig
@@ -401,20 +401,17 @@
 assis;%0D%0A
-    
+%0D
 %0A    Joy
@@ -416,17 +416,16 @@
 oystick 
- 
 leftStic
@@ -480,21 +480,16 @@
 stick;%0D%0A
-%0A    
 %0D%0A    pr
@@ -788,24 +788,36 @@
      return 
+RobotModule.
 ModuleName;%0D
@@ -910,16 +910,28 @@
  return 
+RobotModule.
 ModuleVe
@@ -1019,16 +1019,45 @@
     
-logger =
+RobotModule.logger =%0D%0A               
  new
@@ -1101,24 +1101,17 @@
 AULT);%0D%0A
-        
+%0D
 %0A       
@@ -1107,24 +1107,29 @@
 %0D%0A%0D%0A        
+this.
 left = Regis
@@ -1149,24 +1149,29 @@
 );%0D%0A        
+this.
 left2 = Regi
@@ -1192,24 +1192,29 @@
 );%0D%0A        
+this.
 right = Regi
@@ -1235,24 +1235,29 @@
 );%0D%0A        
+this.
 right2 = Reg
@@ -1293,16 +1293,21 @@
         
+this.
 chassis 
@@ -1327,26 +1327,65 @@
 ain(
-left,left2, right,
+this.left, this.left2,%0D%0A                this.right, this.
 righ
@@ -1390,22 +1390,16 @@
 ght2);%0D%0A
-      
 %0D%0A      
@@ -1400,16 +1400,21 @@
         
+this.
 leftStic
@@ -1443,16 +1443,21 @@
         
+this.
 rightSti
@@ -1487,16 +1487,21 @@
         
+this.
 thirdsti
@@ -1541,16 +1541,21 @@
         
+this.
 driveSta
@@ -1568,16 +1568,21 @@
  new UI(
+this.
 rightSti
@@ -1585,16 +1585,21 @@
 tStick, 
+this.
 thirdsti
@@ -1612,16 +1612,21 @@
         
+this.
 ult = ne
@@ -1699,24 +1699,20 @@
 opInit()
+ 
 %7B%0D%0A
-    %09
 %0D%0A    %7D%0D
@@ -1765,24 +1765,28 @@
 riodic()
+ 
 %7B%0D%0A    
-%09
+    
 double%5B%5D
@@ -1795,16 +1795,21 @@
 nputs = 
+this.
 driveSta
@@ -1831,17 +1831,25 @@
 );%0D%0A    
-%09
+    this.
 chassis.
@@ -1882,17 +1882,32 @@
 );%0D%0A    
-%09
+    RobotModule.
 logger.i
@@ -1921,16 +1921,17 @@
 llo%22);%0D%0A
+%0D
 %0A    %7D%0D%0A
@@ -1987,24 +1987,20 @@
 riodic()
+ 
 %7B%0D%0A
-    %09
 %0D%0A    %7D%0D
@@ -1998,32 +1998,47 @@
 %0A%0D%0A    %7D%0D%0A    %0D%0A
+    @Override%0D%0A
     public void 
@@ -2057,16 +2057,31 @@
 it()
+ 
 %7B%0D%0A    
-%09
+    Autonomous.
 star
@@ -2095,13 +2095,8 @@
 );%0D%0A
-    %09
 %0D%0A  

fix errors and simplify fields