PiTFT: add PiGRRL Zero and Pocket options
This commit is contained in:
parent
f59e46123e
commit
fe12d703f8
1 changed files with 6 additions and 4 deletions
|
|
@ -49,6 +49,8 @@ selectN() {
|
|||
echo
|
||||
echo "Select project:"
|
||||
selectN "PiGRRL 2" \
|
||||
"Pocket PiGRRL" \
|
||||
"PiGRRL Zero" \
|
||||
"Configure options manually"
|
||||
PROJ_SELECT=$?
|
||||
|
||||
|
|
@ -61,21 +63,21 @@ FBROTATE_VALUES=(0 1 2 3)
|
|||
# PiTFT (MADCTL) rotation:
|
||||
TFTROTATE_VALUES=(0 90 180 270)
|
||||
|
||||
if [ $PROJ_SELECT -lt 2 ]; then
|
||||
if [ $PROJ_SELECT -lt 4 ]; then
|
||||
|
||||
# Use preconfigured settings per-project
|
||||
|
||||
# 3 elements per project; first is index (1+) into
|
||||
# PITFT_VALUES, second and third are index into
|
||||
# FBROTATE_VALUES and TFTROTATE_VALUES:
|
||||
PROJ_VALUES=(2 1 4)
|
||||
# FBROTATE is almost always 0, except for HDMI portrait mode
|
||||
PROJ_VALUES=(2 1 4 1 1 4 1 1 4)
|
||||
# FBROTATE index is almost always 1, except for HDMI portrait mode
|
||||
|
||||
PITFT_SELECT=${PROJ_VALUES[($PROJ_SELECT-1)*3]}
|
||||
FBROTATE_SELECT=${PROJ_VALUES[($PROJ_SELECT-1)*3+1]}
|
||||
TFTROTATE_SELECT=${PROJ_VALUES[($PROJ_SELECT-1)*3+2]}
|
||||
|
||||
elif [ $PROJ_SELECT -eq 2 ]; then
|
||||
else
|
||||
|
||||
# Configure options manually
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue