temp
This commit is contained in:
parent
dd9d15f48c
commit
ec13c4d32b
@ -15,8 +15,8 @@ public:
|
||||
void disconnect(); // 断开连接
|
||||
|
||||
// 让外部可以访问最新的 gear 和 speed
|
||||
int getGear() const;
|
||||
double getSpeed() const;
|
||||
int getGear();
|
||||
double getSpeed();
|
||||
void checkTimeout(std::chrono::seconds timeout);
|
||||
|
||||
private:
|
||||
|
||||
@ -128,13 +128,13 @@ void MqttClient::checkTimeout(std::chrono::seconds timeout)
|
||||
}
|
||||
}
|
||||
|
||||
int MqttClient::getGear() const
|
||||
int MqttClient::getGear()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(dataMutex);
|
||||
return gear;
|
||||
}
|
||||
|
||||
double MqttClient::getSpeed() const
|
||||
double MqttClient::getSpeed()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(dataMutex);
|
||||
return speed;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user