#ifndef REGUL_POWER
#define REGUL_POWER
#include "IQmathLib.h"
#include "pid_reg3.h"

void init_Pvect_pid(void);
void vector_power(_iq Pzad, _iq P_measured, _iq Iq, int mode, _iq Frot, _iq* Iq_zad, _iq* Id_zad);

extern PIDREG3 pidPvect;

extern _iq Id_out_max_low_speed;
extern _iq Id_out_max_full;


#define IQ_5_RPM 69905L			//5îá/ìèí
#define IQ_10_RPM 139810L
#define IQ_20_RPM 279620L
#define IQ_50_RPM 699050L
#define IQ_135_RPM 1887436L
#define IQ_165_RPM 2306867L		//165îá/ìèí
#define IQ_170_RPM 2376772L		//170îá/ìèí
#define IQ_175_RPM 2446677L
#define IQ_190_RPM 2656392L
#define IQ_250_RPM 3495253L
#define IQ_255_RPM 3565158L


#define ID_OUT_SAT_POWER 800    //0.456 ~ sin(Fi)
#define ID_OUT_SAT_POWER_LOW_SPEED (500.0)	//0.52 ~ sin(Fi)


#endif //REGUL_POWER