From f7740bdfd2fc3326df358a79b5cdff40efa50795 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Fri, 4 Apr 2025 16:46:23 +1300 Subject: [PATCH] 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. --- src/drivers/heater/heater.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/drivers/heater/heater.cpp b/src/drivers/heater/heater.cpp index aba6f7066e..d00a6926ac 100644 --- a/src/drivers/heater/heater.cpp +++ b/src/drivers/heater/heater.cpp @@ -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(); }