fix(bkgpslog):Make static initial BUFFER_TTL dynamic
authorSteven Baltakatei Sandoval <baltakatei@gmail.com>
Tue, 7 Jul 2020 12:02:47 +0000 (12:02 +0000)
committerSteven Baltakatei Sandoval <baltakatei@gmail.com>
Tue, 7 Jul 2020 12:02:47 +0000 (12:02 +0000)
Static value was used during debugging but should have been made
dynamic.

exec/bkgpslog

index f82396f6a52f56c3e204d7fecde7e5f90ffcd183..c901b27ac9ab246573a14bc0bf157fe0d32901a9 100755 (executable)
@@ -14,7 +14,7 @@ DIR_TMP_DEFAULT="/dev/shm"; # Default parent of working directory
 SCRIPT_TIME_START=$(date +%Y%m%dT%H%M%S.%N);
 PATH="$HOME/.local/bin:$PATH";   # Add "$(systemd-path user-binaries)" path in case apps saved there
 SCRIPT_HOSTNAME=$(hostname);     # Save hostname of system running this script.
 SCRIPT_TIME_START=$(date +%Y%m%dT%H%M%S.%N);
 PATH="$HOME/.local/bin:$PATH";   # Add "$(systemd-path user-binaries)" path in case apps saved there
 SCRIPT_HOSTNAME=$(hostname);     # Save hostname of system running this script.
-SCRIPT_VERSION="0.5.1";          # Define version of script.
+SCRIPT_VERSION="0.5.2";          # Define version of script.
 SCRIPT_NAME="bkgpslog";          # Define basename of script file.
 SCRIPT_URL="https://gitlab.com/baltakatei/ninfacyzga-01"; # Define wesite hosting this script.
 AGE_VERSION="1.0.0-beta2";       # Define version of age (encryption program)
 SCRIPT_NAME="bkgpslog";          # Define basename of script file.
 SCRIPT_URL="https://gitlab.com/baltakatei/ninfacyzga-01"; # Define wesite hosting this script.
 AGE_VERSION="1.0.0-beta2";       # Define version of age (encryption program)
@@ -1327,7 +1327,7 @@ main() {
     CMD_CONV_KML="gpsbabel -i nmea -f - -o kml -F - " && vbm "STATUS:Set CMD_CONV_KML to:$CMD_CONV_KML"; # convert NMEA to KML
 
     # MAIN LOOP:Record gps data until script lifespan ends
     CMD_CONV_KML="gpsbabel -i nmea -f - -o kml -F - " && vbm "STATUS:Set CMD_CONV_KML to:$CMD_CONV_KML"; # convert NMEA to KML
 
     # MAIN LOOP:Record gps data until script lifespan ends
-    timeBufferFirstNS="$(timeEpochNS)"; bufferRound=0; BUFFER_TTL_ADJ_FLOAT="10.0";
+    timeBufferFirstNS="$(timeEpochNS)"; bufferRound=0; BUFFER_TTL_ADJ_FLOAT="$BUFFER_TTL";
     while [[ "$SECONDS" -lt "$SCRIPT_TTL" ]]; do
        magicParseRecipientDir;
        magicGatherWriteBuffer &
     while [[ "$SECONDS" -lt "$SCRIPT_TTL" ]]; do
        magicParseRecipientDir;
        magicGatherWriteBuffer &