#ifndef PARAMS_H
#define PARAMS_H

////////////////////////////////////////////////////////////////
// Loaded capasitors level
#define V_CAPASITORS_LOADED_IQ 11184810 //13421772 ~ 2400V	// 11184810 ~ 2000V
#define V_NOMINAL 15099494				//15099494 ~ 2700V

// Level of nominal current and maximum current
#define I_OUT_NOMINAL_IQ 	9777761		//6431266 ~ 1150A //2796202 ~ 500A						//By TU 1240A RMS - 1748A ~ 9777761 IQ
#define I_OUT_LIMIT_IQ 		8388608		//8388608 ~ 1500A //5592405 ~ 1000A // 4473924 ~ 800A 	//1.5*In - 2622A ~ 14666642 IQ
										//11184811 ~ 2000A // 12482249 ~ 2232A // 6710886 ~ 1200A

// Input voltage levels for protection
#define V_IN_PLUS_20  (2340)
#define V_IN_PLUS_25 2650 //2450
#define V_IN_MINUS_20 (1560)
#define V_IN_MINUS_25 1462


//ACP program errors level
#define ERR_LEVEL_ADC_PLUS   3950   //+1270A  //2950 // +650A //3467 // 3367 //3367 //3267 // 0xfff-0x29c
#define ERR_LEVEL_ADC_MINUS  150    //-1270A  //1150 //-650A // 267 //367
#define ERR_LEVEL_ADC_PLUS_6 650	//875 ~ 2500V //650 ~ 3000B // 740 ~ 2800B // 
#define ERR_LEVEL_ADC_MINUS_6 1205 //1775V ~ 1205
#define ERR_LEVEL_I_FAZA_PLUS   594 //1760A ~ 1058 //2000A ~ 924 //843 ~ 2100A // 594 ~ 2500A
#define ERR_LEVEL_I_FAZA_MINUS  3496 //1760A ~ 3031 //2000A ~ 3166 //3226 ~2100A // 3496 ~ 2500A
#define ERR_LEVEL_I_ZPT_PLUS   520 //520 ~ 1500A
#define ERR_LEVEL_BREAK_REZ 858 //858 ~ 800A
#define MIN_DETECT_UD_ZERO 2300

#define ERR_LEVEL_ADC_PLUS_6_ON_GO_IQ 16777216 //3000V // 16217975 //2900V
#define ERR_LEVEL_ADC_PLUS_6_IQ	16777216 //3000V   //15658734 //2800V

// Temperature protection levels
#define TEMPERATURE_LIMIT 600 //Area temperature
#define TEMPERATURE_WARNING 500
#define TEMPERATURE_WATER_LIMIT 500 //Water temeperature
#define TEMPERATURE_WATER_WARNING 450
#define TEMPERATURE_WATER_FAZA_LIMIT 500 //Water temperature on phase output
#define TEMPERATURE_WATER_FAZA_WARNING 450
#define TEMPERATURE_WATER_SNABBER_RESISTORS_LIMIT 500
#define TEMPERATURE_WATER_SNABBER_RESISTORS_WARNING 450
#define TEMPERATURE_WATER_DROSSEL_LIMIT 600	//Output drossel water limits
#define TEMPERATURE_WATER_DROSSEL_WARNING 500
#define TEMPERATURE_WATER_DIODS_LIMIT 500	//water temperature at rectifier outlet
#define TEMPERATURE_WATER_DIODS_WARNING 450
#define TEMPERATURE_WATER_CHOPPER_LIMIT 500
#define TEMPERATURE_WATER_CHOPPER_WARNING 450
#define TEMPERATURE_REZISTORS_LIMIT_BV 600 //temperature on coolers of input filter resistors
#define TEMPERATURE_REZISTORS_WARNING_BV 500
#define TEMPERATURE_REZISTORS_LIMIT_BI 500 //temperature on the coolers of the output filter resistors
#define TEMPERATURE_REZISTORS_WARNING_BI 450
#define TEMPERATURE_INPUT_BSO_DN20 500
#define TEMPERATURE_INPUT_BSO_DN100 500
#define TEMPERATURE_OUTPUT_BSO_DN20 400
#define TEMPERATURE_OUTPUT_BSO_DN100 400
////////////////////////////////////
#define TEMPERATURE_AREA_DATCHIK_ERROR -100



#endif	//PARAMS_H