diff --git a/src/network/packets.h b/src/network/packets.h index a52b4888..8bb2561d 100644 --- a/src/network/packets.h +++ b/src/network/packets.h @@ -67,8 +67,14 @@ #define PACKET_INSPECTION_DATATYPE_INT 1 #define PACKET_INSPECTION_DATATYPE_FLOAT 2 +// From the SH-2 interface that BNO08x use. enum class PacketErrorCode : uint8_t { - SENSOR_TIMEOUT = 1, + NOT_APPLICABLE = 0, + POWER_ON_RESET = 1, + INTERNAL_SYSTEM_RESET = 2, + WATCHDOG_TIMEOUT = 3, + EXTERNAL_RESET = 4, + OTHER = 5, }; #endif // SLIMEVR_PACKETS_H_ diff --git a/src/sensors/icm20948sensor.cpp b/src/sensors/icm20948sensor.cpp index c4e466a4..4466b513 100644 --- a/src/sensors/icm20948sensor.cpp +++ b/src/sensors/icm20948sensor.cpp @@ -331,7 +331,7 @@ void ICM20948Sensor::checkSensorTimeout() { ); networkConnection.sendSensorError( this->sensorId, - static_cast(PacketErrorCode::SENSOR_TIMEOUT) + static_cast(PacketErrorCode::WATCHDOG_TIMEOUT) ); lastData = currenttime; } diff --git a/src/sensors/softfusion/softfusionsensor.h b/src/sensors/softfusion/softfusionsensor.h index a38b259d..ca563db4 100644 --- a/src/sensors/softfusion/softfusionsensor.h +++ b/src/sensors/softfusion/softfusionsensor.h @@ -215,7 +215,7 @@ class SoftFusionSensor : public Sensor { ); networkConnection.sendSensorError( this->sensorId, - static_cast(PacketErrorCode::SENSOR_TIMEOUT) + static_cast(PacketErrorCode::WATCHDOG_TIMEOUT) ); }