|
|
|
@ -12,6 +12,7 @@ import javafx.scene.layout.StackPane;
|
|
|
|
|
import javafx.scene.text.Text;
|
|
|
|
|
import javafx.stage.Stage;
|
|
|
|
|
import model.Capteur;
|
|
|
|
|
import model.CapteurCPU;
|
|
|
|
|
import model.CapteurIntervalle;
|
|
|
|
|
import model.CapteurRealiste;
|
|
|
|
|
import view.CapteurView;
|
|
|
|
@ -32,7 +33,8 @@ public class Launch extends Application {
|
|
|
|
|
public void start(Stage primaryStage) throws IOException, InterruptedException {
|
|
|
|
|
Capteur captorS = new Capteur(1,"Capteur Simple");
|
|
|
|
|
CapteurIntervalle captorI = new CapteurIntervalle(2,"Capteur Intervalle",0.0,10.0);
|
|
|
|
|
CapteurRealiste captorR = new CapteurRealiste(2,"Capteur Realiste", 5.0, 10.0);
|
|
|
|
|
CapteurRealiste captorR = new CapteurRealiste(3,"Capteur Realiste", 5.0, 10.0);
|
|
|
|
|
CapteurCPU captorC = new CapteurCPU(4,"Capteur CPU");
|
|
|
|
|
|
|
|
|
|
// FXML NOT WORKING
|
|
|
|
|
/*Stage thermostatStage = new Stage();
|
|
|
|
@ -47,10 +49,12 @@ public class Launch extends Application {
|
|
|
|
|
captorS.genTemp();
|
|
|
|
|
captorI.genTemp();
|
|
|
|
|
captorR.genTemp();
|
|
|
|
|
captorC.genTemp();
|
|
|
|
|
try {
|
|
|
|
|
System.out.println(captorS.getNom() + ": " + captorS.getTemp().getValue() + " °C");
|
|
|
|
|
System.out.println(captorI.getNom() + ": " + captorI.getTemp().getValue() + " °C");
|
|
|
|
|
System.out.println(captorR.getNom() + ": " + captorR.getTemp().getValue() + " °C");
|
|
|
|
|
System.out.println(captorC.getNom() + ": " + captorC.getTemp().getValue() + " °C");
|
|
|
|
|
sleep(4000);
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|