The daily goals a wearer picks on the settings page, turned from a menu choice into the real target. More...
#include <stdint.h>Go to the source code of this file.
Functions | |
| int | goals_steps (uint8_t index) |
| The step goal for a menu choice. | |
| int | goals_distance_m (uint8_t index) |
| The distance goal for a menu choice, in metres. | |
| int | goals_calories (uint8_t index) |
| The active calorie goal for a menu choice. | |
| int | goals_active_min (uint8_t index) |
| The active minutes goal for a menu choice. | |
| int | goals_sleep_min (uint8_t index) |
| The sleep goal for a menu choice, in minutes. | |
| int | goals_hr_limit (uint8_t index) |
| The heart rate limit for a menu choice, the top of a heart rate bar. | |
The daily goals a wearer picks on the settings page, turned from a menu choice into the real target.
The page sends the index of the choice rather than the number, and these tables hold the numbers in the same order as the page's menus. The page's rows live in ts/pkjs/goal-rows.ts, and a spec checks the two sides hold the same values in the same order. An index past the end of a table reads as its first entry, so a damaged setting still gives a real goal.
Each table's length is a plain number the compiler knows, so a KNOWN_GOAL_* entry can hold its setting to it.