Documentation ¶
Index ¶
- func DFUFlash(s *State)
- func GetAppVersion() string
- func TeensyFlash(s *State)
- type Device
- type FlashProgress
- type State
- func (s *State) CompleteFlash()
- func (s *State) FlashFirmware()
- func (s *State) Log(level string, message string)
- func (s *State) ProbeDevices()
- func (s *State) ResetState()
- func (s *State) SelectDevice(model int, bus int, port int)
- func (s *State) SelectFirmware()
- func (s *State) SelectFirmwareWithData(data string)
- func (s *State) Shutdown()
- func (s *State) WailsInit(runtime *wails.Runtime) error
- type Step
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TeensyFlash ¶
func TeensyFlash(s *State)
TeensyFlash: Flashes Teensy boards. It opens the firmware file at the provided path, checks it's integrity, wait for the keyboard to be in Flash mode, flashes it and reboots the board.
Types ¶
type Device ¶
type Device struct { Model int `json:"model"` // 0 - planck // 1 - ergodox // 2 - moonlander Bus int `json:"bus"` Port int `json:"port"` }
func ProbeDevices ¶
type FlashProgress ¶
type FlashProgress struct { Total int `json:"total"` // total of firmware bytes to send Sent int `json:"sent"` // total of bytes sent }
FlashProgress represents the current flashing state, it gets updated by the flashing methods.
type State ¶
type State struct { AppVersion string `json:"appVersion"` Device Device `json:"device"` // The user selected usb device Devices []Device `json:"devices"` // The list of usb devices connected Step Step `json:"step"` // The current flashing process step FirmwarePath string `json:"firmwarePath"` // The firmware absolute Path selected by the user FlashProgress FlashProgress `json:"flashProgress"` // The Flashing state progress Logs []log `json:"logs"` // Log object // contains filtered or unexported fields }
State represents the global state of the application
func (*State) CompleteFlash ¶
func (s *State) CompleteFlash()
func (*State) FlashFirmware ¶
func (s *State) FlashFirmware()
func (*State) ProbeDevices ¶
func (s *State) ProbeDevices()
func (*State) ResetState ¶
func (s *State) ResetState()
func (*State) SelectFirmware ¶
func (s *State) SelectFirmware()
func (*State) SelectFirmwareWithData ¶
Click to show internal directories.
Click to hide internal directories.