diff --git a/pkg/steering/controller.go b/pkg/steering/controller.go index 4e286a2..54e8b0a 100644 --- a/pkg/steering/controller.go +++ b/pkg/steering/controller.go @@ -112,6 +112,7 @@ func (c *Controller) onObjects(_ mqtt.Client, message mqtt.Message) { c.muObjects.Lock() defer c.muObjects.Unlock() c.objects = msg.GetObjects() + zap.S().Debugf("%v object(s) received", len(c.objects)) } func (c *Controller) onDriveMode(_ mqtt.Client, message mqtt.Message) { @@ -201,6 +202,7 @@ func (c *Controller) Objects() []*events.Object { defer c.muObjects.RUnlock() res := make([]*events.Object, 0, len(c.objects)) copy(res, c.objects) + zap.S().Debugf("copy object from %v to %v", c.objects, res) return res } diff --git a/pkg/steering/corrector.go b/pkg/steering/corrector.go index a5e2559..a3508c2 100644 --- a/pkg/steering/corrector.go +++ b/pkg/steering/corrector.go @@ -131,6 +131,7 @@ AdjustFromObjectPosition modify steering value according object positions : | ... | ... | ... | ... | ... | ... | */ func (c *GridCorrector) AdjustFromObjectPosition(currentSteering float64, objects []*events.Object) float64 { + zap.S().Debugf("%v objects to avoid", len(objects)) if len(objects) == 0 { return currentSteering }