mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-25 19:13:39 +08:00
Add microsecond delay functions.
Add DRV register/fault status reporting.
This commit is contained in:
@@ -131,6 +131,13 @@ const Endpoint endpoints[] = {
|
||||
Endpoint::make_property("Iq_measured", &motors[0].current_control.Iq_measured),
|
||||
Endpoint::make_property("Ibus", const_cast<const float*>(&motors[0].current_control.Ibus)),
|
||||
Endpoint::close_tree(),
|
||||
Endpoint::make_object("gate_driver"),
|
||||
Endpoint::make_property("drv_error", reinterpret_cast<int32_t*>(&motors[0].drv_fault)),
|
||||
Endpoint::make_property("status_reg_1", (&motors[0].gate_driver_regs.Stat_Reg_1_Value)),
|
||||
Endpoint::make_property("status_reg_2", (&motors[0].gate_driver_regs.Stat_Reg_2_Value)),
|
||||
Endpoint::make_property("ctrl_reg_1", (&motors[0].gate_driver_regs.Ctrl_Reg_1_Value)),
|
||||
Endpoint::make_property("ctrl_reg_2", (&motors[0].gate_driver_regs.Ctrl_Reg_2_Value)),
|
||||
Endpoint::close_tree(),
|
||||
Endpoint::make_object("encoder"),
|
||||
Endpoint::make_property("phase", const_cast<const float*>(&motors[0].encoder.phase)),
|
||||
Endpoint::make_property("pll_pos", &motors[0].encoder.pll_pos),
|
||||
@@ -188,6 +195,13 @@ const Endpoint endpoints[] = {
|
||||
Endpoint::make_property("Iq_measured", &motors[1].current_control.Iq_measured),
|
||||
Endpoint::make_property("Ibus", const_cast<const float*>(&motors[1].current_control.Ibus)),
|
||||
Endpoint::close_tree(),
|
||||
Endpoint::make_object("gate_driver"),
|
||||
Endpoint::make_property("drv_error", reinterpret_cast<int32_t*>(&motors[1].drv_fault)),
|
||||
Endpoint::make_property("status_reg_1", (&motors[1].gate_driver_regs.Stat_Reg_1_Value)),
|
||||
Endpoint::make_property("status_reg_2", (&motors[1].gate_driver_regs.Stat_Reg_2_Value)),
|
||||
Endpoint::make_property("ctrl_reg_1", (&motors[1].gate_driver_regs.Ctrl_Reg_1_Value)),
|
||||
Endpoint::make_property("ctrl_reg_2", (&motors[1].gate_driver_regs.Ctrl_Reg_2_Value)),
|
||||
Endpoint::close_tree(),
|
||||
Endpoint::make_object("encoder"),
|
||||
Endpoint::make_property("phase", const_cast<const float*>(&motors[1].encoder.phase)),
|
||||
Endpoint::make_property("pll_pos", &motors[1].encoder.pll_pos),
|
||||
|
||||
Reference in New Issue
Block a user