Skip to content

Commit 30fcb4f

Browse files
authored
uavcan: esc: init msg to avoid publishing random values (#25485)
1 parent ec436d3 commit 30fcb4f

File tree

1 file changed

+1
-1
lines changed
  • src/drivers/uavcan/actuators

1 file changed

+1
-1
lines changed

src/drivers/uavcan/actuators/esc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ UavcanEscController::update_outputs(uint16_t outputs[MAX_ACTUATORS], unsigned to
9696

9797
_prev_cmd_pub = timestamp;
9898

99-
uavcan::equipment::esc::RawCommand msg;
99+
uavcan::equipment::esc::RawCommand msg = {};
100100

101101
// directly output values from mixer
102102
for (unsigned i = 0; i < total_outputs; i++) {

0 commit comments

Comments
 (0)