Add some notes ...

This commit is contained in:
Aaron Fischer 2016-07-12 23:48:01 +02:00
parent 57a8200a65
commit 430ba6d062

View file

@ -14,6 +14,13 @@ func stop() {
os.Exit(1) os.Exit(1)
} }
func waitAndExecuteCommandsFromDevice() {
// TODO: Establish connection to the device
// TODO: Wait for action loop
// TODO: Execute action
// TODO: Wait for action loop ...
}
func watchForConfigChanges() { func watchForConfigChanges() {
watcher, err := fsnotify.NewWatcher() watcher, err := fsnotify.NewWatcher()
if err != nil { if err != nil {
@ -31,6 +38,12 @@ func watchForConfigChanges() {
// an error to the user. // an error to the user.
if event.Op&fsnotify.Write == fsnotify.Write { if event.Op&fsnotify.Write == fsnotify.Write {
log.Println("Reload the config file ...") log.Println("Reload the config file ...")
// TODO: Parse the config file
// TODO: Handle errors in the config file
// TODO: Write a mapping for the mapping of the keys to the binary format the avr wants.
// TODO: Establish a connection to the device
// TODO: Transfer the new key mappings
// TODO: Close the connection?
} }
if event.Op&fsnotify.Rename == fsnotify.Rename || if event.Op&fsnotify.Rename == fsnotify.Rename ||
@ -61,5 +74,6 @@ func watchForConfigChanges() {
func main() { func main() {
watchForConfigChanges() watchForConfigChanges()
waitAndExecuteCommandsFromDevice()
stop() stop()
} }