Skip to content

Commit 0a314f5

Browse files
committed
Change Delays and add Standys
1 parent e127ab7 commit 0a314f5

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

classes/Scanner.h

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
class Scanner
22
{
33
private:
4-
int safeTimeBeforeShot = 2000; // Time before Shot - Time for the camera to adjust lightning
5-
int safeTimeAfterShot = 500;
4+
int safeTimeBeforeShot = 5000; // Time before Shot - Time for the camera to adjust lightning
5+
int safeTimeAfterShot = 1000;
66

77
public:
88
int magazineLength = 0;
@@ -25,6 +25,7 @@ class Scanner
2525
this->lcd->displayMessage("Prepare");
2626
this->status = PREPARE_RUN;
2727
cam.focus();
28+
projector.turnOn();
2829
projector.resetSystem();
2930
this->lcd->displayMessage("Ready");
3031
this->status = READY_TO_START_RUN;
@@ -35,6 +36,10 @@ class Scanner
3536
this->lcd->displayMessage("Start Run");
3637
this->status = EXECUTE_RUN;
3738

39+
// First Dia in Place
40+
projector.slideForward();
41+
delay(this->safeTimeBeforeShot);
42+
3843
for (int i = 0 ; i < this->magazineLength ; i++)
3944
{
4045
Logger::debug("Start Capture Dia Nr. " + String(i+1) + " / " + String(this->magazineLength));
@@ -50,6 +55,7 @@ class Scanner
5055
Logger::debug("Rund Finished");
5156
this->lcd->displayMessage("Fertig!");
5257
this->status = FINISHED_RUN;
58+
projector.turnOff();
5359
}
5460

5561
// Cancel ?
@@ -63,9 +69,10 @@ class Scanner
6369

6470
void cancelRun()
6571
{
72+
projector.resetSystem();
73+
projector.turnOff();
6674
this->status = CANCELED_RUN;
6775
this->lcd->displayMessage("Canceled");
68-
delay(1000);
6976
}
7077

7178
void resetRun()

0 commit comments

Comments
 (0)