From 475d3c468ed546d498ba232c6c293f8ecff14955 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 22 May 2025 09:29:00 -0400 Subject: [PATCH] Update command add uptime check before waiting 20s --- command | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/command b/command index b7f04ee0..fdd55ef6 100755 --- a/command +++ b/command @@ -35,9 +35,17 @@ else fi -echo "Waiting 20 seconds for USB" +uptime=`cat /proc/uptime | awk '{printf "%0.f", $1}'` -sleep 20 +echo -n "Uptime since boot is " +echo $value + +if [[ "$uptime" -lt "60" ]]; then + + echo "Waiting 20 seconds for USB" + + sleep 20 +fi FILE=/home/pi/CubeSatSim/command_control_direwolf if [[ $(arecord -l | grep "USB Audio Device") ]] && [ -f "$FILE" ]; then