Skip to content

Commit

Permalink
Renamed completedRestCalibration to hasCompletedRestCalibration
Browse files Browse the repository at this point in the history
  • Loading branch information
gorbit99 committed Feb 3, 2025
1 parent 3d1dd41 commit cfe86e9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/network/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ void Connection::sendSensorInfo(Sensor& sensor) {
MUST(sendByte(static_cast<uint8_t>(sensor.getSensorState())));
MUST(sendByte(static_cast<uint8_t>(sensor.getSensorType())));
MUST(sendShort(sensor.getSensorConfigData()));
MUST(sendByte(sensor.completedRestCalibration()));
MUST(sendByte(sensor.hasCompletedRestCalibration()));

MUST(endPacket());
}
Expand Down Expand Up @@ -556,7 +556,7 @@ void Connection::maybeRequestFeatureFlags() {

bool Connection::isSensorStateUpdated(int i, std::unique_ptr<Sensor>& sensor) {
return m_AckedSensorState[i] != sensor->getSensorState()
|| m_AckedSensorCalibration[i] != sensor->completedRestCalibration();
|| m_AckedSensorCalibration[i] != sensor->hasCompletedRestCalibration();
}

void Connection::searchForServer() {
Expand Down
2 changes: 0 additions & 2 deletions src/sensors/sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ const char* getIMUNameByType(ImuID imuType) {
return "Unknown";
}

bool Sensor::completedRestCalibration() { return restCalibrationComplete; }

void Sensor::markRestCalibrationComplete(bool completed) {
restCalibrationComplete = completed;
}
2 changes: 1 addition & 1 deletion src/sensors/sensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Sensor {
const Vector3& getAcceleration() { return acceleration; };
const Quat& getFusedRotation() { return fusedRotation; };
bool hasNewDataToSend() { return newFusedRotation || newAcceleration; };
bool completedRestCalibration();
inline bool hasCompletedRestCalibration() { return restCalibrationComplete; }

protected:
uint8_t addr = 0;
Expand Down

0 comments on commit cfe86e9

Please sign in to comment.