Rev 1479 | Rev 1638 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1479 | Rev 1486 | ||
---|---|---|---|
Line 26... | Line 26... | ||
26 | #define MOTOR_STATE_PRESENT_MASK 0x80 |
26 | #define MOTOR_STATE_PRESENT_MASK 0x80 |
27 | #define MOTOR_STATE_ERROR_MASK 0x7F |
27 | #define MOTOR_STATE_ERROR_MASK 0x7F |
Line 28... | Line 28... | ||
28 | 28 | ||
29 | typedef struct |
29 | typedef struct |
30 | { |
30 | { |
31 | uint8_t SetPoint; // written by attitude controller |
31 | unsigned char SetPoint; // written by attitude controller |
32 | uint8_t State; // 7 bit for I2C error counter, highest bit indicates if motor is present |
32 | unsigned char State; // 7 bit for I2C error counter, highest bit indicates if motor is present |
33 | uint8_t Current; // in 0.1 A steps, read back from BL |
33 | unsigned char Current; // in 0.1 A steps, read back from BL |
34 | uint8_t MaxPWM; // read back from BL is less than 255 if BL is in current limit |
34 | unsigned char MaxPWM; // read back from BL is less than 255 if BL is in current limit |
Line 35... | Line 35... | ||
35 | } __attribute__((packed)) MotorData_t; |
35 | } __attribute__((packed)) MotorData_t; |
Line 36... | Line 36... | ||
36 | 36 |