mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-28 16:13:37 +08:00
Fix get_iq_callbacks function
This commit is contained in:
@@ -319,11 +319,11 @@ bool CANSimple::get_iq_callback(const Axis& axis) {
|
||||
if (!Idq_setpoint.has_value()) {
|
||||
Idq_setpoint = {0.0f, 0.0f};
|
||||
}
|
||||
|
||||
static_assert(sizeof(float) == sizeof(Idq_setpoint->first));
|
||||
|
||||
static_assert(sizeof(float) == sizeof(Idq_setpoint->second));
|
||||
can_setSignal<float>(txmsg, Idq_setpoint->first, 0, 32, true);
|
||||
can_setSignal<float>(txmsg, Idq_setpoint->second, 32, 32, true);
|
||||
static_assert(sizeof(float) == sizeof(axis.motor_.current_control_.Iq_measured_));
|
||||
can_setSignal<float>(txmsg, Idq_setpoint->second, 0, 32, true);
|
||||
can_setSignal<float>(txmsg, axis.motor_.current_control_.Iq_measured_, 32, 32, true);
|
||||
|
||||
return canbus_->send_message(txmsg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user