Skip to content

Commit c32a473

Browse files
authored
Update ams_as5048b.cpp
1 parent 56e0fc9 commit c32a473

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ams_as5048b.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ uint8_t AMS_AS5048B::addressRegR(void) {
236236
/**************************************************************************/
237237
void AMS_AS5048B::setZeroReg(void) {
238238

239+
AMS_AS5048B::zeroRegW((uint16_t) 0x00); //Issue closed by @MechatronicsWorkman and @oilXander. The last sequence avoids any offset for the new Zero position
239240
uint16_t newZero = AMS_AS5048B::readReg16(AS5048B_ANGLMSB_REG);
240-
AMS_AS5048B::zeroRegW((uint16_t) 0x00); //Issue closed by @MechatronicsWorkman
241-
AMS_AS5048B::zeroRegW(newZero);
241+
AMS_AS5048B::zeroRegW(newZero);
242242
return;
243243
}
244244

0 commit comments

Comments
 (0)