/*
 * node-red-config.h
 *
 *  Created on: Jun 14, 2024
 *      Author: jakubski
 */

#ifndef INC_NODE_RED_CONFIG_H_
#define INC_NODE_RED_CONFIG_H_

#define PV_BOARD

#define FEATURE_ON 1
#define FEATURE_OFF 0

#define UART_TASK_LOGS FEATURE_ON

#define ENCODER_X_IMP_PER_TURN (4 * 200) // (4 interrupts) * (Encoder positions count for 360 deggres)
#define ENCODER_Y_IMP_PER_TURN (4 * 200) // (4 interrupts) * (Encoder positions count for 360 degress)

#define MAX_X_AXE_ANGLE 360	// Max angle value for 100% range
#define MAX_Y_AXE_ANGLE 360 // Max angle value for 100% range
#define MOTOR_START_STOP_PWM_VALUE 60 // PWM duty for slow down/speed up movement phase
#define MOTOR_HIGH_SPEED_PWM_VALUE 100 // PWM duty for normal movement phase

#define ANGLE_RANGE_FOR_MOTOR_SPEED_LIMIT 5 // percentage value for motor slow down/speed up boundary
#define AXE_X_MIDDLE_VALUE 50 // percentage value of position for C limiter
#define AXE_Y_MIDDLE_VALUE 50 // percentage value of position for C limiter
#define TIME_MS_FOR_MOTOR_SPEED_LIMIT 5000
#define NO_MOVE_TIMEOUT_MS 5000 // timeout for no movement detection

#define WATCHDOG_ENABLED
//#define USER_MOCKS
//#define SERIAL_PROTOCOL_DBG
//#define USE_UART8_INSTEAD_UART1
//#define DBG_POSITION

#endif /* INC_NODE_RED_CONFIG_H_ */
