Home of the Squeezebox™ & Transporter® network music players.
Page 4 of 37 FirstFirst ... 2345614 ... LastLast
Results 31 to 40 of 366
  1. #31
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,475
    Quote Originally Posted by chill View Post
    Yes, I think so. And maybe a default skin, but I can't see how that could be configurable, given that it requires a change to DesktopJiveMeta.lua. Ralphy mentioned the Waveshare approach - I haven't seen that, but I guess it replaces DesktopJiveMeta.lua. Could the lua file use a system variable in place of the hard-coded skin name?
    Code:
    	jiveMain:setDefaultSkin("QVGA240squareSkin")
    Yes, it replaces that file, increases it's load priority and includes the skin as a dependency so only the one skin extension needs to be choosen from the installer.

    I'd prefer not to have the defauilt skin override come from a system variable, makes it way too hard to help users troubleshoot issues with jivelite. What I did for the waveshare 3.5 skin has worked well so far.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  2. #32
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    1,651
    Quote Originally Posted by ralphy View Post
    Yes, it replaces that file, increases it's load priority and includes the skin as a dependency so only the one skin extension needs to be choosen from the installer.

    I'd prefer not to have the defauilt skin override come from a system variable, makes it way too hard to help users troubleshoot issues with jivelite. What I did for the waveshare 3.5 skin has worked well so far.
    Understood. Ok, so I'll document the steps needed to get the display/skin working, and I'll leave it to you guys to advise on the best way to add it to pCP.

  3. #33
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,475
    Quote Originally Posted by chill View Post
    Understood. Ok, so I'll document the steps needed to get the display/skin working, and I'll leave it to you guys to advise on the best way to add it to pCP.
    Here's a skin override extension for you to try when testing.

    It overrides these 2 changed files. Hopefully, I got the skin name right.

    Code:
    sed -i "s#HDSkin-VGA#QVGA240squareSkin#" DesktopJive/DesktopJiveMeta.lua
    sed -i "s#loadPriority=1#loadPriority=0#" DesktopJive/loadPriority.lua
    To install.

    Code:
    tc@rpi4:~$ ceo
    
    tc@rpi4:/mnt/mmcblk0p2/tce/optional$ wget http://ralph-irving.users.sourceforge.net/pico/pcp-jivelite_default-qvga240squareskin.tcz.md5.txt
    
    tc@rpi4:/mnt/mmcblk0p2/tce/optional$ wget http://ralph-irving.users.sourceforge.net/pico/pcp-jivelite_default-qvga240squareskin.tcz
    
    tc@rpi4:/mnt/mmcblk0p2/tce/optional$ wget http://ralph-irving.users.sourceforge.net/pico/pcp-jivelite_default-qvga240squareskin.tcz.dep
    
    tc@rpi4:/mnt/mmcblk0p2/tce/optional$ md5sum -c pcp-jivelite_default-qvga240squareskin.tcz.md5.txt
    pcp-jivelite_default-qvga240squareskin.tcz: OK
    
    tc@rpi4:/mnt/mmcblk0p2/tce/optional$ tce-load -i pcp-jivelite_default-qvga240squareskin.tcz
    pcp-jivelite_wqvgaskins.tcz: OK
    pcp-jivelite_default-qvga240squareskin.tcz: OK
    Obviously your skin is not in jivelite_wqvgaskins.tcz yet, but if it's installed in $HOME/.jivelite/userpath/applets/QVGA240squareSkin it should be loaded when jivelite starts.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  4. #34
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    1,651
    Marvellous - thanks Ralphy.

    What took you?

  5. #35
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,475
    Quote Originally Posted by chill View Post
    Marvellous - thanks Ralphy.

    What took you?
    You're right, I should have been able to modify the waveshare extension script faster!
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  6. #36
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,475
    Here's a jivelite.tcz with an updated jivelite.sh which sets the SDL_FBDEV envar from the pcp.cfg. I also added the ability to override the framebuffer colour depth and the jivelite fps settings.

    Code:
    tc@rpi37-wls:/mnt/mmcblk0p2/tce$ ceo
    tc@rpi37-wls:/mnt/mmcblk0p2/tce/optional$ wget -O pcp-jivelite.tcz.md5.txt http://ralph-irving.users.sourceforge.net/pico/pcp-jivelite-1.tcz.md5.txt
    
    tc@rpi37-wls:/mnt/mmcblk0p2/tce/optional$ wget -O pcp-jivelite.tcz http://ralph-irving.users.sourceforge.net/pico/pcp-jivelite-1.tcz
    
    tc@rpi37-wls:/mnt/mmcblk0p2/tce/optional$ md5sum -c pcp-jivelite.tcz.md5.txt
    pcp-jivelite.tcz: OK
    For now, you need to add the following variables to /usr/local/etc/pcp/pcp.cfg and you need to execute the editor with root privileges to save changes.

    JL_FRAME_BUFFER="/dev/fb1"
    JL_FRAME_RATE=""
    JL_FRAME_DEPTH=""

    backup the config. Eventually we should have these exposed in the jivelite tweaks webgui.

    The default frame rate is 22 and default depth is 32 and /var/log/jivelite.log now reports these variables and the frame buffer device if JL_FRAME_BUFFER is not empty.
    Last edited by ralphy; 2020-01-20 at 10:57.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  7. #37
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    1,651
    Great, thanks Ralphy. Looking forward to trying this out, and the earlier default skin tool. I'll also see if I can figure out how to do a pull request for the skin, once I've satisfied myself that the screensaver graphics work properly. This evening's tasks.

    In the meantime I've been through the process of installing everything that's needed to get the display and buttons working on a fresh pCP6-b7 install, so that you pCP folks can see if there's anything else that can be streamlined. Obviously some of it is already out of date, thanks to your updates!

    Here goes:

    1) Jivelite setup

    Install Jivelite from Tweaks

    Add these commands to /opt/bootlocal.sh
    Code:
    modprobe flexfb setaddrwin=0 width=240 height=240 init=-1,0x11,-2,120,-1,0x36,0x00,-1,0x3A,0x05,-1,0xB2,0x0C,0x0C,0x00,0x33,0x33,-1,0xB7,0x35,-1,0xBB,0x1A,-1,0xC0,0x2C,-1,0xC2,0x01,-1,0xC3,0x0B,-1,0xC4,0x20,-1,0xC6,0x0F,-1,0xD0,0xA4,0xA1,-1,0x21,-1,0xE0,0x00,0x19,0x1E,0x0A,0x09,0x15,0x3D,0x44,0x51,0x12,0x03,0x00,0x3F,0x3F,-1,0xE1,0x00,0x18,0x1E,0x0A,0x09,0x25,0x3F,0x43,0x52,0x33,0x03,0x00,0x3F,0x3F,-1,0x29,-3
    modprobe fbtft_device name=flexfb speed=32000000 cs=1 gpios=dc:9
    Set framebuffer size in config.txt
    Code:
    # uncomment to force a console size. By default it will be display's size minus
    # overscan.
    #framebuffer_width=1280
    #framebuffer_height=720
    framebuffer_width=240
    framebuffer_height=240
    Add the following text to the end of cmdline.txt
    Code:
    fbcon=map:10 fbcon=font:PEARL8x8
    Backup and reboot. pCP should reboot with boot messages on the screen

    copy /opt/jivelite/bin/jivelite.sh to /mnt/mmcblk0p2/tce/jivelite.sh
    Edit /mnt/mmcblk0p2/tce/jivelite.sh to include:
    Code:
    export SDL_FBDEV=/dev/fb1
    Change permissions to /home/tc/.jivelite/userpath
    Code:
    cd ~/.jivelite
    chmod -R 777 ./userpath
    Copy QVGA240squareSkin folder to /home/tc/.jivelite/userpath/applets/

    copy /opt/jivelite/share/jive/applets/DesktopJive folder to /home/tc/.jivelite/userpath/applets/
    then modify line 110 of /home/tc/.jivelite/userpath/applets/DesktopJive/DesktopJiveMeta.lua from
    Code:
    	jiveMain:setDefaultSkin("JogglerSkin")
    to
    Code:
    	jiveMain:setDefaultSkin("QVGA240squareSkin")
    Install pcp-jivelite_qvgaskins.tcz extension

    copy resized splash.png (240 pixels wide - height not important) to /home/tc/.jivelite/userpath/jive

    Backup and reboot - pCP should reboot with boot messages to screen, followed by the piCorePlayer splash screen and then Jivelite


    2) Buttons

    Install pcp-sbpd.tcz extension
    Install pigpio.tcz extension

    Define some button commands in /home/tc/sbpd_commands.cfg
    Code:
    MIX+=["mixer","volume","+5"]
    MIX-=["mixer","volume","-5"]
    VMAX=["mixer","volume","100"]
    VMIN=["mixer","volume","0"]
    Make a script file to start sbpd, e.g. /home/tc/sbpd-script.sh
    Code:
    #!/bin/sh
    
    # start pigpiod deamon
    pigpiod -t 0
    sleep 1
    
    # load uinput module - required to be able to send keystrokes
    # then set the permission to group writable, so you don't need to run sbpd with root permissions
    sudo modprobe uinput
    sudo chmod g+w /dev/uinput
    
    # button A
    SW1=5 							# GPIO pin number
    SH1=MIX+ 						# command for SHORT press
    LO1=VMAX						# command for LONG press
    LMS1=250 						# milliseconds for long press
    
    # button B
    SW2=6
    SH2=MIX-
    LO2=VMIN
    LMS2=250
    
    # button X
    SW3=16
    SH3=KEY:KEY_UP
    LO3=KEY:KEY_RIGHT
    LMS3=250
    
    # button Y
    SW4=20
    SH4=KEY:KEY_DOWN
    LO4=KEY:KEY_LEFT
    LMS4=250
    
    CMD="sbpd -v -f /home/tc/sbpd_commands.cfg \
    b,$SW1,$SH1,2,0,$LO1,$LMS1 \
    b,$SW2,$SH2,2,0,$LO2,$LMS2 \
    b,$SW3,$SH3,2,0,$LO3,$LMS3 \
    b,$SW4,$SH4,2,0,$LO4,$LMS4"
    
    echo $CMD
    $CMD
    Add Execute permission to /home/tc/sbpd-script.sh
    Code:
    cd
    chmod +x ./sbpd-script.sh
    Add /home/tc/sbpd-script.sh as a User Command under Tweaks. Backup and reboot.

    The X and Y buttons should now allow navigation in Jivelite. A short click (<250ms, quarter of a second) will move up and down in a menu, and anything longer than that will make X and Y do RIGHT and LEFT respectively.
    Last edited by chill; 2020-01-20 at 14:32. Reason: Corrected the location of DesktopJiveMeta.lua

  8. #38
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,475
    If you don't want to bother with a github pull request, you can send me a url to download the skin and I'll just commit it.


    Quote Originally Posted by chill View Post
    1) Jivelite setup

    copy /opt/jivelite/bin/jivelite.sh to /mnt/mmcblk0p2/tce/jivelite.sh
    Edit /mnt/mmcblk0p2/tce/jivelite.sh to include:
    Code:
    export SDL_FBDEV=/dev/fb1
    This won't be necessary with the new jivelite.tcz. But you will have to set JL_FRAME_BUFFER="/dev/fb1" in /usr/local/etc/pcp/pcp.cfg until the webgui is updated.

    Quote Originally Posted by chill View Post
    Change permissions to /home/tc/.jivelite/userpath
    Code:
    cd ~/.jivelite
    chmod -R 777 ./userpath
    This shouldn't be necessary, unless you're trying to avoid having to use sudo when copying files around.

    Quote Originally Posted by chill View Post
    copy /opt/jivelite/share/jive/applets/DesktopJive folder to /home/tc/.jivelite/userpath/applets/
    then modify line 110 of /home/tc/.jivelite/userpath/applets/DesktopJiveMeta.lua from[/code]
    The modified DesktopJiveMeta.lua should be in /home/tc/.jivelite/userpath/applets/DesktopJive/DesktopJiveMeta.lua

    Quote Originally Posted by chill View Post
    copy resized splash.png (240 pixels wide - height not important) to /home/tc/.jivelite/userpath/jive
    For now, this is correct.

    I'm going to look at changing jivelite to look for splash_width.png before splash.png as I already have the framebuffer size at load time and it will allow the splash file to be included in the override extensions and avoid a frame buffer resize just to load/view the splash screen.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  9. #39
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    1,651
    Quote Originally Posted by ralphy View Post
    If you don't want to bother with a github pull request, you can send me a url to download the skin and I'll just commit it.
    Thank you, I'll probably do that in that case. Still struggling to get the clock screensavers to work, so I'm not quite ready with the skin yet - don't want to waste your time with a partial version that has to be updated soon after.

    Quote Originally Posted by ralphy View Post
    This shouldn't be necessary, unless you're trying to avoid having to use sudo when copying files around.
    I haven't figure out yet how to make FileZilla do the sudo thing, so this was the only way I could find to get FileZilla to work in this folder.

    Quote Originally Posted by ralphy View Post
    The modified DesktopJiveMeta.lua should be in /home/tc/.jivelite/userpath/applets/DesktopJive/DesktopJiveMeta.lua
    Good spot - thank you. That's a typo on my part - the file itself is in the right place. I've corrected the typo in my earlier post.

    Quote Originally Posted by ralphy View Post
    I'm going to look at changing jivelite to look for splash_width.png before splash.png as I already have the framebuffer size at load time and it will allow the splash file to be included in the override extensions and avoid a frame buffer resize just to load/view the splash screen.
    That's a good idea :-)

  10. #40
    Ah, so thatís how to handle short and long button clicks! Admittedly Iíve not done much with the Pirate Audio board as the Pi it was attached to is being used for something else, but Iíll have a play shortly.

    Iím not sure that the reference to the Pearl 8x8 font works. It does work on Raspbian where more fonts are built into the kernel.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •