Skip to content

Commit

Permalink
Fix circuit_id type from uint8_t to uint16_t
Browse files Browse the repository at this point in the history
  • Loading branch information
olegogogo committed Dec 4, 2024
1 parent 1b5cf6d commit 43225d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/modules/circuit_status/dronecan/circuit_status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void DronecanCircuitStatus::spin_once() {

if (bitmask & static_cast<uint8_t>(Bitmask::ENABLE_5V_PUB)) {
circuit_status.msg = {
.circuit_id = static_cast<uint8_t>(node_id * 10),
.circuit_id = static_cast<uint16_t>(node_id * 10),
.voltage = CircuitPeriphery::voltage_5v(),
.current = CircuitPeriphery::current(),
.error_flags = static_cast<CircuitStatusErrorFlags_t>(error_flags),
Expand All @@ -47,7 +47,7 @@ void DronecanCircuitStatus::spin_once() {

if (bitmask & static_cast<uint8_t>(Bitmask::ENABLE_VIN_PUB)) {
circuit_status.msg = {
.circuit_id = static_cast<uint8_t>(node_id * 10 + 1),
.circuit_id = static_cast<uint16_t>(node_id * 10 + 1),
.voltage = CircuitPeriphery::voltage_vin(),
.current = CircuitPeriphery::current(),
.error_flags = static_cast<CircuitStatusErrorFlags_t>(error_flags),
Expand Down

0 comments on commit 43225d9

Please sign in to comment.