Preliminary implementation of SwissMX RT
This commit is contained in:
@@ -54,8 +54,8 @@ public class Controller {
|
||||
|
||||
static Controller instance;
|
||||
final BasePlate basePlate;
|
||||
final RoomTemperatureBasePlate roomTemperatureBasePlate;
|
||||
final /*Panel*/ MainPanel mainFrame;
|
||||
RoomTemperatureBasePlate roomTemperatureBasePlate;
|
||||
static /*Panel*/ MainPanel mainFrame;
|
||||
Device hexiposi;
|
||||
Device barcode_reader;
|
||||
Device barcode_reader_puck;
|
||||
@@ -67,9 +67,19 @@ public class Controller {
|
||||
public static Controller getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public static boolean isRt() {
|
||||
return Controller.mainFrame.isRt();
|
||||
}
|
||||
|
||||
static void createInstance(Panel mainFrame) {
|
||||
instance = new Controller(mainFrame);
|
||||
Controller.mainFrame = (MainPanel) mainFrame;
|
||||
System.setProperty(GenericDevice.PROPERTY_CONFIG_PATH, Context.getInstance().getSetup().getDevicesPath());
|
||||
if (isRt()){
|
||||
instance = new ControllerRT(mainFrame);
|
||||
} else {
|
||||
instance = new Controller(mainFrame);
|
||||
}
|
||||
}
|
||||
|
||||
enum PuckMountMode {
|
||||
@@ -120,16 +130,19 @@ public class Controller {
|
||||
static String PUCK_ESERA_DEVICE = "onewire";
|
||||
|
||||
public static final int NUMBER_OF_PUCKS = 30;
|
||||
|
||||
private Controller(Panel mainFrame) {
|
||||
System.setProperty(GenericDevice.PROPERTY_CONFIG_PATH, Context.getInstance().getSetup().getDevicesPath());
|
||||
|
||||
protected Controller(){
|
||||
basePlate = new BasePlate();
|
||||
instance = this;
|
||||
}
|
||||
|
||||
private Controller(Panel mainFrame) {
|
||||
this();
|
||||
//basePlate = new BasePlate();
|
||||
puckState = new PuckState[NUMBER_OF_PUCKS];
|
||||
for (int i = 0; i < NUMBER_OF_PUCKS; i++) {
|
||||
puckState[i] = new PuckState(i + 1);
|
||||
}
|
||||
this.mainFrame = (MainPanel) mainFrame;
|
||||
instance = this;
|
||||
clearPuckStates();
|
||||
|
||||
basePlate.addListener(basePlateListener);
|
||||
@@ -369,7 +382,7 @@ public class Controller {
|
||||
}
|
||||
}
|
||||
|
||||
final PuckState[] puckState;
|
||||
PuckState[] puckState;
|
||||
|
||||
public PuckState[] getPuckStates() {
|
||||
return puckState;
|
||||
|
||||
Reference in New Issue
Block a user