diff --git a/projet/src/launcher/Launch.java b/projet/src/launcher/Launch.java index fa42a29..bdc217a 100644 --- a/projet/src/launcher/Launch.java +++ b/projet/src/launcher/Launch.java @@ -36,6 +36,11 @@ public class Launch extends Application { Platform.runLater(() -> { for (Capteur capteurs1 : capteurs) { try { + if (capteurs1 instanceof CapteurVirtuel){ + for (Capteur capteur: ((CapteurVirtuel) capteurs1).getLesCapteurs().values()) { + capteur.genTemp(); + } + } capteurs1.genTemp(); } catch (IOException e) { throw new RuntimeException(e); diff --git a/projet/src/modele/RandomGenerator.java b/projet/src/modele/RandomGenerator.java index 8a37f85..fc9b15d 100644 --- a/projet/src/modele/RandomGenerator.java +++ b/projet/src/modele/RandomGenerator.java @@ -11,6 +11,6 @@ public class RandomGenerator implements CaptorGeneratorStrategy{ @Override public float generate() throws IOException { Random random = new Random(); - return random.nextFloat(50); + return random.nextFloat(-20, 50); } } \ No newline at end of file