settings

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

DSUL - Disturb State USB Light : Settings module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveSettings

func SaveSettings(cfg *Config)

Types

type Color

type Color struct {
	Name  string
	Value string
}

type Config

type Config struct {
	Colors        []Color
	Modes         []Mode
	BrightnessMin int
	BrightnessMax int
	Serial        Serial
	Password      string
	Network       Network
}

func GetSettings

func GetSettings() *Config

type Hardware

type Hardware struct {
	Version            string
	Leds               int
	Brightness_min     int
	Brightness_max     int
	Current_color      string
	Current_brightness int
	Current_mode       int
	Current_dim        int
}

func ParseHardwareInformation

func ParseHardwareInformation(info string) *Hardware

Parse information from harware and return a hardware struct.

type Mode

type Mode struct {
	Name  string
	Value int
}

type Network

type Network struct {
	Listen bool
	Server string
	Port   int
}

type Serial

type Serial struct {
	Port     string
	Baudrate int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL