Intro
I'm out exercising running 3-4 times a week. For longer runs RunKeeper works fine but I also do some shorter exercises. For some of them I have created GoSy Run with a few specialised timers. It runs on the Pebble watch alone.
It is my first Pebble project and I haven't been writing C code in many years so I would be happy with any feedback I can get on the code.
Pictures
Features
Interval
For repeated workouts with a recovery in between. Possible to configure with an longer recovery every X repeats.
Ladder
Increases or decreases workout length, with recovery in between.
Stretch
Contains the stretches I do after I'we been out running. Possible to configure the length.
Questions
Timer precision
I have been noticing that the timers some times seems to slow down.
- Is it recommended to use tick_timer_service_subscribe instead of app_timer_register with a value of 1000 ms?
Passing variables between files
I have put variables I need in more than one file in their own file and made them available using extern in the header file. I have to keep the names long to not collide with other variables, eg. interval_workout_time.
- How do I make the content of a struct available to other files so I could access it with interval.workout_time instead?
- Would you recommend me to write setters and getters instead like in Java?