Tweak docs readme, adjust paths for lcd control to be more sensible

This commit is contained in:
KemoNine 2020-08-16 01:58:47 -04:00
parent bd5f040ae1
commit 0a4179f1d3
4 changed files with 11 additions and 7 deletions

View File

@ -22,8 +22,8 @@ Items marked ```REQUIRED``` are assumed to be setup and working. You've been war
* [Slideshow Setup (REQUIRED)](slideshow.md)
* [Email Notifications (REQUIRED)](email_notifications.md)
* [System Monitoring (REQUIRED)](monit.md)
* [Pimoroni Fan Shim](pimoroni_fan_shim.md)
* [HDMI Scheduled On/Off](scheduled_display.md)
* [Pimoroni Fan Shim (VERY SMART)](pimoroni_fan_shim.md)
* [HDMI Scheduled On/Off (VERY SMART)](scheduled_display.md)
* [Backups via restic](restic.md)
* [Web Based Administration](cockpit.md)
* [Web Dashboard / Landing Page](landing_page.md)
@ -32,3 +32,4 @@ Items marked ```REQUIRED``` are assumed to be setup and working. You've been war
* [rclone (Picture Sync)](rclone.md)
* [Resource Monitoring](munin.md)
* [Fun Splash Screens](splash_screens.md)
* [Album Control](lcd_control.md)

View File

@ -1,4 +1,4 @@
# LCD Controls
# LCD Control
The below will setup an Adafruit mini LCD with 2 buttons as a controller for selecting which photo albums are displayed on a PiFrame. This setup also includes the Adafruit stemma/qwiic LUX sensor setup which will be integrated further in the future.

View File

@ -168,12 +168,15 @@ unbind "|";
unbind "}";
unbind "~";
EOF
cat > /etc/default/fim_album_path <<EOF
cat > /etc/default/fim_album <<EOF
/tank/pictures
EOF
cat > /etc/default/fim_album_index <<EOF
0
EOF
cat > /usr/local/bin/fim-slideshow.sh <<EOF
#!/bin/bash
ALBUM_PATH=\`cat /etc/default/fim_album_path\`
ALBUM_PATH=\`cat /etc/default/fim_album\`
# options inspiration: https://www.raspberrypi.org/forums/viewtopic.php?t=196043
tput civis
/usr/bin/fim --verbose --no-commandline --no-history \

View File

@ -177,9 +177,9 @@ def refresh_screen():
# Write current album when restarting the slideshow
def write_selected_album():
with open('/etc/default/fim_album', 'w') as f:
with open('/etc/default/fim_album_index', 'w') as f:
f.write(str(selected_album))
with open('/etc/default/fim_album_path', 'w') as f:
with open('/etc/default/fim_album', 'w') as f:
if not selected_album == 0:
f.write('/tank/pictures/' + albums[selected_album])
else: