motorcontrol: remove hardcoded paths

Origin commit data
------------------
Commit: 793200339e
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-12-10 (Thu, 10 Dec 2020)

Origin message was:
------------------
- motorcontrol: remove hardcoded paths
This commit is contained in:
vanhofen
2020-12-10 21:44:19 +01:00
parent 3f04cea42d
commit c0f109e2c5

View File

@@ -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 */