Skip to content

Commit

Permalink
Updated to version 0.0.2 with attempted bug fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaswwp committed Nov 19, 2013
1 parent a3ab414 commit da23ee6
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 1 deletion.
117 changes: 117 additions & 0 deletions RPizeBox.log
Original file line number Diff line number Diff line change
Expand Up @@ -267,3 +267,120 @@
11/18/2013 06:59:59 PM Track changed, now: Vivaldi: Gloria - Gloria Inexcelsis
11/18/2013 07:02:11 PM Track changed, now: Clarinet Concerto K.622: Adagio
11/18/2013 07:04:46 PM Power OFF
11/18/2013 08:46:14 PM Track changed, now: La valse d'AmAlie - Version orchestre
11/18/2013 08:49:56 PM Track changed, now: Carmina Burana: O Fortuna
11/18/2013 08:50:19 PM Track changed, now: Twisted
11/18/2013 08:54:34 PM Track changed, now: Make No Sound
11/18/2013 08:58:01 PM Track changed, now: La Noyee
11/18/2013 09:00:04 PM Track changed, now: You've Got It Bad
11/18/2013 09:00:12 PM Track changed, now: J'Y Suis Jamias Alle
11/18/2013 09:01:44 PM Track changed, now: Les Jours Tristes (Instrumenta
11/18/2013 09:04:48 PM Track changed, now: La Valse d'Amelie
11/18/2013 09:07:04 PM Track changed, now: Comptine d'Un Autre Ete
11/18/2013 09:09:25 PM Track changed, now: La Noyee
11/18/2013 09:11:29 PM Track changed, now: L' Autre Valse d'Amelie
11/18/2013 09:13:02 PM Track changed, now: Guilty
11/18/2013 09:16:16 PM Track changed, now: Le Moulin
11/18/2013 09:20:44 PM Track changed, now: Pas Si Simple
11/18/2013 09:22:37 PM Track changed, now: La Valse D'Amelie (Version Orc
11/18/2013 09:24:38 PM Track changed, now: La Valse Des Vieux Os
11/18/2013 09:26:58 PM Track changed, now: La Dispute
11/18/2013 09:31:15 PM Track changed, now: Si Tu N'Etais Pas La
11/18/2013 11:01:19 PM Track changed, now: Soir de Fete
11/18/2013 11:04:16 PM Track changed, now: La Redecouverte
11/18/2013 11:05:29 PM Track changed, now: Sur Le Fil
11/18/2013 11:09:53 PM Track changed, now: Le Banquet
11/18/2013 11:11:25 PM Track changed, now: La Valse D'Amelie (Version Pia
11/18/2013 11:14:04 PM Track changed, now: La Valse Des Monstres
11/18/2013 11:15:57 PM LMS not there. Trying again in 5 seconds.
11/18/2013 11:16:02 PM LMS not there. Trying again in 5 seconds.
11/18/2013 11:16:52 PM LMS not there. Trying again in 5 seconds.
11/18/2013 11:16:57 PM LMS not there. Trying again in 5 seconds.
11/18/2013 11:17:02 PM LMS not there. Trying again in 5 seconds.
11/18/2013 11:17:07 PM LMS not there. Trying again in 5 seconds.
11/18/2013 11:17:12 PM LMS not there. Trying again in 5 seconds.
11/18/2013 11:17:18 PM LMS not there. Trying again in 5 seconds.
11/18/2013 11:17:23 PM LMS not there. Trying again in 5 seconds.
11/18/2013 11:17:35 PM Success: Logged in to LMS.
11/18/2013 11:17:35 PM Success: In contact with SqueezeLite.
11/19/2013 07:24:43 AM Track changed, now: Change Your Life
11/19/2013 07:25:48 AM Vol+
11/19/2013 07:25:48 AM Volume is: 26
11/19/2013 07:25:51 AM Vol+
11/19/2013 07:25:51 AM Volume is: 31
11/19/2013 07:25:52 AM Vol+
11/19/2013 07:25:52 AM Volume is: 36
11/19/2013 07:25:55 AM Vol+
11/19/2013 07:25:55 AM Volume is: 41
11/19/2013 07:25:57 AM Vol+
11/19/2013 07:25:57 AM Volume is: 46
11/19/2013 07:25:58 AM Vol-
11/19/2013 07:25:58 AM Volume is: 41
11/19/2013 07:26:00 AM Vol-
11/19/2013 07:26:00 AM Volume is: 36
11/19/2013 07:26:02 AM Vol-
11/19/2013 07:26:02 AM Volume is: 31
11/19/2013 07:26:03 AM Vol-
11/19/2013 07:26:03 AM Volume is: 26
11/19/2013 07:26:05 AM Vol-
11/19/2013 07:26:06 AM Volume is: 21
11/19/2013 07:26:07 AM Vol+
11/19/2013 07:26:07 AM Volume is: 26
11/19/2013 07:28:32 AM Track changed, now: Wings
11/19/2013 07:32:12 AM Track changed, now: DNA
11/19/2013 07:33:24 AM Power OFF
11/19/2013 07:33:27 AM Play
11/19/2013 07:37:26 AM Track changed, now: Cannonball
11/19/2013 07:37:30 AM Success: Logged in to LMS.
11/19/2013 07:37:30 AM Success: In contact with SqueezeLite.
11/19/2013 07:37:30 AM Track changed, now: Cannonball
11/19/2013 07:38:26 AM Vol+
11/19/2013 07:38:27 AM Volume is: 32
11/19/2013 07:40:52 AM Track changed, now: How Ya Doin'?
11/19/2013 07:41:26 AM Vol-
11/19/2013 07:41:26 AM Volume is: 27
11/19/2013 07:41:39 AM Vol-
11/19/2013 07:41:39 AM Volume is: 22
11/19/2013 07:41:40 AM Vol-
11/19/2013 07:41:40 AM Volume is: 17
11/19/2013 07:41:42 AM Vol-
11/19/2013 07:41:42 AM Volume is: 12
11/19/2013 07:41:43 AM Vol-
11/19/2013 07:41:43 AM Volume is: 7
11/19/2013 07:41:45 AM Vol-
11/19/2013 07:41:45 AM Volume is: 2
11/19/2013 07:41:46 AM Vol-
11/19/2013 07:41:46 AM Volume is: 0
11/19/2013 07:41:52 AM Vol+
11/19/2013 07:41:52 AM Volume is: 5
11/19/2013 07:41:54 AM Vol+
11/19/2013 07:41:54 AM Volume is: 10
11/19/2013 07:41:56 AM Vol+
11/19/2013 07:41:56 AM Volume is: 15
11/19/2013 07:41:58 AM Vol+
11/19/2013 07:41:58 AM Volume is: 20
11/19/2013 07:41:59 AM Vol+
11/19/2013 07:41:59 AM Volume is: 25
11/19/2013 07:42:01 AM Vol+
11/19/2013 07:42:01 AM Volume is: 30
11/19/2013 07:42:03 AM Vol+
11/19/2013 07:42:03 AM Volume is: 35
11/19/2013 07:42:05 AM Vol+
11/19/2013 07:42:05 AM Volume is: 40
11/19/2013 07:42:06 AM Vol+
11/19/2013 07:42:06 AM Volume is: 45
11/19/2013 07:42:08 AM Vol-
11/19/2013 07:42:08 AM Volume is: 40
11/19/2013 07:42:09 AM Vol-
11/19/2013 07:42:09 AM Volume is: 35
11/19/2013 07:42:11 AM Vol-
11/19/2013 07:42:11 AM Volume is: 30
11/19/2013 07:43:18 AM SkipForward
11/19/2013 07:43:19 AM Track changed, now: Move
11/19/2013 07:46:45 AM Success: Logged in to LMS.
11/19/2013 07:46:45 AM Success: In contact with SqueezeLite.
11/19/2013 07:46:45 AM Track changed, now: Move
11/19/2013 07:47:08 AM Track changed, now: Always Be Together
11/19/2013 07:48:10 AM Success: Logged in to LMS.
11/19/2013 07:48:10 AM Success: In contact with SqueezeLite.
11/19/2013 07:48:10 AM Track changed, now: Always Be Together
20 changes: 19 additions & 1 deletion RPizeBox.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
# This is the code to show the display, check whether the IR has been pressed
# and see if we need a smooth reboot or shutdown
#
# 0.0.2 Initial "finished release".
# Known bugs:
# - volume control lags
# - bottom line stays blank for first second
# Fixed?
# - sometimes the bottom line of the display gets stuck
#
# 0.0.1 Initial release, playing around with git
# Issues:
# - lirc remembers two button presses and shows the volume images
Expand Down Expand Up @@ -235,24 +242,35 @@ def getExternalIP(ifname):

# move to second row
wp.lcdPosition(lcd, 0, 1)

# no switch in python so cycle through the bottom line based on timings
if(RPizeBox.whatToShow == 0 and elapsed_time >= RPizeBox.bottomLineCycleDelay and elapsed_time < (RPizeBox.bottomLineCycleDelay * 2)):
# show artist
wp.lcdPuts(lcd,(sl.get_track_artist() + " "*16)[:16])

elif(RPizeBox.whatToShow == 1 and elapsed_time >= (RPizeBox.bottomLineCycleDelay * 2) and elapsed_time < (RPizeBox.bottomLineCycleDelay * 3)):
# show album
wp.lcdPuts(lcd,(sl.get_track_album() + " "*16)[:16])

elif(RPizeBox.whatToShow == 2 and elapsed_time >= (RPizeBox.bottomLineCycleDelay * 3) and elapsed_time < (RPizeBox.bottomLineCycleDelay * 4)):
# show progress
wp.lcdPosition(lcd, 0, 1)
elapsed = sl.get_time_elapsed()
total = sl.get_track_duration()
progress = int(9 * elapsed / total)
wp.lcdPuts(lcd,">" + ">"*(progress+1)+"-"*(8-progress) + " " + str(datetime.timedelta(seconds=int(total)))[-5:])
start_time = time.time()

elif(elapsed_time >= RPizeBox.bottomLineCycleDelay * 4):
# something has gone wrong. Maybe this is why the bottom line gets stuck
logging.warning('Elapsed time unexpectedly high, resetting: %f' % elapsed_time)
start_time = time.time()

# move on to the next thing
RPizeBox.whatToShow += 1
if (RPizeBox.whatToShow == 3):
if (RPizeBox.whatToShow >= 3):
RPizeBox.whatToShow = 0

except:
wp.lcdPosition(lcd, 0, 1)
wp.lcdPuts(lcd," -++- "[:16])
Expand Down

0 comments on commit da23ee6

Please sign in to comment.