Skip to content

App works fine in InfiniSim but not at all when flashed to the watch. (Pointer/memory-allocation/chrono/refresh issue?) #1582

Answered by JF002
kestara asked this question in Q&A
Discussion options

You must be logged in to vote

std::chrono::system_clock is not implemented in InfiniTime, so std::chrono::system_clock::now() probably return undefined values, which might be why your application does not work as expected on the PineTime, while it works on your computer (where system_clock is fully functional.

Instead, you should try using the DateTimeController (https://github.com/InfiniTimeOrg/InfiniTime/blob/develop/src/components/datetime/DateTimeController.h) to get the date and time of the PineTime. You can take some inspirations from the existing apps and watchfaces (ex : https://github.com/InfiniTimeOrg/InfiniTime/blob/develop/src/displayapp/screens/WatchFaceDigital.cpp#L94).

I also noticed that your code uses s…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@kestara
Comment options

@kestara
Comment options

Answer selected by kestara
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants