随便标定了一个mm

This commit is contained in:
RB 2025-04-02 22:03:51 +08:00
parent b0e48d940b
commit 35230e80ef
3 changed files with 10 additions and 9 deletions

File diff suppressed because one or more lines are too long

View File

@ -11,6 +11,7 @@
## uart
# Micro_usb :100hz float型计算后的毫米数据
需要修改User\component\user_math.c中的标定函数。
## Led

View File

@ -8,5 +8,5 @@
float Adc_to_Distance(uint16_t adc_data) {
// return (float)((adc_data * 1000) / 4095);
return (float)((adc_data * 1000) / 4095.0f); // 使用浮点数进行计算
return (float)((adc_data * 1000) / 16000000.0f); // 使用浮点数进行计算
}