add cpp benchmark
This commit is contained in:
@@ -101,6 +101,17 @@ int main() {
|
||||
CHECK(std::isfinite(state.motorState[FR_1].q));
|
||||
CHECK(state.wirelessRemote[0] == 0x55 && state.wirelessRemote[1] == 0x51);
|
||||
|
||||
LowState truncated_state{};
|
||||
CHECK(!codec.DecodeLowState(state_packet.data(),
|
||||
go1_pro_internal::kLowStateParsedSize,
|
||||
truncated_state));
|
||||
CHECK(codec.DecodeLowState(state_packet.data(),
|
||||
go1_pro_internal::kLowStateParsedSize + 1,
|
||||
truncated_state));
|
||||
CHECK(truncated_state.motorState[FR_1].temperature ==
|
||||
state.motorState[FR_1].temperature);
|
||||
CHECK(truncated_state.crc == state.crc);
|
||||
|
||||
const auto old_state_packet = ReadFile(GO1_PRO_TEST_CAPTURE_OLD);
|
||||
CHECK(old_state_packet.size() == go1_pro_internal::kLowStateDatagramSize);
|
||||
LowState old_state{};
|
||||
|
||||
Reference in New Issue
Block a user