Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: osman-pasha on Jul 27th, 2013  |  syntax: Diff  |  size: 9.29 KB  |  views: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # HG changeset patch
  2. # User positron96 <positron96@gmail.com>
  3. # Date 1374910026 -25200
  4. #      Sat Jul 27 14:27:06 2013 +0700
  5. # Branch cut-lejos-0.9.1-3
  6. # Node ID 922d85a79ea6c6d6516aeb0b738cfc3c2b9f478f
  7. # Parent  e814c535bcf4e54ba855f22b21d11cc8cffa8001
  8. * Remove extra dependencies in addon package
  9.  
  10. diff -r e814c535bcf4 -r 922d85a79ea6 src/lejos/nxt/addon/LDCMotor.java
  11. --- a/src/lejos/nxt/addon/LDCMotor.java Sat Jul 27 14:23:38 2013 +0700
  12. +++ b/src/lejos/nxt/addon/LDCMotor.java Sat Jul 27 14:27:06 2013 +0700
  13. @@ -1,6 +1,6 @@
  14.  package lejos.nxt.addon;
  15.  
  16. -import lejos.nxt.SensorPort;
  17. +import lejos.nxt.I2CPort;
  18.  
  19.  /*
  20.   * WARNING: THIS CLASS IS SHARED BETWEEN THE classes AND pccomms PROJECTS.
  21. @@ -31,11 +31,11 @@
  22.          * @param SPI_PORT
  23.          *  
  24.          */
  25. -       public LDCMotor(SensorPort port, int location, String DCMotorName, byte SPI_PORT){
  26. +       public LDCMotor(I2CPort port, int location, String DCMotorName, byte SPI_PORT){
  27.                 super(port,location,DCMotorName,SPI_PORT);
  28.         }
  29.  
  30. -       public LDCMotor(SensorPort port, int location, String DCMotorName, byte SPI_PORT,int forwardMinSpeed,int forwardMaxSpeed,int backwardMinSpeed, int backwardMaxSpeed){
  31. +       public LDCMotor(I2CPort port, int location, String DCMotorName, byte SPI_PORT,int forwardMinSpeed,int forwardMaxSpeed,int backwardMinSpeed, int backwardMaxSpeed){
  32.                 super(port,location,DCMotorName,SPI_PORT);
  33.                
  34.                 this.forward_min_speed = forwardMinSpeed;
  35. diff -r e814c535bcf4 -r 922d85a79ea6 src/lejos/nxt/addon/LMotor.java
  36. --- a/src/lejos/nxt/addon/LMotor.java   Sat Jul 27 14:23:38 2013 +0700
  37. +++ b/src/lejos/nxt/addon/LMotor.java   Sat Jul 27 14:27:06 2013 +0700
  38. @@ -1,6 +1,6 @@
  39.  package lejos.nxt.addon;
  40.  
  41. -import lejos.nxt.SensorPort;
  42. +import lejos.nxt.I2CPort;
  43.  import lejos.nxt.I2CSensor;
  44.  
  45.  /*
  46. @@ -20,7 +20,7 @@
  47.         protected int LSC_position; //Position where Servo has been plugged
  48.        
  49.         //Servo ID
  50. -       private SensorPort portConnected;//What
  51. +       private I2CPort portConnected;//What
  52.         protected byte SPI_PORT;//What SPI Port is connected LSC
  53.  
  54.         public static final int arrMotorUnload[] = {0x01,0x02,0x04,0x08,0x20,0x40,0x80,0x100,0x200};
  55. @@ -35,7 +35,7 @@
  56.          * @param SPI_PORT the SPI port
  57.          *  
  58.          */
  59. -       public LMotor(SensorPort port, int location, String name, byte SPI_PORT){
  60. +       public LMotor(I2CPort port, int location, String name, byte SPI_PORT){
  61.                 super(port);
  62.                 this.name = name;
  63.                 this.LSC_position = location;
  64. diff -r e814c535bcf4 -r 922d85a79ea6 src/lejos/nxt/addon/LSC.java
  65. --- a/src/lejos/nxt/addon/LSC.java      Sat Jul 27 14:23:38 2013 +0700
  66. +++ b/src/lejos/nxt/addon/LSC.java      Sat Jul 27 14:27:06 2013 +0700
  67. @@ -1,6 +1,6 @@
  68.  package lejos.nxt.addon;
  69.  
  70. -import lejos.nxt.SensorPort;
  71. +import lejos.nxt.I2CPort;
  72.  import lejos.nxt.I2CSensor;
  73.  import java.util.ArrayList;
  74.  
  75. @@ -31,7 +31,7 @@
  76.        
  77.         //I2C
  78.         private byte SPI_PORT; 
  79. -       private SensorPort portConnected;
  80. +       private I2CPort portConnected;
  81.        
  82.         /**
  83.          *
  84. @@ -41,7 +41,7 @@
  85.          * @param SPI_PORT
  86.          *
  87.          */
  88. -       public LSC(SensorPort port,byte SPI_PORT){
  89. +       public LSC(I2CPort port,byte SPI_PORT){
  90.                 super(port);
  91.                 this.portConnected = port;
  92.                 this.SPI_PORT = SPI_PORT;
  93. diff -r e814c535bcf4 -r 922d85a79ea6 src/lejos/nxt/addon/LServo.java
  94. --- a/src/lejos/nxt/addon/LServo.java   Sat Jul 27 14:23:38 2013 +0700
  95. +++ b/src/lejos/nxt/addon/LServo.java   Sat Jul 27 14:27:06 2013 +0700
  96. @@ -1,6 +1,6 @@
  97.  package lejos.nxt.addon;
  98.  
  99. -import lejos.nxt.SensorPort;
  100. +import lejos.nxt.I2CPort;
  101.  
  102.  /*
  103.   * WARNING: THIS CLASS IS SHARED BETWEEN THE classes AND pccomms PROJECTS.
  104. @@ -28,7 +28,7 @@
  105.          * @param SPI_PORT
  106.          *  
  107.          */
  108. -       public LServo(SensorPort port, int location, String servoName, byte SPI_PORT){
  109. +       public LServo(I2CPort port, int location, String servoName, byte SPI_PORT){
  110.                 super(port,location,servoName,SPI_PORT);
  111.         }
  112.  
  113. @@ -44,7 +44,7 @@
  114.          * @param max_angle
  115.          *
  116.          */
  117. -       public LServo(SensorPort port, int location, String servoName, byte SPI_PORT,int min_angle, int max_angle){
  118. +       public LServo(I2CPort port, int location, String servoName, byte SPI_PORT,int min_angle, int max_angle){
  119.                 super(port,location,servoName,SPI_PORT);
  120.                
  121.                 this.min_angle = min_angle;
  122. @@ -64,7 +64,7 @@
  123.          * @param init_angle
  124.          *
  125.          */
  126. -       public LServo(SensorPort port, int location, String servoName, byte SPI_PORT,int min_angle, int max_angle,int init_angle){
  127. +       public LServo(I2CPort port, int location, String servoName, byte SPI_PORT,int min_angle, int max_angle,int init_angle){
  128.                 super(port,location,servoName,SPI_PORT);
  129.                
  130.                 this.min_angle = min_angle;
  131. diff -r e814c535bcf4 -r 922d85a79ea6 src/lejos/nxt/addon/MSC.java
  132. --- a/src/lejos/nxt/addon/MSC.java      Sat Jul 27 14:23:38 2013 +0700
  133. +++ b/src/lejos/nxt/addon/MSC.java      Sat Jul 27 14:27:06 2013 +0700
  134. @@ -69,7 +69,7 @@
  135.         private MServo[] arrServo; //ServoController manages up to 8 RC Servos
  136.  
  137.         //I2C  
  138. -       private SensorPort portConnected;
  139. +       private I2CPort portConnected;
  140.  
  141.         /**
  142.          *
  143. @@ -78,7 +78,7 @@
  144.          * @param port the NXTServo is connected to
  145.          *
  146.          */
  147. -       public MSC(SensorPort port){
  148. +       public MSC(I2CPort port){
  149.                 super(port);
  150.                 port.setType(TYPE_LOWSPEED_9V);
  151.                 this.setAddress(NXTSERVO_ADDRESS);
  152. diff -r e814c535bcf4 -r 922d85a79ea6 src/lejos/nxt/addon/MServo.java
  153. --- a/src/lejos/nxt/addon/MServo.java   Sat Jul 27 14:23:38 2013 +0700
  154. +++ b/src/lejos/nxt/addon/MServo.java   Sat Jul 27 14:27:06 2013 +0700
  155. @@ -37,7 +37,7 @@
  156.          * @param location
  157.          *
  158.          */
  159. -       public MServo(SensorPort port, int location){
  160. +       public MServo(I2CPort port, int location){
  161.                 super(port);
  162.                 this.servoPosition = location;
  163.         }
  164. @@ -53,7 +53,7 @@
  165.          * @param servoName
  166.          *
  167.          */
  168. -       public MServo(SensorPort port, int location, String servoName){
  169. +       public MServo(I2CPort port, int location, String servoName){
  170.                 super(port);
  171.                 this.servoPosition = location;
  172.         }
  173. @@ -69,7 +69,7 @@
  174.          * @param max_angle
  175.          *
  176.          */
  177. -       public MServo(SensorPort port, int location, String servoName, int min_angle, int max_angle){
  178. +       public MServo(I2CPort port, int location, String servoName, int min_angle, int max_angle){
  179.                 this(port,location,servoName);
  180.                
  181.                 this.minAngle = min_angle;
  182. diff -r e814c535bcf4 -r 922d85a79ea6 src/lejos/nxt/addon/NXTMMX.java
  183. --- a/src/lejos/nxt/addon/NXTMMX.java   Sat Jul 27 14:23:38 2013 +0700
  184. +++ b/src/lejos/nxt/addon/NXTMMX.java   Sat Jul 27 14:27:06 2013 +0700
  185. @@ -2,7 +2,6 @@
  186.  
  187.  import lejos.nxt.I2CPort;
  188.  import lejos.nxt.I2CSensor;
  189. -import lejos.nxt.SensorPort;
  190.  
  191.  /*
  192.   * WARNING: THIS CLASS IS SHARED BETWEEN THE classes AND pccomms PROJECTS.
  193. @@ -66,7 +65,7 @@
  194.       * @see SensorPort#S3
  195.       * @see SensorPort#S4
  196.          */
  197. -       public  NXTMMX(SensorPort port, int address){
  198. +       public  NXTMMX(I2CPort port, int address){
  199.                 super(port, address, I2CPort.LEGO_MODE, TYPE_LOWSPEED);
  200.                 reset();
  201.  //             A = new NXTMMXMotor(this, 0);
  202. @@ -77,7 +76,7 @@
  203.          * Constructor for the NXTMMX
  204.          * @param port - the port its plugged in to
  205.          */
  206. -       public  NXTMMX(SensorPort port){
  207. +       public  NXTMMX(I2CPort port){
  208.          this(port, DEFAULT_MMX_ADDRESS);
  209.         }
  210.  
  211. diff -r e814c535bcf4 -r 922d85a79ea6 src/lejos/nxt/addon/NXTe.java
  212. --- a/src/lejos/nxt/addon/NXTe.java     Sat Jul 27 14:23:38 2013 +0700
  213. +++ b/src/lejos/nxt/addon/NXTe.java     Sat Jul 27 14:27:06 2013 +0700
  214. @@ -1,6 +1,5 @@
  215.  package lejos.nxt.addon;
  216.  
  217. -import lejos.nxt.SensorPort;
  218.  import lejos.nxt.I2CPort;
  219.  import lejos.nxt.I2CSensor;
  220.  import java.util.ArrayList;
  221. @@ -28,7 +27,7 @@
  222.         private final String ERROR_SPI_CONFIGURATION = "Error in SPI Configuration";
  223.        
  224.         //I2C
  225. -       private SensorPort portConnected;
  226. +       private I2CPort portConnected;
  227.         private final byte SPI_PORT[] = {0x01,0x02,0x04,0x08};//SPI Ports where you connect LSC
  228.         public static final byte NXTE_ADDRESS = 0x50;
  229.         private final byte REGISTER_IIC = (byte)0xF0;//NXTe IIC address
  230. @@ -38,7 +37,7 @@
  231.          *
  232.          * @param port
  233.          */
  234. -       public NXTe(SensorPort port){
  235. +       public NXTe(I2CPort port){
  236.                 super(port, NXTE_ADDRESS, I2CPort.LEGO_MODE, TYPE_LOWSPEED_9V);
  237.                
  238.                 port.setType(TYPE_LOWSPEED_9V);
  239. diff -r e814c535bcf4 -r 922d85a79ea6 src/lejos/nxt/addon/PSPNXController.java
  240. --- a/src/lejos/nxt/addon/PSPNXController.java  Sat Jul 27 14:23:38 2013 +0700
  241. +++ b/src/lejos/nxt/addon/PSPNXController.java  Sat Jul 27 14:27:06 2013 +0700
  242. @@ -1,6 +1,5 @@
  243.  package lejos.nxt.addon;
  244.  
  245. -import lejos.nxt.SensorPort;
  246.  import lejos.nxt.I2CSensor;
  247.  import lejos.nxt.I2CPort;
  248.  
  249. @@ -47,11 +46,11 @@
  250.  
  251.         private byte[] buf = new byte[2];
  252.  
  253. -       public PSPNXController(SensorPort port) {
  254. +       public PSPNXController(I2CPort port)    {
  255.          this(port, DEFAULT_I2C_ADDRESS);
  256.      }
  257.  
  258. -       public PSPNXController(SensorPort port, int address)    {
  259. +       public PSPNXController(I2CPort port, int address)       {
  260.                 super(port, address, I2CPort.LEGO_MODE, TYPE_LOWSPEED);
  261.                 // Set correct sensor type, default is TYPE_LOWSPEED
  262.                 // port.setType(TYPE_LOWSPEED_9V);
  263. diff -r e814c535bcf4 -r 922d85a79ea6 src/lejos/nxt/addon/tetrix/TetrixControllerFactory.java
  264. --- a/src/lejos/nxt/addon/tetrix/TetrixControllerFactory.java   Sat Jul 27 14:23:38 2013 +0700
  265. +++ b/src/lejos/nxt/addon/tetrix/TetrixControllerFactory.java   Sat Jul 27 14:27:06 2013 +0700
  266. @@ -1,9 +1,7 @@
  267.  package lejos.nxt.addon.tetrix;
  268.  
  269. -import lejos.nxt.Button;
  270.  import lejos.nxt.I2CPort;
  271.  import lejos.nxt.I2CSensor;
  272. -import lejos.nxt.SensorPort;
  273.  
  274.  /**
  275.   * HiTechnic Tetrix Motor and Servo Controller factory class used to provide Motor and Servo controller abstractions.
clone this paste RAW Paste Data