1
1
class Scanner
2
2
{
3
3
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 ;
6
6
7
7
public:
8
8
int magazineLength = 0 ;
@@ -25,6 +25,7 @@ class Scanner
25
25
this ->lcd ->displayMessage (" Prepare" );
26
26
this ->status = PREPARE_RUN;
27
27
cam.focus ();
28
+ projector.turnOn ();
28
29
projector.resetSystem ();
29
30
this ->lcd ->displayMessage (" Ready" );
30
31
this ->status = READY_TO_START_RUN;
@@ -35,6 +36,10 @@ class Scanner
35
36
this ->lcd ->displayMessage (" Start Run" );
36
37
this ->status = EXECUTE_RUN;
37
38
39
+ // First Dia in Place
40
+ projector.slideForward ();
41
+ delay (this ->safeTimeBeforeShot );
42
+
38
43
for (int i = 0 ; i < this ->magazineLength ; i++)
39
44
{
40
45
Logger::debug (" Start Capture Dia Nr. " + String (i+1 ) + " / " + String (this ->magazineLength ));
@@ -50,6 +55,7 @@ class Scanner
50
55
Logger::debug (" Rund Finished" );
51
56
this ->lcd ->displayMessage (" Fertig!" );
52
57
this ->status = FINISHED_RUN;
58
+ projector.turnOff ();
53
59
}
54
60
55
61
// Cancel ?
@@ -63,9 +69,10 @@ class Scanner
63
69
64
70
void cancelRun ()
65
71
{
72
+ projector.resetSystem ();
73
+ projector.turnOff ();
66
74
this ->status = CANCELED_RUN;
67
75
this ->lcd ->displayMessage (" Canceled" );
68
- delay (1000 );
69
76
}
70
77
71
78
void resetRun ()
0 commit comments