Documentation ¶
Index ¶
Constants ¶
View Source
const ( Height uint8 = 0x01 // Height report (in mm, P0/P1, P2 unused - always 0xf) LimitResp uint8 = 0x20 // Max-height set/cleared; response to SetMax (0x21) GetMax uint8 = 0x21 // Report max-height; [P0,P1] = max-height (c.f. SetMax) GetMin uint8 = 0x22 // Report min-height; [P0,P1] = min-height LimitStop uint8 = 0x23 // Min/Max reached (0x01 "Max-height reached", 0x02 "Min-height reached") Reset uint8 = 0x40 // Indicates desk in RESET mode; Displays "RESET" Preset uint8 = 0x92 // Moving to Preset location ([0x4,0x8,0x10,0x20] mapping to presets [1,2,3,4]) )
Commands sent by desk
View Source
const ( ProgMem1 uint8 = 0x03 // Set memory position 1 to current height ProgMem2 uint8 = 0x04 // Set memory position 2 to current height ProgMem3 uint8 = 0x25 // Set memory position 3 to current height ProgMem4 uint8 = 0x26 // Set memory position 4 to current height Units uint8 = 0x0e // Set units to cm/inches (param 0x00 == cm, 0x01 == in) MemMode uint8 = 0x19 // Set memory mode (0x00 One-touch mode, 0x01 Constant touch mode) CollSens uint8 = 0x1d // Set anti-collision sensitivity (Sent 1x; no repeats, 1/2/3 high/medium/low) SetMax uint8 = 0x21 // Set max height; Sets max-height to current height SetMin uint8 = 0x22 // Set min height; Sets min-height to current height LimitClear uint8 = 0x23 // Clear min/max height (0x01 Max-height cleared, 0x02 Min-height cleared) Wake uint8 = 0x29 // Poll message sent when desk doesn't respond to BREAK messages Calibrate uint8 = 0x91 // Height calibration (Repeats 2x) (Desk must be at lowest position, enters RESET mode after this) )
Commands sent by handset
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Jarvis ¶
type Jarvis struct {
// contains filtered or unexported fields
}
func (*Jarvis) NextMessage ¶
NextMessage reads the next *Message from the given reader.
the format is: [addr (2b)][command (1b)][param len (1b)][params (0-3b)][cksum (1b)][EOM (1b)]
states (at beginning of loop) 0 = unsynchronized 1 = half-synchronized 2 = synchronized 3 = received command 4 = received param length (0-3), reading params 5 = received all params 6 = verified checksum 7 = eom
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func InitMetrics ¶
func (*Metrics) Collect ¶
func (m *Metrics) Collect(ch chan<- prometheus.Metric)
Collect implements Prometheus.Collector.
func (*Metrics) Describe ¶
func (m *Metrics) Describe(ch chan<- *prometheus.Desc)
Describe implements Prometheus.Collector.
Click to show internal directories.
Click to hide internal directories.