Skip to content

Commit

Permalink
Fix log output on sensor state update.
Browse files Browse the repository at this point in the history
  • Loading branch information
hzcyf committed Aug 28, 2024
1 parent 22d3b3f commit eb158e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/device/component/sensor/SensorBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ void SensorBase::updateStreamState(OBStreamState state) {
globalTimestampCalculator_->clear();
}
}
}
if(oldState != state) {
LOG_DEBUG("Stream state changed to {}@{}", STREAM_STATE_STR(state), sensorType_);
}
streamStateCv_.notify_all();
Expand Down Expand Up @@ -248,10 +250,10 @@ void SensorBase::outputFrame(std::shared_ptr<Frame> frame) {
}

if(frameTimestampCalculator_) {
TRY_EXECUTE(frameTimestampCalculator_->calculate(frame));
TRY_EXECUTE(frameTimestampCalculator_->calculate(frame));
}
if(globalTimestampCalculator_) {
TRY_EXECUTE(globalTimestampCalculator_->calculate(frame));
TRY_EXECUTE(globalTimestampCalculator_->calculate(frame));
}

frameCallback_(frame);
Expand Down

0 comments on commit eb158e8

Please sign in to comment.