mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-24 13:36:37 +08:00
Differential Rover: Ported R1 to GZ and introduced new GZ wheel interface
This commit is contained in:
@@ -226,6 +226,11 @@ int GZBridge::init()
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
if (!_mixing_interface_motor.init(_model_name)) {
|
||||
PX4_ERR("failed to init motor output");
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
ScheduleNow();
|
||||
return OK;
|
||||
}
|
||||
@@ -724,6 +729,7 @@ void GZBridge::Run()
|
||||
|
||||
_mixing_interface_esc.stop();
|
||||
_mixing_interface_servo.stop();
|
||||
_mixing_interface_motor.stop();
|
||||
|
||||
exit_and_cleanup();
|
||||
return;
|
||||
@@ -739,6 +745,7 @@ void GZBridge::Run()
|
||||
|
||||
_mixing_interface_esc.updateParams();
|
||||
_mixing_interface_servo.updateParams();
|
||||
_mixing_interface_motor.updateParams();
|
||||
}
|
||||
|
||||
ScheduleDelayed(10_ms);
|
||||
@@ -754,6 +761,9 @@ int GZBridge::print_status()
|
||||
PX4_INFO_RAW("Servo outputs:\n");
|
||||
_mixing_interface_servo.mixingOutput().printStatus();
|
||||
|
||||
PX4_INFO_RAW("Motor outputs:\n");
|
||||
_mixing_interface_motor.mixingOutput().printStatus();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user