Skip to content

Commit

Permalink
For issue MiczFlor#1096:
Browse files Browse the repository at this point in the history
* don't version the used gpio_settings.ini file in git
* follow Phoniebox conventions for settings files and store it in misc/sampleconfigs
* Improve documentation
  • Loading branch information
s-martin committed Oct 23, 2020
1 parent 1f638fe commit a62a86d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions components/gpio_control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ Up to now the following input devices are implemented:

* **TwoButtonControl**:
This Device uses two Buttons and implements a third action if both buttons are pressed together.

Many example files are located in `~/RPi-Jukebox-RFID/components/gpio_control/example_configs/`.
2 changes: 1 addition & 1 deletion components/gpio_control/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [[ $(id -u) != 0 ]]; then
fi

if [[ ! -f /home/pi/RPi-Jukebox-RFID/settings/gpio_settings.ini ]]; then
mkdir -p ~/.config/phoniebox && cp /example_configs/gpio_settings.ini /home/pi/RPi-Jukebox-RFID/settings/gpio_settings.ini
cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/gpio_settings.ini.sample /home/pi/RPi-Jukebox-RFID/settings/gpio_settings.ini
fi

echo 'disable old services: phoniebox-gpio-buttons and phoniebox-rotary-encoder'
Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions scripts/installscripts/buster-install-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -940,9 +940,8 @@ install_main() {
if [[ "${GPIOconfig}" == "YES" ]]; then
sudo python3 -m pip install --upgrade --force-reinstall -q -r "${jukebox_dir}"/requirements-GPIO.txt
sudo systemctl enable phoniebox-gpio-control.service
if [[ ! -f ~/.config/phoniebox/gpio_settings.ini ]]; then
mkdir -p ~/.config/phoniebox
cp "${jukebox_dir}"/components/gpio_control/example_configs/gpio_settings.ini ~/.config/phoniebox/gpio_settings.ini
if [[ ! -f "${jukebox_dir}"/settings/gpio_settings.ini ]]; then
cp "${jukebox_dir}"/misc/sampleconfigs/gpio_settings.ini.sample "${jukebox_dir}"/settings/gpio_settings.ini
fi
fi

Expand Down

0 comments on commit a62a86d

Please sign in to comment.