diff --git a/gyy/.classpath b/gyy/.classpath
deleted file mode 100644
index 1dec7be..0000000
--- a/gyy/.classpath
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/gyy/.project b/gyy/.project
deleted file mode 100644
index 233ec7c..0000000
--- a/gyy/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- gyy
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
-
- org.eclipse.jdt.core.javanature
-
-
diff --git a/gyy/.settings/org.eclipse.core.resources.prefs b/gyy/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 4824b80..0000000
--- a/gyy/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/=UTF-8
diff --git a/gyy/.settings/org.eclipse.jdt.core.prefs b/gyy/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index dbc27c5..0000000
--- a/gyy/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,14 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=17
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
-org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=17
diff --git a/gyy/bin/gyy/ttt.class b/gyy/bin/gyy/ttt.class
deleted file mode 100644
index 5f14a8c..0000000
Binary files a/gyy/bin/gyy/ttt.class and /dev/null differ
diff --git a/gyy/bin/module-info.class b/gyy/bin/module-info.class
deleted file mode 100644
index b8bdb08..0000000
Binary files a/gyy/bin/module-info.class and /dev/null differ
diff --git a/gyy/src/gyy/ttt.java b/gyy/src/gyy/ttt.java
deleted file mode 100644
index ac8aec4..0000000
--- a/gyy/src/gyy/ttt.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package gyy;
-
-import java.awt.BorderLayout;
-import java.awt.EventQueue;
-
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.border.EmptyBorder;
-
-public class ttt extends JFrame {
-
- private JPanel contentPane;
-
- /**
- * Launch the application.
- */
- public static void main(String[] args) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
- ttt frame = new ttt();
- frame.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- }
-
- /**
- * Create the frame.
- */
- public ttt() {
- setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- setBounds(100, 100, 450, 300);
- contentPane = new JPanel();
- contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
-
- setContentPane(contentPane);
- }
-
-}
diff --git a/gyy/src/module-info.java b/gyy/src/module-info.java
deleted file mode 100644
index abc711a..0000000
--- a/gyy/src/module-info.java
+++ /dev/null
@@ -1,9 +0,0 @@
-/**
- *
- */
-/**
- * @author Audrey
- *
- */
-module gyy {
-}
\ No newline at end of file
diff --git a/test_maven12/src/main/java/centuri/test_maven/Camera.java b/test_maven12/src/main/java/centuri/test_maven/Camera.java
index 4bfc7bc..18929f9 100644
--- a/test_maven12/src/main/java/centuri/test_maven/Camera.java
+++ b/test_maven12/src/main/java/centuri/test_maven/Camera.java
@@ -42,7 +42,7 @@ public void takeStill() {
// changement de type de méthode boolean au lieu de void
public boolean takeStill(PicConfig config) {
-
+ boolean picture = false;
//logDebug("Taking Picture");
System.out.println("Taking Picture");
@@ -50,12 +50,15 @@ public boolean takeStill(PicConfig config) {
processBuilder.command("bash", "-c", config.asCommand());
try {
- callBash(processBuilder);
+ if (callBash(processBuilder) == true){
+ picture = true;
+ }
} catch (Exception e) {
System.out.println("Camera: Error while taking picture: " + e.getMessage());
//logError("Camera: Error while taking picture: " + e.getMessage());
}
- return true;
+
+ return picture;
}
/**
@@ -80,7 +83,7 @@ public void takeVid(VidConfig config) {
processBuilder.command("bash", "-c", config.asCommand());
try {
- callBash(processBuilder);
+ callBash(processBuilder);
} catch (Exception e) {
System.out.println("Camera_video: Error while taking video: " + e.getMessage());
//logError("Camera: Error while taking video: " + e.getMessage());
@@ -96,6 +99,8 @@ public void takeVid(VidConfig config) {
// changement de type de méthode boolean au lieu de void
public boolean callBash(ProcessBuilder processBuilder) throws IOException, InterruptedException {
+ boolean callbash = false;
+
Process process = processBuilder.start();
BufferedReader reader =
@@ -110,11 +115,12 @@ public boolean callBash(ProcessBuilder processBuilder) throws IOException, Inter
int exitCode = process.waitFor();
if(exitCode != 0){
System.out.println("\nCamera exited with error code : " + exitCode);
- return true;
}else{
System.out.println("\nCamera finished successfully");
- return false;
+ callbash = true;
}
+
+ return callbash;
}
/**
diff --git a/test_maven12/src/main/java/centuri/test_maven/Main.java b/test_maven12/src/main/java/centuri/test_maven/Main.java
index 054fdd4..143863d 100644
--- a/test_maven12/src/main/java/centuri/test_maven/Main.java
+++ b/test_maven12/src/main/java/centuri/test_maven/Main.java
@@ -18,13 +18,14 @@ public static void main(String[] args) {
//data.add(new Mouvement(150.0, 100.0, arduino));
data.add(new Pause(10000));
data.add(new Mouvement(90.0, 40.0, arduino));
- data.add(new Picture(1000,1240,800));
+ //data.add(new Picture(1000,505852,656131154));
arduino.Start();
for (Event event : data) {
boolean ok = event.Do();
if (!ok){
+ System.out.println("WARNING : ERROR !");
break;
}
event.Info(ok);
diff --git a/test_maven12/src/main/java/centuri/test_maven/Pause.java b/test_maven12/src/main/java/centuri/test_maven/Pause.java
index 2cc0858..a4d0540 100644
--- a/test_maven12/src/main/java/centuri/test_maven/Pause.java
+++ b/test_maven12/src/main/java/centuri/test_maven/Pause.java
@@ -16,13 +16,21 @@ public Pause (int pause) {
@Override
public boolean Do() {
+
+ boolean pause_boolean = false;
+
System.out.println((pause/1000) + " secondes break... \r\n");
+
try {
- Thread.sleep(pause);
+ Thread.sleep(pause)
+ pause_boolean = true;
+ }
} catch (InterruptedException e) {
- e.printStackTrace();
+ e.printStackTrace(pause_boolean = false);
+
}
- return true;
+
+ return pause_boolean;
}
diff --git a/test_maven12/src/main/java/centuri/test_maven/Picture.java b/test_maven12/src/main/java/centuri/test_maven/Picture.java
index 620c5a2..f0bc4b7 100644
--- a/test_maven12/src/main/java/centuri/test_maven/Picture.java
+++ b/test_maven12/src/main/java/centuri/test_maven/Picture.java
@@ -26,6 +26,8 @@ public Picture (int delay, int width, int heigth){
@Override
public boolean Do() {
+ boolean ok = false;
+
Camera camera = new Camera();
var config = new Camera.PicConfig.Builder().outputPath(path)
@@ -37,9 +39,10 @@ public boolean Do() {
.width(width)
.height(heigth)
.build();
+
+ ok = camera.takeStill(config);
-
- return camera.takeStill(config);
+ return ok ;
}
diff --git a/test_maven12/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/test_maven12/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
new file mode 100644
index 0000000..e69de29
diff --git a/test_maven12/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/test_maven12/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
new file mode 100644
index 0000000..5621649
--- /dev/null
+++ b/test_maven12/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
@@ -0,0 +1,20 @@
+/home/audrey/Desktop/test_maven12/src/main/java/centuri/test_maven/Pause.java
+/home/audrey/Desktop/test_maven12/src/main/java/centuri/test_maven/Event.java
+/home/audrey/Desktop/test_maven12/src/main/java/centuri/test_maven/Picture.java
+/home/audrey/Desktop/test_maven12/src/main/java/com/hopding/jrpicam/examples/ShootBufferedStill.java
+/home/audrey/Desktop/test_maven12/src/main/java/com/hopding/jrpicam/enums/MeteringMode.java
+/home/audrey/Desktop/test_maven12/src/main/java/com/hopding/jrpicam/examples/ShootStill.java
+/home/audrey/Desktop/test_maven12/src/main/java/centuri/test_maven/Arduino.java
+/home/audrey/Desktop/test_maven12/src/main/java/com/hopding/jrpicam/examples/ShootTimelapse.java
+/home/audrey/Desktop/test_maven12/src/main/java/com/hopding/jrpicam/enums/Encoding.java
+/home/audrey/Desktop/test_maven12/src/main/java/com/hopding/jrpicam/enums/Exposure.java
+/home/audrey/Desktop/test_maven12/src/main/java/centuri/test_maven/Mouvement.java
+/home/audrey/Desktop/test_maven12/src/main/java/centuri/test_maven/Initialisation.java
+/home/audrey/Desktop/test_maven12/src/main/java/com/hopding/jrpicam/enums/AWB.java
+/home/audrey/Desktop/test_maven12/src/main/java/com/hopding/jrpicam/examples/DemoView.java
+/home/audrey/Desktop/test_maven12/src/main/java/com/hopding/jrpicam/exceptions/FailedToRunRaspistillException.java
+/home/audrey/Desktop/test_maven12/src/main/java/centuri/test_maven/Main.java
+/home/audrey/Desktop/test_maven12/src/main/java/com/hopding/jrpicam/RPiCamera.java
+/home/audrey/Desktop/test_maven12/src/main/java/com/hopding/jrpicam/enums/ImageEffect.java
+/home/audrey/Desktop/test_maven12/src/main/java/centuri/test_maven/Camera.java
+/home/audrey/Desktop/test_maven12/src/main/java/com/hopding/jrpicam/enums/DRC.java