mirror of
https://github.com/goldenfishs/MRobot.git
synced 2025-04-28 23:39:55 +08:00
12 lines
286 B
C
12 lines
286 B
C
// /*
|
|
// 自定义的数学运算。
|
|
// */
|
|
|
|
// #include "user_math.h"
|
|
// #include <stdint.h>
|
|
|
|
|
|
// float Adc_to_Distance(uint16_t adc_data) {
|
|
// // return (float)((adc_data * 1000) / 4095);
|
|
// return (float)((adc_data * 1000) / 16000000.0f); // 使用浮点数进行计算
|
|
// }
|