mirror of
https://github.com/SlimeVR/SlimeVR-Tracker-ESP.git
synced 2026-04-06 02:01:57 +02:00
Ignore rest calibration ack if packet is too short (#389)
* Ignore rest calibration ack if packet is too short * Fix sensor calibration ack byte index
This commit is contained in:
committed by
Eiren Rain
parent
35b42a9e5c
commit
d0ba10acef
@@ -723,7 +723,12 @@ void Connection::update() {
|
||||
for (int i = 0; i < (int)sensors.size(); i++) {
|
||||
if (m_Packet[4] == sensors[i]->getSensorId()) {
|
||||
m_AckedSensorState[i] = (SensorStatus)m_Packet[5];
|
||||
m_AckedSensorCalibration[i] = (bool)m_Packet[9];
|
||||
if (len < 12) {
|
||||
m_AckedSensorCalibration[i]
|
||||
= sensors[i]->hasCompletedRestCalibration();
|
||||
break;
|
||||
}
|
||||
m_AckedSensorCalibration[i] = (bool)m_Packet[11];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
private:
|
||||
void printTemperatureCalibrationUnsupported();
|
||||
|
||||
bool restCalibrationComplete;
|
||||
bool restCalibrationComplete = false;
|
||||
};
|
||||
|
||||
const char* getIMUNameByType(ImuID imuType);
|
||||
|
||||
Reference in New Issue
Block a user