Changed temps script to reset arduino every 30 minutes
This commit is contained in:
parent
cc879e8d44
commit
ca1d88b85b
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
# Temperature printing function
|
# Temperature printing function
|
||||||
print_temp(){
|
print_temp(){
|
||||||
|
@ -20,6 +20,11 @@ sleep 1
|
||||||
# Update the temps once per second
|
# Update the temps once per second
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
# Every 30 minutes, reset the arduino and start again
|
||||||
|
# This hopefully fixes the issue of the LCD not updating after a while (usually over an hour)
|
||||||
|
for i in {1..1800}; do
|
||||||
echo "CPU: $(sensors | grep 'Tccd1' | awk '{print substr($2, 2)}')?GPU: $(sensors | grep "edge" | awk '{print substr($2, 2)}')" | awk '{ gsub("\xc2\xb0", "\xdf", $0); print }' > $LCD_SERIAL_DEVICE
|
echo "CPU: $(sensors | grep 'Tccd1' | awk '{print substr($2, 2)}')?GPU: $(sensors | grep "edge" | awk '{print substr($2, 2)}')" | awk '{ gsub("\xc2\xb0", "\xdf", $0); print }' > $LCD_SERIAL_DEVICE
|
||||||
sleep 1
|
sleep 1
|
||||||
|
done
|
||||||
|
cd $LCD_PROGRAM_LOCATION && make reset && cd ~
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue