Documentation ¶
Index ¶
- Variables
- type Anim
- type Config
- type GetHttpGifId
- type Image
- func (i *Image) At(x, y int) color.Color
- func (i *Image) Bounds() image.Rectangle
- func (i *Image) ColorModel() color.Model
- func (i *Image) PixOffset(x, y int) int
- func (i *Image) RGBAAt(x, y int) color.RGBA
- func (i *Image) SendTo(dev *Pixoo64) error
- func (i *Image) Set(x, y int, c color.Color)
- func (i *Image) SetRGBA(x, y int, c color.RGBA)
- func (i *Image) SubImage(r image.Rectangle) image.Image
- type Pixoo64
- func (p *Pixoo64) Buzzer(activeTime, offTime, totalTime int) error
- func (p *Pixoo64) GetAllConf() (*Config, error)
- func (p *Pixoo64) GetDeviceTime() (*Time, error)
- func (dev *Pixoo64) GetUser() (*User, error)
- func (p *Pixoo64) GetWeatherInfo() (*WeatherInfo, error)
- func (p *Pixoo64) Reboot() error
- func (p *Pixoo64) ResetHttpGifId() error
- func (p *Pixoo64) ScreenSwitch(state bool) error
- func (dev *Pixoo64) SelectChannel(ch int) error
- func (p *Pixoo64) SetBrightness(v int) error
- func (p *Pixoo64) SetLocation(long, lat float64) error
- func (p *Pixoo64) SetTime(t time.Time) error
- func (p *Pixoo64) SetTimezone(tz string) error
- func (p *Pixoo64) ShortBeeps(count int) error
- type Time
- type User
- type WeatherInfo
Constants ¶
This section is empty.
Variables ¶
var Client = http.DefaultClient
Functions ¶
This section is empty.
Types ¶
type Anim ¶
type Anim struct {
Frames []*Image
}
func (*Anim) AppendFrame ¶
AppendFrame will add the given image to the list. If it is a pixoo64.Image then the time parameter will be ignored, and the image's original time will be used.
type Config ¶
type Config struct { Brightness int RotationFlag int // 1 ClockTime int // 60 GalleryTime int // 60 SingleGalleyTime int // -1 PowerOnChannelId int // 1 GalleryShowTimeFlag int // 0|1 CurClockId int // 64 Time24Flag int TemperatureMode int GyrateAngle int MirrorFlag int LightSwitch int }
Config is the object returned by GetAllConf
type GetHttpGifId ¶
type GetHttpGifId struct {
PicId int
}
type Image ¶
type Image struct { // Pix holds the image's pixels, in R, G, B order. Pix []uint8 Stride int Rect image.Rectangle Time int // image's display time in ms }
func ConvertImage ¶
ConvertImage will take any image.Image and return a suitable image object unless the image size is not one of 16, 32 or 64 This is useful when loading for example a png image without having to care for its pixel format.
func NewImage ¶
NewImage creates a new pixoo64 format image. Size can only be 16, 32 or 64 pixels. Time is expressed in milliseconds.
func (*Image) ColorModel ¶
type Pixoo64 ¶
type Pixoo64 struct { DeviceName string // "Pixoo64" DeviceId int // 300054377 DeviceMac string // "c8f09e3b0964" DevicePrivateIP string }
func SameLANDevices ¶
func (*Pixoo64) Buzzer ¶
Buzzer will cause the device to emit a sound. For example: Buzzer(100, 100, 500)
func (*Pixoo64) GetAllConf ¶
GetAllConf retrieves all configuration parameters from the device
func (*Pixoo64) GetDeviceTime ¶
func (*Pixoo64) GetWeatherInfo ¶
func (p *Pixoo64) GetWeatherInfo() (*WeatherInfo, error)
func (*Pixoo64) ResetHttpGifId ¶
func (*Pixoo64) ScreenSwitch ¶
ScreenSwitch switches the screen on or off
func (*Pixoo64) SelectChannel ¶
func (*Pixoo64) SetBrightness ¶
SetBrightness sets the device's brightness between 0 and 100
func (*Pixoo64) SetLocation ¶
SetLocation sets the location for which weather data is pulled from https://openweathermap.org/
func (*Pixoo64) SetTimezone ¶
func (*Pixoo64) ShortBeeps ¶
ShortBeeps will call Buzzer in order to perform a number of beeps, this can be useful to have some values mean specific things, just like old time BIOS beeps.