Documentation ¶
Overview ¶
Package smartwatch provides a common interface for multiple smartwatches.
It was originally developed to be used with the PineTime64 smartwatch.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChargeStatus ¶
type ChargeStatus uint8
ChargeStatus returns the state of the battery.
const ( Discharging ChargeStatus = iota + 1 Charging FullyCharged )
Charge status of the battery: discharging, charging, and fully charged.
type Watch ¶
Watch is an emulation for smartwatches on Linux systems.
func Open ¶
Open returns a Watch instance. It is a singleton: opening it a second time will still return the same object, if opening the first time succeeded.
func (*Watch) BatteryStatus ¶
func (w *Watch) BatteryStatus() (millivolt, percent int, status ChargeStatus)
BatteryStatus reads and returns the current battery status (percent and whether it is charging).
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
battery
This program displays some simple graphics on the screen, as a "hello world" style program.
|
This program displays some simple graphics on the screen, as a "hello world" style program. |
digitalclock
This program displays the current time on the screen.
|
This program displays the current time on the screen. |
hello
This program displays some simple graphics on the screen, as a "hello world" style program.
|
This program displays some simple graphics on the screen, as a "hello world" style program. |
Click to show internal directories.
Click to hide internal directories.