2022-04-23 00:12:30 +00:00
|
|
|
package api
|
|
|
|
|
|
|
|
import (
|
|
|
|
"go.arsenm.dev/infinitime"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (c *Client) HeartRate() (out uint8, err error) {
|
2022-05-01 18:36:28 +00:00
|
|
|
err = c.client.Call(
|
|
|
|
"ITD",
|
2022-04-23 00:12:30 +00:00
|
|
|
"HeartRate",
|
|
|
|
nil,
|
|
|
|
&out,
|
|
|
|
)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Client) BatteryLevel() (out uint8, err error) {
|
2022-05-01 18:36:28 +00:00
|
|
|
err = c.client.Call(
|
|
|
|
"ITD",
|
2022-04-23 00:12:30 +00:00
|
|
|
"BatteryLevel",
|
|
|
|
nil,
|
|
|
|
&out,
|
|
|
|
)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Client) Motion() (out infinitime.MotionValues, err error) {
|
2022-05-01 18:36:28 +00:00
|
|
|
err = c.client.Call(
|
|
|
|
"ITD",
|
2022-04-23 00:12:30 +00:00
|
|
|
"Motion",
|
|
|
|
nil,
|
|
|
|
&out,
|
|
|
|
)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Client) StepCount() (out uint32, err error) {
|
2022-05-01 18:36:28 +00:00
|
|
|
err = c.client.Call(
|
|
|
|
"ITD",
|
2022-04-23 00:12:30 +00:00
|
|
|
"StepCount",
|
|
|
|
nil,
|
|
|
|
&out,
|
|
|
|
)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Client) Version() (out string, err error) {
|
2022-05-01 18:36:28 +00:00
|
|
|
err = c.client.Call(
|
|
|
|
"ITD",
|
2022-04-23 00:12:30 +00:00
|
|
|
"Version",
|
|
|
|
nil,
|
|
|
|
&out,
|
|
|
|
)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Client) Address() (out string, err error) {
|
2022-05-01 18:36:28 +00:00
|
|
|
err = c.client.Call(
|
|
|
|
"ITD",
|
2022-04-23 00:12:30 +00:00
|
|
|
"Address",
|
|
|
|
nil,
|
|
|
|
&out,
|
|
|
|
)
|
|
|
|
return
|
|
|
|
}
|