51 lines
1.1 KiB
C
51 lines
1.1 KiB
C
|
/*
|
|||
|
* detect_phase_break2.h
|
|||
|
*
|
|||
|
* Created on: 10 <EFBFBD><EFBFBD><EFBFBD>. 2020 <EFBFBD>.
|
|||
|
* Author: star
|
|||
|
*/
|
|||
|
|
|||
|
#ifndef SRC_MAIN_DETECT_PHASE_BREAK2_H_
|
|||
|
#define SRC_MAIN_DETECT_PHASE_BREAK2_H_
|
|||
|
|
|||
|
#include "IQmathLib.h"
|
|||
|
|
|||
|
|
|||
|
typedef struct {
|
|||
|
_iq iqCh[3];
|
|||
|
_iq sum_brocken_out[4]; // 4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD> <20><><EFBFBD><EFBFBD>. <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
_iq freq_signal;
|
|||
|
|
|||
|
int brocken_i_out;
|
|||
|
int return_brocken_code;
|
|||
|
_iq plus_a;
|
|||
|
|
|||
|
|
|||
|
struct {
|
|||
|
unsigned int freq_pwm;
|
|||
|
unsigned int norma_freq;
|
|||
|
|
|||
|
_iq minimal_level;
|
|||
|
_iq calc_const;
|
|||
|
_iq iq_freq;
|
|||
|
} config;
|
|||
|
|
|||
|
int (*calc)();
|
|||
|
void (*init)();
|
|||
|
void (*clear_error)();
|
|||
|
|
|||
|
} BREAK2_PHASE;
|
|||
|
|
|||
|
#define BREAK2_PHASE_DEFAULTS {{0,0,0},\
|
|||
|
{0,0,0,0},\
|
|||
|
0,0,0,0,\
|
|||
|
0,0,0,0,0, \
|
|||
|
calc_break2_phase, init_break2_phase, clear_break2_phase }
|
|||
|
|
|||
|
void check_brocken_phase(BREAK2_PHASE *v);
|
|||
|
int calc_break2_phase(BREAK2_PHASE *v);
|
|||
|
void init_break2_phase(BREAK2_PHASE *v);
|
|||
|
void clear_break2_phase(BREAK2_PHASE *v);
|
|||
|
|
|||
|
#endif /* SRC_MAIN_DETECT_PHASE_BREAK2_H_ */
|