heater: fix invalid file descriptor

We need to open the device later in the work queue and not in the
constructor during task_spawn.

There is already a lazy open in place, so just removing this fixes the
problem for me.
This commit is contained in:
Julian Oes
2025-04-04 16:46:23 +13:00
committed by Beat Küng
parent 74a8d897b2
commit f7740bdfd2

View File

@@ -64,16 +64,6 @@ Heater::Heater() :
ModuleParams(nullptr),
ScheduledWorkItem(MODULE_NAME, px4::wq_configurations::lp_default)
{
#ifdef HEATER_PX4IO
_io_fd = px4_open(IO_HEATER_DEVICE_PATH, O_RDWR);
if (_io_fd < 0) {
PX4_ERR("Unable to open heater device path");
return;
}
#endif
_heater_status_pub.advertise();
}