Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP : Test resource loading from external memory #1226

Closed
wants to merge 1 commit into from

Conversation

JF002
Copy link
Collaborator

@JF002 JF002 commented Jul 7, 2022

WARNING This branch contains experimental code that has not been thoroughly tested. Use it at your own risks! WARNING

This PR contains the code from this comment : a modified version of the digital watchface that displays a picture in background, Infineat and G7710. I modified the code from those PRs so that resources (fonts and pictures) are read from the external memory.

resources.tar.gz

I pushed this code so developers and contributors can test it and, evaluate performances and provide feedback. See comments in #321 for more info.

To use this branch, first upload the resources files (.bin files extracted from resources.tar.gz) to the external memory of the PineTime using the BLE FS API. ITD implement this API.
Then flash this branch to your PineTime and test the new watchfaces (digital, infineat and G7710).

 - Digital watchface displays a background image from F/matrix.bin
 - Infineat (#1024) reads fonts from F:/teko.bin and F:/bebas.bin and an icon from F:/infineat-1.bin
 - G7710 (#1122) reads fonts from F:/lv_font_dots_40.bin, F:/lv_font_7segment_40.bin and F:/lv_font_7segment_115.bin
@JF002 JF002 mentioned this pull request Jul 7, 2022
6 tasks
@Riksu9000 Riksu9000 assigned Riksu9000 and unassigned Riksu9000 Jul 7, 2022
@Riksu9000 Riksu9000 marked this pull request as draft July 7, 2022 09:18
@ITCactus
Copy link

i would like to check it, but there are some issues with ITD for me: for some reason it can not read battery characteristic on 2 setups (one is on VM, and second is baremetal setup), so i can't start "itgui" beacause of that.
the weird thing, that siglo also can not display battery status from InfiniTime (but i have no issues flashing the pinetime using it), while there is no issue for Gadgetbridge for the same 2 PineTime devices on different fw (tried with 1.8, 1.9, 1.10).
and adafruit's "glider" android app does not support uploading files yet (not mentioning it has some issues with adding content to the existed file, but no issue listing dirs or creating an empty file).
when i'm trying to use ITD from cli for FS (e.g. "itctl fs ls") it also fails with "operation is not supported", however it can display device address or steps.

is there a catch with ITD (or linux in general) why it fails with BLE battery characteristic?
could you please advice?

@kieranc
Copy link
Contributor

kieranc commented Jul 18, 2022

is there a catch with ITD (or linux in general) why it fails with BLE battery characteristic? could you please advice?

Is this a problem you're seeing only with this PR or generally? I've just tested this PR and itd reads the battery level just fine for me. Have you updated itd recently?

As far as this PR, the digital watchface background worked fine, the infineat font worked on the first try but the icon was missing, the G7710 font failed to load each time and on the 2nd try of infineat, the font also failed to load. The files were all uploaded in the same manner using itd, no errors reported and the file sizes match so I'm not sure what's going on.

image
image

@SteveAmor
Copy link
Contributor

Those screen shots look like lvgl memory is running low.

@ITCactus
Copy link

ITCactus commented Jul 18, 2022

Those screen shots look like lvgl memory is running low.

i had same symptoms with G7710 PR because of memory leak caused by lv_style usage :)
and you discovered that :)

@ITCactus
Copy link

ITCactus commented Jul 18, 2022

Is this a problem you're seeing only with this PR or generally? I've just tested this PR and itd reads the battery level just fine for me. Have you updated itd recently?

for me, it is general issue (not related to this PR or InfiniTime released versions)...
but i do not understand why... looks like it is not because of BLE device (PineTime, or another wearable) at all.
the only common for 2 linux host devices, those are laptops and ubuntu-based OS (i checked today on the most fresh setup from the scratch... i mean a fresh ubuntu setup and setting up environment to build InfiniTime, ITD and Siglo)

i hoped, since you are using ITD and it works for you, and i can't find useful info about issues with accessing only some GATT characteristics, hoped that's a trivial issue not even worth to mention in the web :)

@JF002
Copy link
Collaborator Author

JF002 commented Jul 19, 2022

@ITCactus On my setup, ITD sometimes fails at connecting with my PineTime, with no obvious reasons. Generally, I just remove the BLE address (using bluetoothctl) and re-pair and it works again.

@kieranc I observed the same behavior on my PineTime after 2-3 days : the fonts in G7710 were garbled. I guess that LVGL couldn't allocate enough memory for the font, so the font was not loaded and it displays random data from RAM...
I've already mentionned that issue here. This is definitely something we need to address (and I don't know how to handle that yet :) ).

@ITCactus
Copy link

for the reference, just discovered another app for PineTime BLE FS:
InfinitimeExplorer File Explorer for InfiniTime firmware on PineTime smartwatch.
and it's the Web app :)

unfortunately for me, when i try to upload some file on my pinetime (no matter if it's InfiniTime 1.8 or 1.10), the pinetime just reboots. but maybe that alternative app will be useful for someone :)

@Riksu9000
Copy link
Contributor

Resource support has been added, so I think this can be closed.

@Riksu9000 Riksu9000 closed this Jan 6, 2023
@Riksu9000 Riksu9000 deleted the test-resources-in-ext-memory branch January 23, 2023 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants