Skip to content

Commit 9400539

Browse files
committed
Removed superfluous 'bitwise&'
1 parent a7570af commit 9400539

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/BNO055ESP32.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ void BNO055::uart_readLen(bno055_reg_t reg, uint8_t *buffer, uint8_t len, uint32
175175
uint8_t cmd[4];
176176
cmd[0] = 0xAA; // Start Byte
177177
cmd[1] = 0x01; // Read
178-
cmd[2] = reg & 0xFF;
179-
cmd[3] = len & 0xFF; // len in bytes
178+
cmd[2] = reg;
179+
cmd[3] = len; // len in bytes
180180
uint8_t *data = NULL;
181181

182182
if (timeoutMS > 0) { // if we are expecting ack/response then allocate *data
@@ -251,8 +251,8 @@ void BNO055::uart_writeLen(bno055_reg_t reg, uint8_t *data2write, uint8_t len, u
251251
}
252252
cmd[0] = 0xAA; // Start Byte
253253
cmd[1] = 0x00; // Write
254-
cmd[2] = reg & 0xFF;
255-
cmd[3] = len & 0xFF; // len in bytes
254+
cmd[2] = reg;
255+
cmd[3] = len; // len in bytes
256256
memcpy(cmd + 4, data2write, len);
257257

258258
uint8_t data[2];

0 commit comments

Comments
 (0)