diff --git a/cmd/rc-pca9685/rc-pca9685.go b/cmd/rc-pca9685/rc-pca9685.go index 230f248..61c2f25 100644 --- a/cmd/rc-pca9685/rc-pca9685.go +++ b/cmd/rc-pca9685/rc-pca9685.go @@ -3,8 +3,8 @@ package main import ( "flag" "github.com/cyrilix/robocar-base/cli" - rc "github.com/cyrilix/robocar-pca9685/actuator" - "github.com/cyrilix/robocar-pca9685/part" + actuator2 "github.com/cyrilix/robocar-pca9685/pkg/actuator" + "github.com/cyrilix/robocar-pca9685/pkg/part" log "github.com/sirupsen/logrus" "go.uber.org/zap" "os" @@ -103,8 +103,8 @@ func main() { } defer client.Disconnect(50) - t := rc.NewThrottle(throttleChannel, throttleStoppedPWM, throttleMinPWM, throttleMaxPWM) - s := rc.NewSteering(steeringChannel, steeringLeftPWM, steeringRightPWM) + t := actuator2.NewThrottle(throttleChannel, throttleStoppedPWM, throttleMinPWM, throttleMaxPWM) + s := actuator2.NewSteering(steeringChannel, steeringLeftPWM, steeringRightPWM) p := part.NewPca9685Part(client, t, s, updatePWMFrequency, topicThrottle, topicSteering) err = p.Start() diff --git a/actuator/pca9685.go b/pkg/actuator/pca9685.go similarity index 100% rename from actuator/pca9685.go rename to pkg/actuator/pca9685.go diff --git a/actuator/steering.go b/pkg/actuator/steering.go similarity index 94% rename from actuator/steering.go rename to pkg/actuator/steering.go index bfb9ecb..de3bd7f 100644 --- a/actuator/steering.go +++ b/pkg/actuator/steering.go @@ -1,7 +1,7 @@ package actuator import ( - "github.com/cyrilix/robocar-pca9685/util" + "github.com/cyrilix/robocar-pca9685/pkg/util" "go.uber.org/zap" "periph.io/x/conn/v3/gpio" "periph.io/x/devices/v3/pca9685" diff --git a/actuator/throttle.go b/pkg/actuator/throttle.go similarity index 96% rename from actuator/throttle.go rename to pkg/actuator/throttle.go index 4ce321d..4a4e10f 100644 --- a/actuator/throttle.go +++ b/pkg/actuator/throttle.go @@ -1,7 +1,7 @@ package actuator import ( - "github.com/cyrilix/robocar-pca9685/util" + "github.com/cyrilix/robocar-pca9685/pkg/util" "go.uber.org/zap" "periph.io/x/conn/v3/gpio" "periph.io/x/devices/v3/pca9685" diff --git a/part/part.go b/pkg/part/part.go similarity index 98% rename from part/part.go rename to pkg/part/part.go index eefef83..8ed18ab 100644 --- a/part/part.go +++ b/pkg/part/part.go @@ -3,7 +3,7 @@ package part import ( "fmt" "github.com/cyrilix/robocar-base/service" - "github.com/cyrilix/robocar-pca9685/actuator" + "github.com/cyrilix/robocar-pca9685/pkg/actuator" "github.com/cyrilix/robocar-protobuf/go/events" MQTT "github.com/eclipse/paho.mqtt.golang" "github.com/golang/protobuf/proto" diff --git a/util/util.go b/pkg/util/util.go similarity index 100% rename from util/util.go rename to pkg/util/util.go diff --git a/util/util_test.go b/pkg/util/util_test.go similarity index 100% rename from util/util_test.go rename to pkg/util/util_test.go