matlab_23550/Inu/Src2/551/main/params_bsu.h
Razvalyaev 7e0063eee0 #3 Скомпилилось, но пока ничего не вызывается
Все основные файлы подтянуты без изменений

Изменены (только папка main_matlab):
- заглушки для ненужных функций (main_matlab.c)
- iq библиотека (IQmathLib_matlab.c)
- библиотеки DSP281x
2025-01-13 11:09:58 +03:00

124 lines
2.7 KiB
C

/*
* params_bsu.h
*
* Created on: 14 ôåâð. 2020 ã.
* Author: yura
*/
#ifndef SRC_MAIN_PARAMS_BSU_H_
#define SRC_MAIN_PARAMS_BSU_H_
#include "iq_values_norma_f.h"
#include "iq_values_norma_iu.h"
#include "iq_values_norma_oborot.h"
#define TKAK_23550 1
#define TKAK_EDRK 2
#define TKAK_VERSION TKAK_23550
//#define TKAK_VERSION TKAK_EDRK
// äëÿ 23550_sp2
#define TK_DEAD_TIME_NS 25000 //25.0 //40.0
#define TK_ACKN_TIME_NS 2200
#define TK_MIN_TIME_NS 25000 //80.0 //35.0 // 15.0 //40.0
#define TK_SOFT_OFF_TIME_NS 20000 //25.0 //40.0
#define DIV_TIME_TK_SOFT_OFF 20 // 20 nsec -> 1 bit
#define DIV_TIME_TK_DEAD 640 //0.16 // 160 nsec -> 1 bit
#define DIV_TIME_TK_MIN 640 //0.16 // 160 nsec -> 1 bit
#define DIV_TIME_TK_ACKN 20 // 20 nsec -> 1 bit
// äëÿ ýäðê sp2
#define TK_DEAD_TIME_MKS 25.0 //40.0
#define TK_ACKN_TIME_MKS 2.2
#define TK_MIN_TIME_MKS 25.0 // 15.0 //40.0
#define DIV_TIME_TK 0.4 // 0.16
#define MAX_READ_SBUS 1 //10
#if (_FLOOR6==1)
// tkak
#define TKAK0_OFF_PROTECT 1
#define TKAK1_OFF_PROTECT 1
#define TKAK2_OFF_PROTECT 1
#define TKAK3_OFF_PROTECT 1
#define IN0_OFF_PROTECT 1
#define IN1_OFF_PROTECT 1
#define OUT0_OFF_PROTECT 1
#else
// tkak
#define TKAK0_OFF_PROTECT 0
#define TKAK1_OFF_PROTECT 0
#define TKAK2_OFF_PROTECT 0
#define TKAK3_OFF_PROTECT 0
#define IN0_OFF_PROTECT 0
#define IN1_OFF_PROTECT 0
#define OUT0_OFF_PROTECT 0
#endif
// çàïðåò íà âûõîä ØÈÌà íà îïòèêó
#define TK_DISABLE_OUTPUT_A1 0
#define TK_DISABLE_OUTPUT_B1 0
#define TK_DISABLE_OUTPUT_C1 0
#define TK_DISABLE_OUTPUT_A2 0
#define TK_DISABLE_OUTPUT_B2 0
#define TK_DISABLE_OUTPUT_C2 0
//////////////////////
#define ENABLE_ROTOR_SENSOR_ZERO_SIGNAL 0
#define ENABLE_ROTOR_SENSOR_1_PM67 1
#define ENABLE_ROTOR_SENSOR_2_PM67 0
#define ENABLE_ROTOR_SENSOR_1_PBUS 0//1
#define ENABLE_ROTOR_SENSOR_2_PBUS 0//1
#if (ENABLE_ROTOR_SENSOR_1_PM67==1 && ENABLE_ROTOR_SENSOR_2_PM67==0)
// ïðîáðîñ 1-ãî äàò÷èêà íà âõîä 2-ãî
#define ENABLE_COMBO_SENSOR_1_TO_2 1
#define ENABLE_COMBO_SENSOR_2_TO_1 0
#endif
#if (ENABLE_ROTOR_SENSOR_1_PM67==0 && ENABLE_ROTOR_SENSOR_2_PM67==1)
// ïðîáðîñ 2-ãî äàò÷èêà íà âõîä 1-ãî
#define ENABLE_COMBO_SENSOR_2_TO_1 1
#define ENABLE_COMBO_SENSOR_1_TO_2 0
#endif
#if (ENABLE_ROTOR_SENSOR_1_PM67==1 && ENABLE_ROTOR_SENSOR_2_PM67==1)
#define ENABLE_COMBO_SENSOR_1 0
#define ENABLE_COMBO_SENSOR_1 0
#endif
#define ROTOR_SENSOR_IMPULSES_PER_ROTATE 4096 // 1024 // êîë-âî èìïóëüñîâ íà 1 îáîðîò ñ äàò÷èêà
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
#endif /* SRC_MAIN_PARAMS_BSU_H_ */