forked from cacao-org/AOloopControl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAOloopControl_loop_ctr.c
69 lines (43 loc) · 1.46 KB
/
AOloopControl_loop_ctr.c
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/**
* @file AOloopControl_loop_ctr.c
* @brief AO loop Control functions wave front sensor and deformable mirror
*
* LOOP CONTROL INTERFACE
*
*
*
* @bug No known bugs.
*
*/
#define _GNU_SOURCE
#include "AOloopControl.h"
#include "string.h"
extern AOLOOPCONTROL_CONF *AOconf; // configuration - this can be an array
extern AOloopControl_var aoloopcontrol_var;
/* =============================================================================================== */
/* =============================================================================================== */
/** @name AOloopControl - 3. LOOP CONTROL INTERFACE - AOloopControl_loop_ctr.c
* Set parameters */
/* =============================================================================================== */
/* =============================================================================================== */
int_fast8_t AOloopControl_setLoopNumber(long loop)
{
printf("LOOPNUMBER = %ld\n", loop);
aoloopcontrol_var.LOOPNUMBER = loop;
/** append process name with loop number */
return 0;
}
int_fast8_t AOloopControl_setparam(long loop, const char *key, double value)
{
int pOK=0;
char kstring[200];
strcpy(kstring, "PEperiod");
if((strncmp (key, kstring, strlen(kstring)) == 0)&&(pOK==0))
{
//AOconf[loop].WFScamPEcorr_period = (long double) value;
pOK = 1;
}
if(pOK==0)
printf("Parameter not found\n");
return (0);
}