removes control IO from the Well class, creates threaded IOControl class
This commit is contained in:
@@ -33,7 +33,6 @@ public class Well {
|
||||
/* IO */
|
||||
AnalogIn inclinometer;
|
||||
AnalogIn loadCell;
|
||||
DigitalOut runCommand;
|
||||
private double currentSurfacePosition;
|
||||
private double currentSurfaceLoad;
|
||||
private double currentDownholePosition;
|
||||
@@ -181,7 +180,6 @@ public class Well {
|
||||
currentCard = new Card(strokesLifetime);
|
||||
inclinometer = new AnalogIn(inclinometerChannel, 0, 100, 0, 100);
|
||||
loadCell = new AnalogIn(loadCellChannel, 0, 50000, 0, 50000);
|
||||
runCommand = new DigitalOut(runCommandChannel, 0);
|
||||
|
||||
strokeSpeed = new Measurement("Stroke Speed", true, db, 0.5, 600);
|
||||
downholeGrossStroke = new Measurement("Downhole Gross Stroke", true, db, 0.5, 600);
|
||||
@@ -212,7 +210,6 @@ public class Well {
|
||||
currentCard = new Card(strokesLifetime);
|
||||
inclinometer = new AnalogIn(inclinometerChannel, 0, 100, 0, 100);
|
||||
loadCell = new AnalogIn(loadCellChannel, 0, 50000, 0, 50000);
|
||||
runCommand = new DigitalOut(runCommandChannel, 0);
|
||||
|
||||
strokeSpeed = new Measurement("Stroke Speed", true, db, 0.5, 600);
|
||||
downholeGrossStroke = new Measurement("Downhole Gross Stroke", true, db, 0.5, 600);
|
||||
@@ -987,12 +984,6 @@ public class Well {
|
||||
pointCounter++;
|
||||
}
|
||||
|
||||
if (runStatus == RUNSTATUS_RUNNING || runStatus == RUNSTATUS_STARTING){
|
||||
runCommand.write(1);
|
||||
} else {
|
||||
runCommand.write(0);
|
||||
}
|
||||
|
||||
if(isNewDay()){
|
||||
strokeSpeed.endOfDay();
|
||||
downholeGrossStroke.endOfDay();
|
||||
@@ -1048,12 +1039,6 @@ public class Well {
|
||||
pointCounter++;
|
||||
}
|
||||
|
||||
if (runStatus == RUNSTATUS_RUNNING || runStatus == RUNSTATUS_STARTING){
|
||||
runCommand.write(1);
|
||||
} else {
|
||||
runCommand.write(0);
|
||||
}
|
||||
|
||||
if(isNewDay()){
|
||||
strokeSpeed.endOfDay();
|
||||
downholeGrossStroke.endOfDay();
|
||||
@@ -1107,9 +1092,6 @@ public class Well {
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
public void allOutputsOff(){
|
||||
runCommand.write(0, true);
|
||||
}
|
||||
|
||||
public static void main( String[] args ){
|
||||
Well thisWell = new Well("Barney", args[1], 99, 99, 99);
|
||||
|
||||
Reference in New Issue
Block a user