-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathfsa_eos.pde
More file actions
50 lines (38 loc) · 1.8 KB
/
fsa_eos.pde
File metadata and controls
50 lines (38 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* Circuits At Home */
/* Focus Stacking Assistant for Canon EOS Cameras */
/* Controls:
LED - D8
NEAR button - D7
FAR button - D6
GO button - D5
*/
#include <Usb.h>
#include <ptp.h>
#include "qp_port.h"
#include "fsa.h"
#include "bsp.h"
// Local-scope objects -------------------------------------------------------
static QEvent const *l_ControlsQueueSto[30];
static QEvent const *l_CameraQueueSto[30];
static QEvent const *l_LightsQueueSto[30];
static QEvent const *l_UsbtaskQueueSto[30];
static QEvent const *l_CommandsQueueSto[30];
static QEvent l_smlPoolSto[30];
static FocusMovedEvt l_medPoolSto[10];
//............................................................................
void setup() {
BSP_init(); // initialize the BSP
QF::init(); // initialize the framework and the underlying RT kernel
// initialize event pools...
QF::poolInit(l_smlPoolSto, sizeof(l_smlPoolSto), sizeof(l_smlPoolSto[0]));
QF::poolInit(l_medPoolSto, sizeof(l_medPoolSto), sizeof(l_medPoolSto[0]));
// start the active objects...
AO_Controls->start(7, l_ControlsQueueSto, Q_DIM(l_ControlsQueueSto), (void *)0, 0);
AO_Commands->start(6, l_CommandsQueueSto, Q_DIM(l_CommandsQueueSto), (void *)0, 0);
AO_Camera->start(5, l_CameraQueueSto, Q_DIM(l_CameraQueueSto), (void *)0, 0);
AO_Usbtask->start(2, l_UsbtaskQueueSto, Q_DIM(l_UsbtaskQueueSto), (void *)0, 0);
AO_Lights->start(1, l_LightsQueueSto, Q_DIM(l_LightsQueueSto), (void *)0, 0);
}
//////////////////////////////////////////////////////////////////////////////
// NOTE: Do not define the loop() function, because this function is
// already defined in the QP port to Arduino