ctr_mcu/branches/0.10(fix)/pedometer.h

100 lines
1.4 KiB
C

#ifndef _pedo_
#define _pedo_
void hosu_read_end( );
u8 hosu_read( );
void fill_hosu_hist_hours( u16 );
void clear_hosu_hist();
// =========================================================
#define TAP 64
#define FIL_COEFF_QUANT 10
static const s8 lpf_coeff[]={
/*
Window Function Algorithm LPF
Sampling Frequency = 100.0
cutoff1 = 6.0000000
Tap Count =64
Kaiser Constant = 7.000000
Quantized by 11 [bits]
*/
/* 0,// [0]
0,
0,
0,
0,
0,
0,
0,
*/
1,// 8
2,
2,
3,
3,
2,
0,
-2,
-5,// 16
-9,
-13,
-16,
-16,
-13,
-6,
4,
18,// 24
37,
56,
77,
95,
110,
119,
122,
119,// 32
110,
95,
77,
56,
37,
18,
4,
-6,// 40
-13,
-16,
-16,
-13,
-9,
-5,
-2,
0,// 48
2,
3,
3,
2,
2,
1,
/*
0,
0,// 56
0,
0,
0,
0,
0,
0,
0
*/
};
// */
// =========================================================
void pedometer();
static void hosu_increment();
#endif