Skip to content

Commit

Permalink
Merge pull request #49 from zbas/patch-1
Browse files Browse the repository at this point in the history
Update AS5600.cpp
  • Loading branch information
runger1101001 authored Aug 12, 2024
2 parents 5065c84 + 778f92b commit 4a722f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/encoders/as5600/AS5600.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ void AS5600::setZPos(uint16_t value) {
void AS5600::setI2CAddr(uint8_t value) {
uint8_t val = (uint8_t)readRegister(AS5600_REG_I2CADDR, 1);
val = (value<<1) | (val&0x01);
writeRegister(AS5600_REG_I2CADDR, val);
writeRegister(AS5600_REG_I2CADDR, val, 1);
};

void AS5600::setI2CUpdt(uint8_t value) {
uint8_t val = (uint8_t)readRegister(AS5600_REG_I2CUPDT, 1);
val = (value<<1) | (val&0x01);
writeRegister(AS5600_REG_I2CUPDT, val);
writeRegister(AS5600_REG_I2CUPDT, val, 1);
};


Expand Down

0 comments on commit 4a722f7

Please sign in to comment.