Fertogo / Pebble-workout-timer

Easily create Pebble-guided workouts from phone or computer
12 stars 6 forks source link

Pebble Classic Low Memory #96

Closed Fertogo closed 8 years ago

Fertogo commented 8 years ago

See #90 for problem details. Essentially Pebble Classic crashes with the current implementation because of memory constraints.

Fertogo commented 8 years ago

I've identified the problem and have a possible solution.

Problem

Not enough space for Pebble Classic workout in memory because Message heap takes up a significant amount.

Pebble Time Memory

|-----------------------------|---------------------------------|
|     Message Heap            |          Workout Data           |
|-----------------------------|---------------------------------|

Pebble Classic Memory

|-----------------------------|-------------|
|     Message Heap            |Workout Data |
|-----------------------------|-------------|

Notice how the Message Heap is the same size in both devices leaving very little space for workout data in the classic Pebble.

Solution

I wanted a solution that still stores everything on the watch while supporting larger moves. The proposed solution is to do this by sending the workout in multiple smaller chunks. The result will look like this,.

Pebble Classic Memory

                 |--------------|----------------------------|
                 | Message Heap |       Workout Data         |
                 |--------------|----------------------------|

Notice how the space for workout data is the same as that of the Pebble Time which means both devices will be able to support large workouts. (Though the Pebble Time will get this data quicker using less messages)