-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathksfeeder.h
80 lines (63 loc) · 1.86 KB
/
ksfeeder.h
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
69
70
71
72
73
74
75
76
77
78
79
80
/**
* __ ____
* / /__ _ __ / __/ __
* / //_/(_)/ /_ / / ___ ____ ___ __ __ / /_
* / ,< / // __/_\ \ / _ \ / __// _ \/ // // __/
* /_/|_|/_/ \__//___// .__//_/ \___/\_,_/ \__/
* /_/ github.com/KitSprout
*
* @file ksfeeder.h
* @author KitSprout
* @brief
*
*/
/* Define to prevent recursive inclusion ---------------------------------------------------*/
#ifndef __KSFEEDER_H
#define __KSFEEDER_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes --------------------------------------------------------------------------------*/
#include <stdint.h>
#include "kscsv.h"
/* Define ----------------------------------------------------------------------------------*/
#ifndef KSFEEDER_VERSION_DEFINE
#define KSFEEDER_VERSION_DEFINE "1.0.2"
#endif
/* Macro -----------------------------------------------------------------------------------*/
/* Typedef ---------------------------------------------------------------------------------*/
typedef enum
{
VERSION_MODE = 0,
ONLINE_MODE,
OFFLINE_MODE
} ksraw_mode_t;
typedef struct
{
float sn;
float ts;
float dt;
float g[3], gr[3], gb[3];
float a[3], ar[3], ab[3];
float m[3], mr[3], mb[3];
float p, t;
float ag[3], al[3];
float rv[4], rva[4], rvm[4];
int index;
int mode;
} ksraw_tag_t;
typedef struct
{
union {
float mem[KSCSV_IDX_TOTAL];
ksraw_tag_t raw;
};
} ksraw_t;
/* Extern ----------------------------------------------------------------------------------*/
/* Functions -------------------------------------------------------------------------------*/
int ksfeeder(int index, ksraw_tag_t *raw);
#ifdef __cplusplus
}
#endif
#endif
/*************************************** END OF FILE ****************************************/