mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 16:56:25 +08:00
uavcan: esc: init msg to avoid publishing random values (#25656)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user