refactor: add context logs

This commit is contained in:
Cyrille Nofficial
2022-06-15 19:53:02 +02:00
parent e9440a6501
commit 79193c1d69
3 changed files with 22 additions and 10 deletions

View File

@@ -129,6 +129,7 @@ func main() {
throttleChannel,
actuator.PWM(throttleMinPWM), actuator.PWM(throttleMaxPWM), actuator.PWM(throttleStoppedPWM),
freq,
zap.S().With("actuator", "throttle"),
)
if err != nil {
zap.S().Panicf("unable to init throttle controller: %v", err)
@@ -139,6 +140,7 @@ func main() {
steeringChannel,
actuator.PWM(steeringLeftPWM), actuator.PWM(steeringRightPWM), actuator.PWM(steeringCenterPWM),
freq,
zap.S().With("actuator", "steering"),
)
if err != nil {
zap.S().Panicf("unable to init steering controller: %v", err)