added current monitoring to pcb, many code fixes for the protocol / feed control logic, completely reworked diagnostic tool
This commit is contained in:
@@ -65,6 +65,12 @@ void Error_Handler(void);
|
||||
#define PEEL1_GPIO_Port GPIOA
|
||||
#define PEEL2_Pin GPIO_PIN_3
|
||||
#define PEEL2_GPIO_Port GPIOA
|
||||
#define ONEWIRE_Pin GPIO_PIN_6
|
||||
#define ONEWIRE_GPIO_Port GPIOA
|
||||
#define IPROP_PEEL_Pin GPIO_PIN_7
|
||||
#define IPROP_PEEL_GPIO_Port GPIOA
|
||||
#define IPROP_DRIVE_Pin GPIO_PIN_12
|
||||
#define IPROP_DRIVE_GPIO_Port GPIOB
|
||||
#define DRIVE1_Pin GPIO_PIN_8
|
||||
#define DRIVE1_GPIO_Port GPIOA
|
||||
#define DRIVE2_Pin GPIO_PIN_9
|
||||
@@ -73,8 +79,6 @@ void Error_Handler(void);
|
||||
#define QUAD_A_GPIO_Port GPIOC
|
||||
#define QUAD_B_Pin GPIO_PIN_7
|
||||
#define QUAD_B_GPIO_Port GPIOC
|
||||
#define ONEWIRE_Pin GPIO_PIN_10
|
||||
#define ONEWIRE_GPIO_Port GPIOA
|
||||
#define LED_R_Pin GPIO_PIN_3
|
||||
#define LED_R_GPIO_Port GPIOB
|
||||
#define LED_B_Pin GPIO_PIN_4
|
||||
|
||||
@@ -82,8 +82,8 @@ static inline pid_motor_cmd_t pid_update_motor(pid_i32_t *pid,
|
||||
|
||||
int32_t error = setpoint - position;
|
||||
|
||||
// Deadband: if within ±3 counts, hold position and reset integrator
|
||||
if (error >= -3 && error <= 3) {
|
||||
// Deadband: if within ±1 count (~0.005mm), hold position and reset integrator
|
||||
if (error >= -1 && error <= 1) {
|
||||
pid->integrator = 0;
|
||||
pid->prev_error = 0;
|
||||
pid->last_output = 0;
|
||||
|
||||
@@ -35,7 +35,7 @@ extern "C" {
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
/* #define HAL_ADC_MODULE_ENABLED */
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
/* #define HAL_CRC_MODULE_ENABLED */
|
||||
/* #define HAL_CRYP_MODULE_ENABLED */
|
||||
/* #define HAL_I2C_MODULE_ENABLED */
|
||||
|
||||
@@ -57,6 +57,7 @@ void DMA1_Channel2_3_IRQHandler(void);
|
||||
void TIM14_IRQHandler(void);
|
||||
void TIM16_IRQHandler(void);
|
||||
void TIM17_IRQHandler(void);
|
||||
void USART2_IRQHandler(void);
|
||||
/* USER CODE BEGIN EFP */
|
||||
|
||||
/* USER CODE END EFP */
|
||||
|
||||
Reference in New Issue
Block a user