Documentation
¶
Overview ¶
Package display reads and sets the EDID the JetKVM presents to the target over HDMI, which decides the video modes the target offers.
Index ¶
Constants ¶
const DefaultPreset = "JetKVM Default"
DefaultPreset is the name of the firmware's own EDID preset.
Variables ¶
var ErrBadEDID = errors.New("not a preset name or EDID hex")
ErrBadEDID means the argument is neither a preset name nor an EDID.
Functions ¶
func PreferredMode ¶
PreferredMode reads the active size from an EDID's first detailed timing descriptor (bytes 54..71). It returns zeros when there is none.
Types ¶
type Preset ¶
type Preset struct {
Name string `json:"name"`
// Width and Height are the preferred mode from the EDID's first detailed
// timing; zero when it has none.
Width int `json:"width"`
Height int `json:"height"`
EDID string `json:"edid"`
}
Preset is one of the device's built-in EDIDs (getEDIDPresets).
type SetOptions ¶
type SetOptions struct {
// Settle is how long to wait after setEDID before polling, so the
// target has time to drop the old mode. Default 1s.
Settle time.Duration
// Interval is the poll interval for getVideoState. Default 500ms.
Interval time.Duration
}
SetOptions control Set.
type Status ¶
type Status struct {
Video
// Preset names the preset whose EDID is in use, "" for a custom one.
Preset string `json:"preset"`
EDID string `json:"edid"`
}
Status is the video state and the EDID in use.
type Video ¶
type Video struct {
Ready bool `json:"ready"`
Width int `json:"width"`
Height int `json:"height"`
FPS float64 `json:"fps"`
}
Video is the captured HDMI input (getVideoState).