expose PWM mappings as endpoint_ref

This commit is contained in:
Samuel Sadok
2018-05-15 16:43:44 -07:00
parent 359eab32f6
commit d3105cfcaf
6 changed files with 75 additions and 15 deletions
+3 -2
View File
@@ -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();