Skip to content
This repository was archived by the owner on Dec 1, 2020. It is now read-only.

Commit 51aa95b

Browse files
authored
Merge branch 'develop' into feature/PM-422-add-motor-voltage
2 parents 613ff1b + 8fa120e commit 51aa95b

File tree

1 file changed

+3
-3
lines changed
  • march_hardware/include/march_hardware

1 file changed

+3
-3
lines changed

march_hardware/include/march_hardware/PDOmap.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ struct IMCObject
2020
uint8_t length; // bits (see IMC manual)
2121
uint32_t combined_address; // combine the address(hex), sub-index(hex) and length(hex)
2222

23-
explicit IMCObject(uint16_t _address, uint8_t _sub_index, uint8_t _length)
23+
IMCObject(uint16_t _address, uint8_t _sub_index, uint8_t _length)
2424
: address(_address), sub_index(_sub_index), length(_length)
2525
{
26-
uint32_t MSword = ((address & 0xFFFF) << 16);
27-
uint32_t LSword = ((sub_index & 0xFFFF) << 8) | length;
26+
uint32_t MSword = (address << 16);
27+
uint32_t LSword = (sub_index << 8) | length;
2828

2929
combined_address = (MSword | LSword);
3030
}

0 commit comments

Comments
 (0)