Rev 156 | Rev 261 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 156 | Rev 157 | ||
---|---|---|---|
1 | #include "91x_lib.h" |
1 | #include "91x_lib.h" |
2 | #include "params.h" |
2 | #include "params.h" |
3 | 3 | ||
4 | 4 | ||
5 | s16 NCParams[255]; |
5 | s16 NCParams[255]; |
6 | 6 | ||
7 | void NCParams_Init(void) |
7 | void NCParams_Init(void) |
8 | { |
8 | { |
9 | NCParams[NCPARAMS_GPS_TARGETSPEED] = 50; // 5.0 m/s |
9 | NCParams[NCPARAMS_GPS_TARGETSPEED] = 50; // 5.0 m/s |
10 | } |
10 | } |
11 | 11 | ||
12 | u8 NCParams_SetValue(u8 id, s16 value) |
12 | u8 NCParams_SetValue(u8 id, s16* pvalue) |
13 | { |
13 | { |
14 | NCParams[id] = value; |
14 | NCParams[id] = *pvalue; |
15 | return 1; |
15 | return 1; |
16 | } |
16 | } |
17 | 17 | ||
18 | s16 NCParams_GetValue(u8 id) |
18 | u8 NCParams_GetValue(u8 id, s16* pvalue) |
- | 19 | { |
|
19 | { |
20 | if(pvalue == 0) return 0; |
- | 21 | *pvalue = NCParams[id]; |
|
20 | return NCParams[id]; |
22 | return 1; |
21 | } |
23 | } |
22 | 24 |