refactor: move packages to pkg directory
This commit is contained in:
parent
de9dae9bd6
commit
e436775c2c
@ -3,8 +3,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"github.com/cyrilix/robocar-base/cli"
|
"github.com/cyrilix/robocar-base/cli"
|
||||||
rc "github.com/cyrilix/robocar-pca9685/actuator"
|
actuator2 "github.com/cyrilix/robocar-pca9685/pkg/actuator"
|
||||||
"github.com/cyrilix/robocar-pca9685/part"
|
"github.com/cyrilix/robocar-pca9685/pkg/part"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"os"
|
"os"
|
||||||
@ -103,8 +103,8 @@ func main() {
|
|||||||
}
|
}
|
||||||
defer client.Disconnect(50)
|
defer client.Disconnect(50)
|
||||||
|
|
||||||
t := rc.NewThrottle(throttleChannel, throttleStoppedPWM, throttleMinPWM, throttleMaxPWM)
|
t := actuator2.NewThrottle(throttleChannel, throttleStoppedPWM, throttleMinPWM, throttleMaxPWM)
|
||||||
s := rc.NewSteering(steeringChannel, steeringLeftPWM, steeringRightPWM)
|
s := actuator2.NewSteering(steeringChannel, steeringLeftPWM, steeringRightPWM)
|
||||||
|
|
||||||
p := part.NewPca9685Part(client, t, s, updatePWMFrequency, topicThrottle, topicSteering)
|
p := part.NewPca9685Part(client, t, s, updatePWMFrequency, topicThrottle, topicSteering)
|
||||||
err = p.Start()
|
err = p.Start()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package actuator
|
package actuator
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cyrilix/robocar-pca9685/util"
|
"github.com/cyrilix/robocar-pca9685/pkg/util"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"periph.io/x/conn/v3/gpio"
|
"periph.io/x/conn/v3/gpio"
|
||||||
"periph.io/x/devices/v3/pca9685"
|
"periph.io/x/devices/v3/pca9685"
|
@ -1,7 +1,7 @@
|
|||||||
package actuator
|
package actuator
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cyrilix/robocar-pca9685/util"
|
"github.com/cyrilix/robocar-pca9685/pkg/util"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"periph.io/x/conn/v3/gpio"
|
"periph.io/x/conn/v3/gpio"
|
||||||
"periph.io/x/devices/v3/pca9685"
|
"periph.io/x/devices/v3/pca9685"
|
@ -3,7 +3,7 @@ package part
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/cyrilix/robocar-base/service"
|
"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"
|
"github.com/cyrilix/robocar-protobuf/go/events"
|
||||||
MQTT "github.com/eclipse/paho.mqtt.golang"
|
MQTT "github.com/eclipse/paho.mqtt.golang"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
Loading…
Reference in New Issue
Block a user