uavcan: esc: init msg to avoid publishing random values (#25656)

This commit is contained in:
Jacob Dahl
2025-10-01 13:24:30 -08:00
committed by GitHub
parent 2cbfe76308
commit 2574e03cb2
+1 -5
View File
@@ -84,11 +84,7 @@ UavcanEscController::update_outputs(bool stop_motors, uint16_t outputs[MAX_ACTUA
_prev_cmd_pub = timestamp;
/*
* Fill the command message
* If unarmed, we publish an empty message anyway
*/
uavcan::equipment::esc::RawCommand msg;
uavcan::equipment::esc::RawCommand msg = {};
for (unsigned i = 0; i < num_outputs; i++) {
if (stop_motors || outputs[i] == DISARMED_OUTPUT_VALUE) {