Skip to content

Commit

Permalink
RSDK-4074 - quick fix for logging (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-mishra authored Jul 20, 2023
1 parent fd875ba commit b8fcea6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sensorprocess/sensorprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
"errors"
"math"
"strings"
"time"

"github.com/edaniels/golog"
Expand Down Expand Up @@ -51,9 +52,8 @@ func addSensorReading(
tsr, err := config.Lidar.TimedSensorReading(ctx)
if err != nil {
config.Logger.Warn(err)
return errors.Is(err, replaypcd.ErrEndOfDataset)
return strings.Contains(err.Error(), replaypcd.ErrEndOfDataset.Error())
}

if tsr.Replay {
addSensorReadingFromReplaySensor(ctx, tsr.Reading, tsr.ReadingTime, config)
} else {
Expand Down
2 changes: 1 addition & 1 deletion testhelper/testhelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func getIntegrationLidar() *inject.Camera {
func getFinishedReplaySensor() *inject.Camera {
cam := &inject.Camera{}
cam.NextPointCloudFunc = func(ctx context.Context) (pointcloud.PointCloud, error) {
return nil, replaypcd.ErrEndOfDataset
return nil, errors.Wrap(errors.New("wrapped error"), replaypcd.ErrEndOfDataset.Error())
}
cam.StreamFunc = func(ctx context.Context, errHandlers ...gostream.ErrorHandler) (gostream.VideoStream, error) {
return nil, errors.New("lidar not camera")
Expand Down

0 comments on commit b8fcea6

Please sign in to comment.