Skip to content

Commit

Permalink
Merge pull request #1090 from MiczFlor/develop
Browse files Browse the repository at this point in the history
Release 2.1.1
  • Loading branch information
s-martin authored Oct 14, 2020
2 parents 04c90ec + bb7d50f commit 70f989b
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ A contactless jukebox for the Raspberry Pi, playing audio files, playlists, podc

* **Gitter Community** we got ourselves a gitter community; chat us up at https://gitter.im/phoniebox

* **Phoniebox [2.1](https://github.com/MiczFlor/RPi-Jukebox-RFID/milestone/3?closed=1) released (2020-10-12)**
* **Phoniebox [2.1.1](https://github.com/MiczFlor/RPi-Jukebox-RFID/milestone/5?closed=1) released (2020-10-14)**

The 2.1 release was pushed through the doors with many contributors (some of which in alphabetical order): @andreasbrett @BerniPi @juhrmann @Luegengladiator @MarkusProchaska @MarlonKrug @patrickweigelt @princemaxwell @RalfAlbers @s-martin @themorlan @veloxidSchweiz @xn--nding-jua. [List of all contributors](https://github.com/MiczFlor/RPi-Jukebox-RFID/graphs/contributors)
The [2.1](https://github.com/MiczFlor/RPi-Jukebox-RFID/milestone/3?closed=1) release was pushed through the doors with many contributors (some of which in alphabetical order): @andreasbrett @BerniPi @juhrmann @Luegengladiator @MarkusProchaska @MarlonKrug @patrickweigelt @princemaxwell @RalfAlbers @s-martin @themorlan @veloxidSchweiz @xn--nding-jua. [List of all contributors](https://github.com/MiczFlor/RPi-Jukebox-RFID/graphs/contributors)

## What's new in version 2.1?
## What's new in version 2.1.1?

* Use [multiple readers](https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/1012#issue-434052529) simultaneously
* Improved [GPIO control](components/gpio_control/README.md) and integrated in **one-line install script**
Expand Down
3 changes: 2 additions & 1 deletion components/gpio_control/GPIODevices/simple_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def checkGpioStaysInState(holdingTime, gpioChannel, gpioHoldingState):

class SimpleButton:
def __init__(self, pin, action=lambda *args: None, name=None, bouncetime=500, edge=GPIO.FALLING,
hold_time=.1, hold_repeat=False,pull_up_down=GPIO.PUD_UP):
hold_time=.1, hold_repeat=False, pull_up_down=GPIO.PUD_UP):
self.edge = parse_edge_key(edge)
self.hold_time = hold_time
self.hold_repeat = hold_repeat
Expand Down Expand Up @@ -120,6 +120,7 @@ def __repr__(self):
self.name, self.pin, self.hold_repeat, self.hold_time
)


if __name__ == "__main__":
print('please enter pin no to test')
pin = int(input())
Expand Down
5 changes: 2 additions & 3 deletions components/gpio_control/gpio_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def generate_device(config, deviceName):
edge=config.get('edge', fallback='FALLING'),
hold_repeat=config.getboolean('hold_repeat', False),
hold_time=config.getfloat('hold_time', fallback=0.3),
pull_up_down=config.get('pull_up_down', fallback='GPIO.PUD_UP'))
pull_up_down=config.get('pull_up_down', fallback=GPIO.PUD_UP))
elif device_type == 'LED':
return LED(config.getint('Pin'),
name=deviceName,
Expand All @@ -63,8 +63,7 @@ def generate_device(config, deviceName):
name=deviceName
)
elif device_type == 'RotaryEncoder':
return RotaryEncoder(
config.getint('pinUp'),
return RotaryEncoder(config.getint('pinUp'),
config.getint('pinDown'),
getFunctionCall(config.get('functionCallUp')),
getFunctionCall(config.get('functionCallDown')),
Expand Down
2 changes: 1 addition & 1 deletion scripts/Reader.py.Multi
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Reader:
sys.exit('Could not find the device %s\n. Make sure is connected' % dev.name)

str_devs = ','.join([str(x) for x in devs])
#print("Devs: " + str_devs)
# print("Devs: " + str_devs)
self.devices = map(InputDevice, str_devs)
self.devices = {dev.fd: dev for dev in devs}

Expand Down
6 changes: 3 additions & 3 deletions scripts/RegisterDevice.py.Multi
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import subprocess

JUKEBOX_HOME_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))


def runCmd(cmd, wait=True):
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
(output, err) = p.communicate()
if wait:
p.wait()
return output


def setupPN532():
answer = input('Please make sure that the PN532 reader is wired up correctly '
'to the GPIO ports before continuing...\n Continue?: [Y/n]')
Expand Down Expand Up @@ -53,6 +55,7 @@ from Reader import get_devices, EDevices
list_dev_ids = list()
devices = get_devices()


def addDevice():
i = 0
print("Choose the reader from list")
Expand Down Expand Up @@ -98,6 +101,3 @@ runCmd("sudo chown pi:www-data {}/scripts/deviceName.txt".format(JUKEBOX_HOME_DI
runCmd("sudo chmod 644 {}/scripts/deviceName.txt".format(JUKEBOX_HOME_DIR))

print("Register Device(s) Done!")



6 changes: 3 additions & 3 deletions scripts/daemon_rfid_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
file_path = os.path.dirname(__file__)
if file_path != "":
os.chdir(file_path)

# vars for ensuring delay between same-card-swipes
ssp = open('../settings/Second_Swipe_Pause', 'r')
same_id_delay = ssp.read().strip()
Expand All @@ -35,7 +35,7 @@
previous_id = ""
previous_time = time.time()

#create array for control card ids
# create array for control card ids
cards = []

# open file and read the content in a list
Expand Down Expand Up @@ -74,7 +74,7 @@
logger.info('Trigger Play Cardid={cardid}'.format(cardid=cardid))
subprocess.call([dir_path + '/rfid_trigger_play.sh --cardid=' + cardid], shell=True)
previous_id = cardid

else:
logger.debug('Ignoring Card id {cardid} due to same-card-delay, delay: {same_id_delay}'.format(
cardid=cardid,
Expand Down
6 changes: 3 additions & 3 deletions scripts/rfid_trigger_play.sh
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ if [ "$CARDID" ]; then
$PATHDATA/playout_controls.sh -c=recordstop
;;
$RECORDPLAYBACKLATEST)
$PATHDATA/playout_controls.sh -c=recordplaybacklatest
$PATHDATA/playout_controls.sh -c=recordplaylatest
;;
$CMDREADWIFIIP)
$PATHDATA/playout_controls.sh -c=readwifiipoverspeaker
Expand Down Expand Up @@ -400,7 +400,7 @@ if [ ! -z "$FOLDER" -a ! -z ${FOLDER+x} -a -d "${AUDIOFOLDERSPATH}/${FOLDER}" ];
if [ "${DEBUG_rfid_trigger_play_sh}" == "TRUE" ]; then echo " Completed: toggle pause/play" >> $PATHDATA/../logs/debug.log; fi
elif [ "$SECONDSWIPE" == "PLAY" -a $PLLENGTH -gt 0 ]
then
# The following involves NOT playing the playlist, so we set:
# The following involves NOT playing the playlist, so we set:
PLAYPLAYLIST=no
sudo $PATHDATA/playout_controls.sh -c=playerplay &>/dev/null
if [ "${DEBUG_rfid_trigger_play_sh}" == "TRUE" ]; then echo " Completed: Resume playback" >> $PATHDATA/../logs/debug.log; fi
Expand All @@ -409,7 +409,7 @@ if [ ! -z "$FOLDER" -a ! -z ${FOLDER+x} -a -d "${AUDIOFOLDERSPATH}/${FOLDER}" ];
# The following involves NOT playing the playlist, so we set:
PLAYPLAYLIST=no
# following needs testing (see https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/914)
# Special case for NOAUDIOPLAY because once the playlist has finished,
# Special case for NOAUDIOPLAY because once the playlist has finished,
# it needs to be noted by the system that the second swipe is like a *first* swipe.
currentSong=`mpc current`
if [[ -z "$currentSong" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion settings/version-number
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1
2.1.1

0 comments on commit 70f989b

Please sign in to comment.