pebble-simple-health
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"name": "pebble-simple-health", | ||
@@ -8,3 +8,3 @@ "author": "Yuriy Galanter", | ||
], | ||
"repository": "", | ||
"repository": "ygalanter/pebble-simple-health", | ||
"description": "Simlpe health library for Pebble", | ||
@@ -11,0 +11,0 @@ "license": "MIT", |
@@ -1,3 +0,52 @@ | ||
<b>Simple Health library for Pebble</b> | ||
<b>pebble-simple-health</b> is a simple library that provides basic health info for user of Pebble smartwatch. | ||
Available information: | ||
- Current daily step count | ||
- Current daily distance walked | ||
- Current daily time slept | ||
- Step count goal | ||
- Distance to walk goal | ||
- Time to sleep goal | ||
Readme updated soon... | ||
To use the package install it into your project and include `pebble-simple-health/pebble-simple-health.h` into code file. Note that pebble-simple-health depends on pebble-events package. | ||
##Availale functions: | ||
`bool health_is_available()` - returns `true` if health services are available, otherwise returns `false`. Available after call to `health_init` | ||
`void health_init(health_callback *callback_proc)` - initializes health services, parameter is a callback procedure that will be called when health data is updated | ||
`int health_get_metric_sum(HealthMetric metric)` - gets current daily value for [requested metrics](https://developer.pebble.com/docs/c/Foundation/Event_Service/HealthService/#HealthMetric) | ||
`int health_get_metric_goal(HealthMetric metric)` - gets goal value for requested metric. | ||
`void health_deinit();` - deninitializes health service | ||
##Example usage | ||
``` | ||
void health_updated() { | ||
APP_LOG(APP_LOG_LEVEL_INFO, "Steps taken: %d", health_get_metric_sum(HealthMetricStepCount)); | ||
} | ||
void handle_init(){ | ||
health_init(health_updated); | ||
if (!health_is_available()) { | ||
APP_LOG(APP_LOG_LEVEL_DEBUG, "Health service is not available"); | ||
} | ||
} | ||
void handle_deinit(){ | ||
health_deinit(); | ||
} | ||
int main(void) { | ||
handle_init(); | ||
app_event_loop(); | ||
handle_deinit(); | ||
} | ||
``` | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
34493
53