Skip to content

Commit

Permalink
rename the atu100 package to mqtt
Browse files Browse the repository at this point in the history
  • Loading branch information
ftl committed Jan 8, 2022
1 parent 4560f45 commit ad7940e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"github.com/ftl/hamradio/cfg"
"github.com/spf13/cobra"

"github.com/ftl/hamdeck/pkg/atu100"
"github.com/ftl/hamdeck/pkg/hamdeck"
"github.com/ftl/hamdeck/pkg/hamlib"
"github.com/ftl/hamdeck/pkg/mqtt"
"github.com/ftl/hamdeck/pkg/pulse"
"github.com/ftl/hamdeck/pkg/streamdeck"
"github.com/ftl/hamdeck/pkg/tci"
Expand Down Expand Up @@ -102,7 +102,7 @@ func run(cmd *cobra.Command, args []string) {
deck.RegisterFactory(tci.NewButtonFactory(rootFlags.tciAddress))
}
if rootFlags.mqttAddress != "" {
deck.RegisterFactory(atu100.NewButtonFactory(rootFlags.mqttAddress, rootFlags.mqttUsername, rootFlags.mqttPassword))
deck.RegisterFactory(mqtt.NewButtonFactory(rootFlags.mqttAddress, rootFlags.mqttUsername, rootFlags.mqttPassword))
}

err = configureHamDeck(deck, rootFlags.configFile)
Expand Down
2 changes: 1 addition & 1 deletion pkg/atu100/buttons.go → pkg/mqtt/buttons.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package atu100
package mqtt

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion pkg/atu100/client.go → pkg/mqtt/client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package atu100
package mqtt

import (
"encoding/json"
Expand Down
6 changes: 3 additions & 3 deletions pkg/atu100/factory.go → pkg/mqtt/factory.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package atu100
package mqtt

import (
"log"
Expand All @@ -12,7 +12,7 @@ const (
)

const (
TuneButtonType = "atu100.Tune"
TuneButtonType = "mqtt.AT100Tune"
)

func NewButtonFactory(address string, username string, password string) *Factory {
Expand Down Expand Up @@ -45,7 +45,7 @@ func (f *Factory) createTuneButton(config map[string]interface{}) hamdeck.Button
path, havePath := hamdeck.ToString(config[ConfigPath])

if !(haveLabel && havePath) {
log.Print("A atu100.Tune button must have label and path fields.")
log.Print("A mqtt.ATU100Tune button must have label and path fields.")
return nil
}

Expand Down

0 comments on commit ad7940e

Please sign in to comment.