mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Operational mixing and outputs in hil
This commit is contained in:
parent
ee5abb0745
commit
41629e0ddb
@ -211,8 +211,9 @@ HIL::init()
|
||||
if (ret != OK)
|
||||
return ret;
|
||||
|
||||
/* try to claim the generic PWM output device node as well - it's OK if we fail at this */
|
||||
ret = register_driver(PWM_OUTPUT_DEVICE_PATH, &fops, 0666, (void *)this);
|
||||
// XXX already claimed with CDEV
|
||||
///* try to claim the generic PWM output device node as well - it's OK if we fail at this */
|
||||
//ret = register_driver(PWM_OUTPUT_DEVICE_PATH, &fops, 0666, (void *)this);
|
||||
if (ret == OK) {
|
||||
log("default PWM output device");
|
||||
_primary_pwm_device = true;
|
||||
@ -821,12 +822,12 @@ hil_main(int argc, char *argv[])
|
||||
if (strcmp(argv[i], "-u") == 0 || strcmp(argv[i], "--update-rate") == 0) {
|
||||
// if (new_mode == PORT1_FULL_PWM || new_mode == PORT1_PWM_AND_GPIO) {
|
||||
// XXX all modes have PWM settings
|
||||
if (argc > i + 1) {
|
||||
pwm_update_rate_in_hz = atoi(argv[i + 1]);
|
||||
} else {
|
||||
fprintf(stderr, "missing argument for pwm update rate (-u)\n");
|
||||
return 1;
|
||||
}
|
||||
if (argc > i + 1) {
|
||||
pwm_update_rate_in_hz = atoi(argv[i + 1]);
|
||||
} else {
|
||||
fprintf(stderr, "missing argument for pwm update rate (-u)\n");
|
||||
return 1;
|
||||
}
|
||||
// } else {
|
||||
// fprintf(stderr, "pwm update rate currently only supported for mode_pwm, mode_pwm_gpio\n");
|
||||
// }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user