...
This commit is contained in:
@@ -298,7 +298,7 @@ public:
|
||||
};
|
||||
*/
|
||||
|
||||
_updateFunc = [controls, this](std::stop_token stop_token) {
|
||||
_updateFunc = [controls, this](std::stop_token stop_token) -> std::error_code {
|
||||
// first, update mount quantities
|
||||
typename hardware_t::hardware_state_t hw_pos;
|
||||
auto hw_err = controls->hardwareGetState(&hw_pos);
|
||||
@@ -619,8 +619,8 @@ public:
|
||||
|
||||
std::unique_lock ulock(*_updateMutex);
|
||||
|
||||
auto res = _updateCondVar->wait_for(ulock, timeout, [this]() { return *_isDataUpdated; });
|
||||
if (res == std::cv_status::timeout) {
|
||||
auto res = _updateCondVar->wait_for(ulock, timeout, [this]() -> bool { return _isDataUpdated.get(); });
|
||||
if (!res) {
|
||||
return MccTelemetryErrorCode::ERROR_DATA_TIMEOUT;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user