implement mapping table
contails pointer bug
This commit is contained in:
19
Inc/mapping_table.h
Normal file
19
Inc/mapping_table.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "uart_dmx.h"
|
||||
|
||||
typedef struct{
|
||||
uint16_t tilt;
|
||||
uint8_t endless_rot;
|
||||
} motor_mapping_T;
|
||||
|
||||
typedef struct{
|
||||
motor_mapping_T channels[12];
|
||||
uint8_t automode;
|
||||
} fixture_mapping_T;
|
||||
|
||||
#define AUTOMODE_NO_FUNC_L 0
|
||||
#define AUTOMODE_NO_FUNC_H 4
|
||||
#define AUTOMODE_GOTO_REF_L 5
|
||||
#define AUTOMODE_GOTO_REF_H 9
|
||||
#define AUTOMODE_CLASSIC_L 10
|
||||
#define AUTOMODE_CLASSIC_H 14
|
||||
|
||||
@@ -12,11 +12,13 @@ typedef struct {
|
||||
uint8_t homed:1;
|
||||
uint8_t trigger_step:1;
|
||||
int16_t pos;
|
||||
int16_t speed;
|
||||
int16_t ramp_to_speed;
|
||||
int32_t speed;
|
||||
int32_t ramp_to_speed;
|
||||
uint32_t next_step;
|
||||
} stepper_T;
|
||||
|
||||
|
||||
#define STEPPER_SPEED_LIMIT 300
|
||||
|
||||
void Timer1_Init(void);
|
||||
void stepper_gpio_init();
|
||||
void do_steps();
|
||||
|
||||
Reference in New Issue
Block a user