mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-23 09:03:40 +08:00
expose PWM mappings as endpoint_ref
This commit is contained in:
@@ -116,8 +116,6 @@ int odrive_main(void) {
|
||||
axes[i] = new Axis(hw_configs[i].axis_config, axis_configs[i],
|
||||
*encoder, *sensorless_estimator, *controller, *motor);
|
||||
}
|
||||
|
||||
pwm_in_init();
|
||||
|
||||
// TODO: make dynamically reconfigurable
|
||||
#if HW_VERSION_MAJOR == 3 && HW_VERSION_MINOR >= 3
|
||||
@@ -131,6 +129,9 @@ int odrive_main(void) {
|
||||
// Init communications (this requires the axis objects to be constructed)
|
||||
init_communication();
|
||||
|
||||
// must happen after communication is initialized
|
||||
pwm_in_init();
|
||||
|
||||
// Setup hardware for all components
|
||||
for (size_t i = 0; i < AXIS_COUNT; ++i) {
|
||||
axes[i]->setup();
|
||||
|
||||
Reference in New Issue
Block a user