Merge branch 'fix/imu-1000hz-alias' into v2/develop

This commit is contained in:
ob-yalian
2026-08-20 18:26:53 +08:00
+6 -6
View File
@@ -718,17 +718,17 @@ OB_SAMPLE_RATE sampleRateFromString(std::string &sample_rate) {
return OB_SAMPLE_RATE_200_HZ;
} else if (sample_rate == "500hz") {
return OB_SAMPLE_RATE_500_HZ;
} else if (sample_rate == "1khz") {
} else if (sample_rate == "1khz" || sample_rate == "1000hz") {
return OB_SAMPLE_RATE_1_KHZ;
} else if (sample_rate == "2khz") {
} else if (sample_rate == "2khz" || sample_rate == "2000hz") {
return OB_SAMPLE_RATE_2_KHZ;
} else if (sample_rate == "4khz") {
} else if (sample_rate == "4khz" || sample_rate == "4000hz") {
return OB_SAMPLE_RATE_4_KHZ;
} else if (sample_rate == "8khz") {
} else if (sample_rate == "8khz" || sample_rate == "8000hz") {
return OB_SAMPLE_RATE_8_KHZ;
} else if (sample_rate == "16khz") {
} else if (sample_rate == "16khz" || sample_rate == "16000hz") {
return OB_SAMPLE_RATE_16_KHZ;
} else if (sample_rate == "32khz") {
} else if (sample_rate == "32khz" || sample_rate == "32000hz") {
return OB_SAMPLE_RATE_32_KHZ;
} else {
RCLCPP_ERROR_STREAM(rclcpp::get_logger("utils"), "Unknown OB_SAMPLE_RATE: " << sample_rate);