Documentation ¶
Index ¶
- func ConvertImage(srcimg image.Image, index int32, threshold int) ([][]byte, error)
- func CreateAutoMap(SliderMap *deej.SliderMap, SessionMap *deej.SessionMap) map[int]string
- func CreateFileName(processname string) string
- func GetIconFromAPI(icofdr *iconfinderapi.Iconfinder, keyword string) (image.Image, error)
- type DSPCanonicalConfig
- type SerialDSP
- type SerialInUse
- type SerialSD
- func (serSD *SerialSD) CheckForFile(filename string) (bool, error)
- func (serSD *SerialSD) CheckForFileLOAD(filename string, filelist []string) (bool, error)
- func (serSD *SerialSD) Delete(filename string) error
- func (serSD *SerialSD) ListDir() ([]string, error)
- func (serSD *SerialSD) SendByteSlice(byteslice []byte, DestFilename string) error
- func (serSD *SerialSD) SendFile(filepath string, DestFilename string) error
- func (serSD *SerialSD) SetTimeDelay(delay time.Duration)
- type SerialTCA
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertImage ¶
ConvertImage returns a byteslice with the converted image Basicly a copy of the main test program in my ssd1306 file prep lib but we dont write it to a file
func CreateAutoMap ¶
CreateAutoMap creates a automatic mapping of sessions to the displays
func CreateFileName ¶
CreateFileName creates a truncated 8 character filename using sha1 and the .b ending
func GetIconFromAPI ¶
func GetIconFromAPI(icofdr *iconfinderapi.Iconfinder, keyword string) (image.Image, error)
GetIconFromAPI gets an icon from online This calls the API from icon finder and tryes to get the first icon that matches the requirements It only looks up 3 icons It filters on flat icons, it cannot be a icon that needs to be bought It cannot be a vector image
Types ¶
type DSPCanonicalConfig ¶
type DSPCanonicalConfig struct { DisplayMapping map[int]string StartupDelay int CommandDelay int BWThreshold int IconFinderDotComAPIKey string // contains filtered or unexported fields }
DSPCanonicalConfig config of DSP
func NewDSPConfig ¶
func NewDSPConfig(logger *zap.SugaredLogger) (*DSPCanonicalConfig, error)
NewDSPConfig creates the config object
func (*DSPCanonicalConfig) Load ¶
func (cc *DSPCanonicalConfig) Load() error
Load reads a config file from disk and tries to parse it
type SerialDSP ¶
type SerialDSP struct {
// contains filtered or unexported fields
}
SerialDSP stuct for Serial Dispaly Objects
func NewSerialDSP ¶
func NewSerialDSP(sio *deej.SerialIO, siu *SerialInUse, logger *zap.SugaredLogger) (*SerialDSP, error)
NewSerialDSP Creates a new DSP object
func (*SerialDSP) DisplayOff ¶
DisplayOff turns the dislpay off
func (*SerialDSP) SetTimeDelay ¶
SetTimeDelay sets the time to delay after a command has been executed
type SerialInUse ¶
type SerialInUse struct { ExternalFuncUsingSerial bool // contains filtered or unexported fields }
func NewSerialInUse ¶
func NewSerialInUse() *SerialInUse
func (*SerialInUse) Done ¶
func (siu *SerialInUse) Done()
func (*SerialInUse) ExternalInUse ¶
func (siu *SerialInUse) ExternalInUse() bool
func (*SerialInUse) JoinLine ¶
func (siu *SerialInUse) JoinLine() chan bool
func (*SerialInUse) PreformingTask ¶
func (siu *SerialInUse) PreformingTask()
type SerialSD ¶
type SerialSD struct {
// contains filtered or unexported fields
}
SerialSD strut for serial objects
func NewSerialSD ¶
func NewSerialSD(sio *deej.SerialIO, siu *SerialInUse, logger *zap.SugaredLogger, verbose bool) (*SerialSD, error)
NewSerialSD Creates a new sd object
func (*SerialSD) CheckForFile ¶
CheckForFile Checks if a file exsists on the SD card
func (*SerialSD) CheckForFileLOAD ¶
CheckForFile Checks if a file exsists on the SD card
func (*SerialSD) SendByteSlice ¶
SendByteSlice Sends a file to the sd card
func (*SerialSD) SetTimeDelay ¶
SetTimeDelay sets the time to delay after a command has been executed
type SerialTCA ¶
type SerialTCA struct {
// contains filtered or unexported fields
}
SerialTCA strut for serial objects
func NewSerialTCA ¶
func NewSerialTCA(sio *deej.SerialIO, siu *SerialInUse, logger *zap.SugaredLogger) (*SerialTCA, error)
NewSerialTCA Creates a new TCA object
func (*SerialTCA) SelectPort ¶
SelectPort Slect the port number on the TCA9548A Port can be 0-7
func (*SerialTCA) SetTimeDelay ¶
SetTimeDelay sets the time to delay after a command has been executed