Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 30,120
» Latest member: benstoke
» Forum threads: 16,364
» Forum posts: 117,538

Full Statistics

Latest Threads
Pinephone software
Forum: General Discussion on PinePhone
Last Post: Zebulon Walton
Yesterday, 02:21 PM
» Replies: 3
» Views: 304
Real women, real desire, ...
Forum: General
Last Post: Spaker
Yesterday, 01:04 AM
» Replies: 0
» Views: 62
Weatherproof case build
Forum: Enclosures
Last Post: ltorsini
07-07-2026, 07:01 PM
» Replies: 12
» Views: 38,541
Pinephone + Keyboard for ...
Forum: PinePhone Hardware
Last Post: PinePhoneProUser
07-07-2026, 04:47 PM
» Replies: 16
» Views: 11,116
pinecil v2 dosent negotia...
Forum: General Discussion on Pinecil
Last Post: moses
07-07-2026, 07:28 AM
» Replies: 0
» Views: 118
Rock64 v2.0 u-boot SPI is...
Forum: General Discussion on ROCK64
Last Post: ju0n
07-05-2026, 11:02 AM
» Replies: 0
» Views: 149
Libby - ebook reader that...
Forum: PineNote Software
Last Post: kiwigoldfish
07-04-2026, 04:41 PM
» Replies: 6
» Views: 4,116
PineNote v1.2 - Charges N...
Forum: General Discussion on Pinebook Pro
Last Post: ttsp
07-02-2026, 02:52 AM
» Replies: 0
» Views: 364
How to change the PineNot...
Forum: General Discussion on PineNote
Last Post: cameronharring
07-01-2026, 12:22 PM
» Replies: 0
» Views: 206
PinePhone Pro disable Vol...
Forum: PinePhone Pro Hardware
Last Post: FR_IV
07-01-2026, 10:53 AM
» Replies: 1
» Views: 1,654

 
  Smooth scrolling between watch faces with RIOT and LittlevGL
Posted by: bergzand - 03-01-2020, 07:09 AM - Forum: Development Discussion on PineTime - Replies (3)

For a few weeks now, basic functionality is working with my PineTime firmware project. It displays the time, synchronized over Bluetooth, and I'm able to
navigate between simple applications with touchscreen gestures. This last week I started work on getting the hardware scroll support in the display working for my firmware. The goal was to have a smooth scrolling experience between different watch faces. Now that I have it working the way I want it, it is time to write down how I've done it. This post got a bit longer than I initially expected. Scroll down to the bottom for a link to my code and a video of the result.

For those not familiar with my firmware, I've been working on a generic, but fairly modular PineTime firmware for a while now. One of the goals is to make it easy to develop extra watch faces and applications by other developers and extend and tune their version of the firmware to their needs. The firmware is based on RIOT,  LittlevGL, Nimble and will use LittleFS for the filesystem. RIOT is an embedded operating systems geared towards IoT devices. It provides threading, power efficiency and the HAL out of the box to support devices like the PineTime.

Integrating smooth scrolling into the LittlevGL graphics was challenging. LittlevGL provides a high level graphics interface, screens are built from elements such as labels, buttons and other high level GUI elements. Setup of the library requires a few callbacks, one to render a rectangular area of pixels on the screen and one to retrieve input events from the touch screen. LittlevGL supports full partial updates where it will only render the rectangular area on the display that requires updating. LittlevGL is able to work with rendering buffers smaller than the display area and will send out multiple render commands to update the full display if this is the case.

However, for the scroll to work it is required to render the full screen of the PineTime and not only the diff between the two different watch faces. This is because of how the hardware scroll behaviour on the ST7789V works. The ST7789V is a 240x320 pixels TFT controller. With the display of the PineTime being only 240x240 pixels big, we have an area of 240x80 pixels that is not visible on the screen, but is available in the chip to write to. So of this 240x320 pixels of display RAM on the chip, an area of 240x240 is used for the screen. The exact area displayed on the screen can be adjusted with the VSCSAD command (0x37, page 218 of the manual). With this command it is possible to configure on which row the top of the screen will start to render.

To achieve vertical scrolling we first write part of the new screen content to the unused display RAM area. Then the scroll start address is modified to show the new part of the new screen content and the remaining part of the old screen content. With the scroll start address adjusted, the next area that is out of the display can be updated after which the scroll start address is adjusted again to show the new area. Repeat this until the old content is completely replaced with the new content. If this is done fast enough, the stutter of the piecewise content updates is not visible to the human eye. The direction of the scroll start address adjustments will determine the direction of the display scroll motion. The catch with this hardware scroll is that it requires a full display content update. Even if both screens are similar in content, the content of the display RAM is shifted by 80 rows compared to the previous content. Furthermore, most of the previous content is overwritten by this operation.

LittlevGL is optimized to efficiently update partial areas of the screen to minimize the amount of data transfers required to the display. With the SPI connection to the ST7789V chip limited at 8Mhz, this is most of the time the limiting factor in the refresh rate of the screen content. The partial updates help here to make screen updates as smooth and fast as possible and minimize the screen render tearing associated with this.But for the smooth scrolling to work, it is LittlevGL needs to be convinced to render the full screen content instead of a partial refresh. To know how to do this we need to know of the refresh behavior of LittlevGL is done.

Internally, LittlevGL tracks which objects are modified between render operations. Modifying the text string of a label, or pressing a button sets a flag on those objects and triggers a re-render of the area occupied by those objects and all child objects. The rendered objects are internally organized within LittlevGL as a tree with a screen type object at the root. Multiple levels are possible, for example a button and a label contained within a small pop-up message. As mentioned, a screen type object is the base object of the tree structure of the GUI elements. It can be replaced by a new screen object for example to render different applications.

My PineTime firmware creates a new screen when switching between applications. The application itself will build a new screen and the GUI library only has to pass the new screen object to LittlevGL and remove the old screen object. The trick is that this in turn can be used to trigger a scroll operation. As a screen object encompasses the full display area, invalidating it by replacing it triggers a refresh of the full 240x240 display area. At this point it hooks into the low level GUI code of my firmware. When the firmware is instructed to switch between two applications, it is passed a scroll direction. It will switch the active screen object for a new one in LittlevGL and store locally the specified scroll direction. As soon as LittlevGL starts calling the rendering callback, this scroll direction is retrieved and used to determine if and how both the render offset and a new display scroll start address should be modified. After a full 240x240 pixels render, the GUI code automatically switch back to non-scroll behaviour to allow partial updates of the current screen by LittlevGL.

Results:

The result of this is visible in a short video I recorded. It shows smooth scrolling between different watch faces. Only the watch face
showing the time is fully functional, the other two are dummies two demonstrate the scroll operation. Switching between the watch faces is triggered by up and down swipe gestures as detected by the touch screen controller. A single render chunk is 240x5 pixels of content on the display. After every pixel chunk transferred, the scroll start address is updated to show the new chunk. This slows down the refresh speed a tiny bit, but this is acceptable to get this result.

Full firmware source (binaries available) on the Github project


  Android TV 8 or 9 on Rock64 ?
Posted by: chrbar - 02-29-2020, 10:36 PM - Forum: Android on Rock64 - Replies (2)

Hello,

Is it possible to install and run Android TV 8 or 9 on Rock64 ?

Thanks,
Chris


  Methods to Power Off PinePhone
Posted by: Rocky - 02-29-2020, 06:47 PM - Forum: UBPorts on PinePhone - Replies (3)

First off let me say how pleased I am with this device. 
UBPorts Ubuntu Touch seems very functional.
Interface is just easy to navigate.

I hope this subject isn't stupid as I prefer GUI interface and the actual hardware power button (switch) seems funky.
Like why should I have to hold in power button for 30 seconds < > to powerdown.
Sometimes device goes through shutdown actions just to suspend.

In Ubuntu Touch software interface I can't find shutdown nor poweroff setting.

Oh yea plugging in the usb-c charging adapter to charge the PinePhone powers phone on? What the heck am I missing.
Is that normal.

Do I have resort to terminal commands
As this is my first mobile "phone" I wish there was some very basic documentation for PinePhone like a PDF user manual.

Maybe I'm asking for too much.
Please be my community!
How to be a newb - Just ask me ...  Undecided


  Sharing a breakout board I've made for the pogo pins
Posted by: SMR404 - 02-29-2020, 02:15 PM - Forum: PinePhone Accessories - Replies (1)

Hi all,

I've made a breakout board for the Pinephone's pogo pins. This might make the process of testing accessory hardware easier when it is in an early stage of development (e.g. not ready to be mounted directly to the phone).

Here is the Github repository with pictures of it installed and the KiCad source files: https://github.com/SMR404/PinephonePogoBreakout


Also, I made a Reddit post with the same (redundant) info: https://old.reddit.com/r/pinephone/comments/fa43gp/time_to_get_acquainted_with_the_expansion_port

I hope this is a help to some of you!


  Preferred distro in Feb 2020?
Posted by: e-minguez - 02-29-2020, 09:24 AM - Forum: Linux on Pinebook - Replies (21)

Hi folks,
What is the best distro as of today for the original Pinebook/1080p in terms of features available? Does hardware acceleration, suspend, wifi, etc. landed in the kernel?

It seems the major focus is the Pinebook Pro those days but I'm wonder what can be done with the original Pinebook.

Thanks.

Enviado desde mi ONEPLUS A5010 mediante Tapatalk


  gigging with the PBP
Posted by: mamboman777 - 02-29-2020, 09:19 AM - Forum: General Discussion on Pinebook Pro - Replies (2)

Record18 tracks of audio onto my PBP this weekend. No plugins, just fader automation. Still, though...



Attached Files
.jpg   IMG_20200229_092103_01_compress33.jpg (Size: 285.34 KB / Downloads: 620)

  Pinephone, not delivered yet ?? -- UK
Posted by: Lin12 - 02-29-2020, 09:12 AM - Forum: General Discussion on PinePhone - Replies (15)

Hi Guys,


Is there anyone else in the UK who has not yet received their Pinephone ?

The delivery tracking is literally not moving at all. Just wondering if there are anyone else in same position as me.


  Booting with modified kernel parameters?
Posted by: zackw - 02-29-2020, 08:33 AM - Forum: Linux on Pinebook Pro - Replies (1)

Is there a way to do a one-off boot with changes to the kernel's "command line", ideally without opening up the PBP or attaching a serial console?  Like one would do on an x86 with GRUB by editing the menu entry.

I specifically want to interrupt the boot sequence while it's still running out of the initramfs and / isn't mounted, so that I can resize the partition, but I haven't been able to find anything on here talking about the general case.

I'm using the stock Debian install on the eMMC and I don't have a micro-SD card to put another OS instance on, unfortunately.


  pmbootstrap on Mac OSX
Posted by: srfne - 02-29-2020, 07:37 AM - Forum: PostmarketOS on PinePhone - Replies (2)

I do not own pinebook pro (linux computer) yet so I tried to install phosh w/ a Macbook terminal


from top to buttom:

$ curl -O https://bootstrap.pypa.io/get-pip.py
$ sudo python3 get-pip.py
$ pip3 --version
$ pip3 install pmbootstrap

$ pmbootstrap init

$ pmbootstrap install --sdcard=/dev/mmcblk0
$ pmbootstrap install --sdcard=/dev/sda

last two commands both generate:

[06:25:26] *** (1/5) PREPARE NATIVE CHROOT ***
[05:29:26] ERROR: [Errno 2] No such file or directory: '/proc/mounts'
[05:29:26] See also: <https://postmarketos.org/troubleshooting>
Run 'pmbootstrap log' for details.

Anyone knows what i'm doing wrong?


  Pinephone trade
Posted by: tso4ev - 02-29-2020, 06:25 AM - Forum: General Discussion on PinePhone - Replies (15)

Hello guys I want to buy Pinephone but its not possible at this moment .. So if anyone is interested selling theirs and is located in EU please contact me. I'm ready to pay the full price + all the shopping costs.
Thanks