mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 00:31:36 +08:00
gz: fix gimbal message type (#25770)
This commit is contained in:
@@ -228,12 +228,12 @@ void GZGimbal::publishDeviceAttitude()
|
||||
void GZGimbal::publishJointCommand(gz::transport::Node::Publisher &publisher, const float att_stp, const float rate_stp,
|
||||
float &last_stp, const float min_stp, const float max_stp, const float dt)
|
||||
{
|
||||
gz::msgs::Float msg;
|
||||
gz::msgs::Double msg;
|
||||
|
||||
float new_stp = computeJointSetpoint(att_stp, rate_stp, last_stp, dt);
|
||||
new_stp = math::constrain(new_stp, min_stp, max_stp);
|
||||
last_stp = new_stp;
|
||||
msg.set_data(new_stp);
|
||||
msg.set_data((double)new_stp);
|
||||
|
||||
publisher.Publish(msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user