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

Add support for the upload procedure of external resource for the PineTime (running InfiniTime). #236

Merged
merged 5 commits into from
Sep 19, 2022

Conversation

JF002
Copy link
Contributor

@JF002 JF002 commented Sep 3, 2022

At InfiniTime, we are working on adding support for external resources : applications and watchfaces will be able to load images and fonts stored in the external SPI flash memory of the PineTime.

This is working quite well. See here and here.

Those resources are packaged into a ZIP file together with a "manifest file" that describes the mapping of the files into the watch. See here.

Now, we need companion apps to implement the upload procedure so users can easily update the resources from their device.

This PR contains the implementation of the Adafruit BLE File Transfer Protocol (the BLE FS API implemented in InfiniTime) and of the upload procedure specified for InfiniTime.

Note that the feature is not merged yet in InfiniTime, we are still doing some tests and waiting for other companion apps to add this feature.

Basically, this PR add AdafruitBleFsService which is the entry point for the Adafruit BLE File Transfer Protocol, AdafruitBleFsService which contains operations on the API (list, erase, write file) and AdafruitBleFsWorker which implements the upload procedure.

@@ -34,6 +39,6 @@ void InfinitimeFirmwareInfo::determineFirmwareVersion()
m_version = "FW ()";
break;
default:
m_version = "unknown";
m_version = "Ressource ()";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add case Res_Compressed here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@JF002 JF002 force-pushed the pinetime-add-support-for-external-resource branch from 4a04e6e to a270c98 Compare September 13, 2022 20:37
@JF002
Copy link
Contributor Author

JF002 commented Sep 13, 2022

I've just rebased this branch on master, fixed conflicts and add a few steps in the upload procedure (create folder and subfolder, correctly remove older entries, remove obsolete files).

The corresponding feature has already been merged in InfiniTime, so this branch is ready for review :)

@JF002 JF002 marked this pull request as ready for review September 13, 2022 20:41
@@ -15,7 +15,7 @@ PageListPL {
var pairpage = pageStack.push(Qt.resolvedUrl("./PairPage.qml"));
pairpage.deviceType = deviceType;})
} else {
var pairpage = pageStack.push(Qt.resolvedUrl("./PairPage.qml"));
var pairpage = pageStack.push(Qt.resolvedUrl("/home/jf/git/harbour-amazfish/ui/qml/pages/PairPage.qml"));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this shoudnt be here :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sorry about that... I changed the path to debug an issue with the pairing page, and I shouldn't have committed that! I reverted that change.

@piggz piggz merged commit d8efeb6 into piggz:master Sep 19, 2022
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.

2 participants