Commit d880c932 authored by 高士达's avatar 高士达

🎉 init:增加单位转换服务函数

parent d330e169
#include "Unit_Convert_Service.h"
#define GUI_DISP_MODE_NORMAL 0x00 //正常
#define GUI_DISP_MODE_NEGATIVE 0x01 //负数
/**
* @brief 公里转换英里服务函数
* @return 英里 精度 1
*/
uint32_t Unit_Conv_km_To_mile(unsigned long km)
{
return km * 621 / 1000; //mile = km * 3937 / 6336
}
#ifndef UNIT_CONVERT_SERVICE_H
#define UNIT_CONVERT_SERVICE_H
#include "common.h"
extern uint32_t Unit_Conv_km_To_mile(unsigned long km);
#endif
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment