From e65abb31feb381a5a3258c4b2af9de510908d5cc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jul 2024 11:47:20 -0400 Subject: [PATCH] Update main.c run command instead of service --- main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 13e63731..a4238541 100644 --- a/main.c +++ b/main.c @@ -538,7 +538,11 @@ int main(int argc, char * argv[]) { other_max[i] = -1000.0; } - FILE * command_start = popen("sudo systemctl start command", "r"); + FILE * command_kill = popen("sudo killall -9 command", "r"); + pclose(command_kill); + +// FILE * command_start = popen("sudo systemctl start command", "r"); + FILE * command_start = popen("/home/pi/CubeSatSim/command &", "r"); pclose(command_start); long int loopTime;