HIL driver: Fix output clamping in HIL mode, clean up commented out sections

This commit is contained in:
Lorenz Meier
2015-08-12 19:11:34 +02:00
parent 8a3301c73c
commit b81ae9473b
+3 -16
View File
@@ -207,11 +207,6 @@ HIL::~HIL()
} while (_task != -1);
}
// XXX already claimed with CDEV
// /* clean up the alternate device node */
// if (_primary_pwm_device)
// unregister_driver(PWM_OUTPUT_DEVICE_PATH);
g_hil = nullptr;
}
@@ -231,19 +226,10 @@ HIL::init()
if (ret != OK) {
return ret;
}
// 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) {
DEVICE_LOG("default PWM output device");
} else {
_primary_pwm_device = true;
}
/* reset GPIOs */
// gpio_reset();
/* start the HIL interface task */
_task = px4_task_spawn_cmd("fmuhil",
SCHED_DEFAULT,
@@ -455,7 +441,8 @@ HIL::task_main()
/* get new value */
orb_copy(ORB_ID(actuator_armed), _t_armed, &aa);
_armed = aa.armed && !aa.lockdown;
/* do not obey the lockdown value, as lockdown is for HIL */
_armed = aa.armed;
}
}