Fixing "stuck in jogging" bug.

This commit is contained in:
David Carley
2022-08-31 15:56:33 +00:00
parent 2f97bdd4aa
commit ed1e4e6511
3 changed files with 20 additions and 9 deletions

View File

@@ -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

View File

@@ -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;
}
}