From c0f109e2c52a9dfbbf7c45e1c33dd7794c8032ea Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 10 Dec 2020 21:44:19 +0100 Subject: [PATCH] motorcontrol: remove hardcoded paths Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/793200339e9e0510954c0a81a2b5214767f55db8 Author: vanhofen Date: 2020-12-10 (Thu, 10 Dec 2020) Origin message was: ------------------ - motorcontrol: remove hardcoded paths --- src/gui/motorcontrol.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/motorcontrol.cpp b/src/gui/motorcontrol.cpp index 037dffc78..6ef0ac6e1 100644 --- a/src/gui/motorcontrol.cpp +++ b/src/gui/motorcontrol.cpp @@ -569,7 +569,8 @@ void CMotorControl::startSatFind(void) break; case 0: printf("[motorcontrol] starting satfind...\n"); - if (execlp("/bin/satfind", "satfind", NULL) < 0) + std::string satfind = find_executable("satfind"); + if (satfind.empty() || execlp(satfind.c_str(), "satfind", NULL) < 0) printf("[motorcontrol] execlp satfind failed.\n"); break; } /* switch */