随便标定了一个mm
This commit is contained in:
parent
b0e48d940b
commit
35230e80ef
File diff suppressed because one or more lines are too long
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
## uart
|
## uart
|
||||||
# Micro_usb :100hz float型:计算后的毫米数据
|
# Micro_usb :100hz float型:计算后的毫米数据
|
||||||
|
需要修改User\component\user_math.c中的标定函数。
|
||||||
|
|
||||||
|
|
||||||
## Led
|
## Led
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
|
|
||||||
float Adc_to_Distance(uint16_t adc_data) {
|
float Adc_to_Distance(uint16_t adc_data) {
|
||||||
// return (float)((adc_data * 1000) / 4095);
|
// return (float)((adc_data * 1000) / 4095);
|
||||||
return (float)((adc_data * 1000) / 4095.0f); // 使用浮点数进行计算
|
return (float)((adc_data * 1000) / 16000000.0f); // 使用浮点数进行计算
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user