Fixing "stuck in jogging" bug.
This commit is contained in:
@@ -201,7 +201,7 @@ enum {
|
||||
#define I2C_DEV TWIC
|
||||
#define I2C_ISR TWIC_TWIS_vect
|
||||
#define I2C_ADDR 0x2b
|
||||
#define I2C_MAX_DATA 8
|
||||
#define I2C_MAX_DATA 16
|
||||
|
||||
|
||||
// Motor
|
||||
|
||||
@@ -62,7 +62,9 @@ static void _i2c_end_command() {
|
||||
|
||||
|
||||
static void _i2c_command_byte(uint8_t byte) {
|
||||
i2c.data[i2c.length++] = byte;
|
||||
if (i2c.length < I2C_MAX_DATA) {
|
||||
i2c.data[i2c.length++] = byte;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user