Miguel Angel Caycho
/
Pruebas_Ventilador_Eplimin_01_Backup
para el ventilador
Diff: project_defines.h
- Revision:
- 6:d38287621cca
- Parent:
- 4:d42e1953243c
- Child:
- 7:f4e248182d31
diff -r bd5fc0510e7b -r d38287621cca project_defines.h --- a/project_defines.h Sun Apr 19 05:38:41 2020 +0000 +++ b/project_defines.h Mon Apr 20 11:39:30 2020 +0000 @@ -15,15 +15,9 @@ #define ENCODER_A_SIGNAL PA_13 #define ENCODER_B_SIGNAL PA_14 -//TFT display -#define TFT_D0 D8 -#define TFT_D1 D9 -#define TFT_D2 D2 -#define TFT_D3 D3 -#define TFT_D4 D4 -#define TFT_D5 D5 -#define TFT_D6 D6 -#define TFT_D7 D7 +//Nextion display +#define NEXTION_TX_PIN PC_10 +#define NEXTION_RX_PIN PC_11 //Stepper motor #define STEPPER_PULSE_PIN PC_8 @@ -52,14 +46,18 @@ #define RESP_FREQUENCY_INDEX_DEFAULT 10 #define I_E_RATIO_INDEX_DEFAULT 0 -/* Defines for the TFT user interface */ -#define BACKGROUND_COLOR Black -#define INDICATOR_BOX_LINE_COLOR Green -#define INDICATOR_HEADER_TEXT_COLOR Yellow -#define INDICATOR_VALUE_TEXT_COLOR White -#define INDICATOR_UNITS_TEXT_COLOR White -#define PARAMETER_SELECTION_BOX_COLOR Yellow -#define PARAMETER_ADJUST_TEXT_COLOR Green +/* Defines for the Nextion user interface */ +#define NORMAL_COLOR BLACK +#define SELECT_COLOR BLUE +#define ADJUST_COLOR GREEN + +//#define BACKGROUND_COLOR Black +//#define INDICATOR_BOX_LINE_COLOR Green +//#define INDICATOR_HEADER_TEXT_COLOR Yellow +//#define INDICATOR_VALUE_TEXT_COLOR White +//#define INDICATOR_UNITS_TEXT_COLOR White +//#define PARAMETER_SELECTION_BOX_COLOR Yellow +//#define PARAMETER_ADJUST_TEXT_COLOR Green #define HEADERS_ROW1_Y_POS 20 #define HEADERS_ROW2_Y_POS 180 @@ -74,7 +72,7 @@ #define EXPIRATION_TIME_VALUE_DEFAULT 2.0 #define VOLUME_SETPOINT_MINIMUM_VALUE 250 -#define VOLUME_SETPOINT_STEP 50 +#define VOLUME_SETPOINT_STEP 50 #define AIR_INPUT 0 #define OXYGEN_INPUT 1 @@ -103,12 +101,23 @@ #define STEPPER_DRIVER_DEFAULT_STATE Stepper_Driver_Home_Ramp #define STEPPER_CALIBRATION_FREQUENCY_HZ 200 -#define STEPPER_START_BRAKE_FREQUENCY_HZ 100 -#define STEPPER_START_BRAKE_PERIOD_US (1000000.0/STEPPER_START_BRAKE_FREQUENCY_HZ) -#define SHORT_RAMP_STEPS 25 + // Number of steps used for the speed ramp, can be either 50 or 100 #define RAMP_STEPS 50 - +#if RAMP_STEPS == 50 + #define STEPPER_START_BRAKE_FREQUENCY_HZ 300 +#elif RAMP_STEPS == 100 + #define STEPPER_START_BRAKE_FREQUENCY_HZ 500 +#else + #error "Select a valid value for RAMP_STEPS: either 50 or 100" +#endif -#endif \ No newline at end of file +#define STEPPER_MAX_FREQUENCY_HZ 3000 + +#define STEPPER_START_BRAKE_PERIOD_US (1000000.0/STEPPER_START_BRAKE_FREQUENCY_HZ) +#define SHORT_RAMP_STEPS 25 + +#define TUNING_FACTOR 1.25 + +#endif