Skip to content

Commit

Permalink
fix bug related to showing individual spectrograms
Browse files Browse the repository at this point in the history
  • Loading branch information
kx1t committed Apr 9, 2024
1 parent a0407a8 commit f62c68a
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions rootfs/usr/share/planefence/planefence.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,18 @@ EOF
<th class="js-sort-number">10 min avg</th>
<th class="js-sort-number">1 hr avg</th>
EOF
# If there are spectrograms for today, then also make a column for these:
if compgen -G "$OUTFILEDIR/noisecapt-spectro-$FENCEDATE*.png" >/dev/null; then
printf " <th>Spectrogram</th>\n" >&3
SPECTROPRINT="true"
else
SPECTROPRINT="false"
fi
# # If there are spectrograms for today, then also make a column for these:
# if compgen -G "$OUTFILEDIR/noisecapt-spectro-$FENCEDATE*.png" >/dev/null; then
# printf " <th>Spectrogram</th>\n" >&3
# SPECTROPRINT="true"
# else
# SPECTROPRINT="false"
# fi
# ^^^ this doesn't really work - there won't be any spectrograms at the beginning of the day, and
# it will never create any, because SPECTROPRINT stays FALSE forever.
# Instead, we'll set SPECTROPRINT=true always when HASNOISE=true. This may cause an empty column, but that's
# preferred over not printing any spectrograms.
SPECTROPRINT="true"
fi

if [[ "$HASTWEET" == "true" ]]
Expand Down

0 comments on commit f62c68a

Please sign in to comment.