Add some notes ...

This commit is contained in:
Aaron Fischer 2016-07-12 23:48:01 +02:00
parent 57a8200a65
commit 430ba6d062
1 changed files with 14 additions and 0 deletions

View File

@ -14,6 +14,13 @@ func stop() {
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() {
watcher, err := fsnotify.NewWatcher()
if err != nil {
@ -31,6 +38,12 @@ func watchForConfigChanges() {
// an error to the user.
if event.Op&fsnotify.Write == fsnotify.Write {
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 ||
@ -61,5 +74,6 @@ func watchForConfigChanges() {
func main() {
watchForConfigChanges()
waitAndExecuteCommandsFromDevice()
stop()
}