added LCDRows support

This commit is contained in:
RLF
2024-01-16 19:31:14 -05:00
parent 2bb8fa8c17
commit 5461f0e676

View File

@@ -2,6 +2,7 @@
# UNO Monitor Sender v.0.1.0
# Kidacro <kidacro@archamedis.net>
# https://kidacro.archamedis.net/git/kidacro/Arduino/src/branch/main/uno-stats-monitor
#
# monitor_sender.sh - Bash stats sender suitable for cron
#
# Input Schema:
@@ -9,11 +10,15 @@
# End char is: '@'
# 2nd char denotes which line number/mode to use
#
# Setting Schema:
# LCDLength:LCDRows:LCDDelay:LEDBrightness:LEDDelay
# 16:2:5:0:3#
#
# Example:
# Line 1: #1Archamedis Status@
# Line 2: #299% free / etc.@
# LAVG -: #324@
# LSET 0: #016:5:1:3@
# LSET 0: #016:2:5:0:3@
#
# Output Schema:
# Multimedia Controls use single characters to denote which button was pressed
@@ -46,8 +51,9 @@ TTY="/dev/ttyACM0"
# Arduino Settings
LCDLength=16
LCDDelay=3
LEDBrightness=1
LCDRows=2
LCDDelay=5
LEDBrightness=0
LEDDelay=3
##########################################################
@@ -76,7 +82,7 @@ SFREE=$(df -h | grep /dev/mapper/store0-lvol1 | awk '{print $4}' | paste -sd ',
stty -F $TTY ispeed 9600 ospeed 9600 -ignpar cs8 -cstopb -echo -hupcl
# send settings
LINE0="#0$LCDLength:$LCDDelay:$LEDBrightness:$LEDDelay@"
LINE0="#0$LCDLength:$LCDRows:$LCDDelay:$LEDBrightness:$LEDDelay@"
/usr/bin/echo "$LINE0" > $TTY
echo Sending to $TTY: $LINE0