Skip to content

Commit

Permalink
feed_mains.sh: make this script usable for automated testing
Browse files Browse the repository at this point in the history
  • Loading branch information
dingo35 committed Jan 22, 2024
1 parent 096eec0 commit 34c0ed6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SmartEVSE-3/test/feed_mains.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ fi
echo "Enter your current in deci-Ampères:"
OLD_CURRENT=20
while true; do
read -t 8 CURRENT
read -t 1 CURRENT
if [ $CURRENT"x" == "x" ]; then
CURRENT=$OLD_CURRENT
else
OLD_CURRENT=$CURRENT
fi
echo $FEED-CURRENT=$CURRENT.
mosquitto_pub -h 127.0.0.1 -t "SmartEVSE-$1/Set/$FEED" -m $CURRENT:$CURRENT:$CURRENT
sleep 1
done

0 comments on commit 34c0ed6

Please sign in to comment.