8#ifndef MOTORS_CONTROLLERS_H_BRIDGE_MOTOR_CONTROLLER_H_BRIDGE_H_
9#define MOTORS_CONTROLLERS_H_BRIDGE_MOTOR_CONTROLLER_H_BRIDGE_H_
20#define STARTUP_BURST_LENGHT_MS 2
21#define MAX_MOT_ACTIVE_TIME 3000
22#define ENCODER_POS_MAX 100
23#define ENCODER_ACCURACY_MULTIPLIER 100
24#define ENCODER_PROTECT_DELTA 2
26#define ADC_TO_CURRENT_UA_COEF 336
void(* MotorSelfFuncWithReason_t)(void *self, uint8_t reason)
Definition motor_controller.h:23
void(* MotorSelfFunc_t)(void *self)
Definition motor_controller.h:19
drive_calibrating_state_enum
Definition motor_controller_h_bridge.h:35
@ FCS_CALIBRATING_OPEN
Definition motor_controller_h_bridge.h:38
@ FCS_FIRST_OPEN
Definition motor_controller_h_bridge.h:36
@ FCS_CALIBRATING_CLOSE
Definition motor_controller_h_bridge.h:37
mot_start_reason_enum
Definition motor_controller_h_bridge.h:29
@ MOT_SERVICE_START
Definition motor_controller_h_bridge.h:31
@ MOT_MANUAL_START
Definition motor_controller_h_bridge.h:30
bool MotorControllerHBridgeInit(motor_controller_h_bridge_t *self, motor_controller_base_init_t *init, motor_driver_h_bridge_pwm_t *driver)
Definition motor_controller_h_bridge.c:431
drive_mode_enum
Definition motor_controller_h_bridge.h:45
@ FME_ERROR
Definition motor_controller_h_bridge.h:48
@ FME_NORMAL
Definition motor_controller_h_bridge.h:46
@ FME_OPTIC_CONTORL
Definition motor_controller_h_bridge.h:49
@ FME_CALIBRATING
Definition motor_controller_h_bridge.h:47
Definition motor_controller.h:57
Definition motor_controller.h:93
Definition motor_controller_h_bridge.h:70
uint16_t small_current_counter
Definition motor_controller_h_bridge.h:72
drive_calibrating_state_enum calib_state
Definition motor_controller_h_bridge.h:71
uint32_t close_encoder_counter
Definition motor_controller_h_bridge.h:75
uint16_t current_buffer_counter
Definition motor_controller_h_bridge.h:78
MotorSelfFunc_t CalibFinishCallback
Definition motor_controller_h_bridge.h:81
int32_t current_buffer[1000]
Definition motor_controller_h_bridge.h:77
uint32_t open_encoder_counter
Definition motor_controller_h_bridge.h:74
uint16_t no_current_counter
Definition motor_controller_h_bridge.h:73
Definition motor_controller_h_bridge.h:53
uint8_t current_limit_percent
Definition motor_controller_h_bridge.h:60
uint16_t calib_current
Definition motor_controller_h_bridge.h:56
uint32_t motor_driver_cycles_1ms
Definition motor_controller_h_bridge.h:65
uint8_t calib_status
Definition motor_controller_h_bridge.h:57
uint32_t calib_steps
Definition motor_controller_h_bridge.h:55
uint16_t overcurrent_counter_max
Definition motor_controller_h_bridge.h:62
uint32_t motor_cycles_1ms
Definition motor_controller_h_bridge.h:64
uint32_t current_limit_ua
Definition motor_controller_h_bridge.h:59
Definition motor_controller_h_bridge.h:86
motor_controller_h_bridge_settings_t * settings
Definition motor_controller_h_bridge.h:89
drive_mode_enum mode
Definition motor_controller_h_bridge.h:88
MotorSelfFuncWithReason_t StopCallback
Definition motor_controller_h_bridge.h:104
uint32_t motor_driver_cycles_1ms
Definition motor_controller_h_bridge.h:95
int brake_temer_instance
Definition motor_controller_h_bridge.h:100
int start_delay_timer_instance
Definition motor_controller_h_bridge.h:101
int startup_timer_instance
Definition motor_controller_h_bridge.h:98
motor_controller_h_bridge_calibrating_struct_t * calibrating_struct
Definition motor_controller_h_bridge.h:91
int timeout_timer_instance
Definition motor_controller_h_bridge.h:99
uint32_t motor_cycles_1ms
Definition motor_controller_h_bridge.h:94
motor_controller_base_t Base
Definition motor_controller_h_bridge.h:87
Definition motor_driver_h_bridge_pwm.h:42