提交 f550fc58 编写于 作者: mysterywolf's avatar mysterywolf 提交者: guo

[sensor]修改传感器设备名称前缀

上级 39b25f66
...@@ -19,28 +19,28 @@ ...@@ -19,28 +19,28 @@
static char *const sensor_name_str[] = static char *const sensor_name_str[] =
{ {
"none", "None",
"acce_", /* Accelerometer */ "ac-", /* Accelerometer */
"gyro_", /* Gyroscope */ "gy-", /* Gyroscope */
"mag_", /* Magnetometer */ "ma-", /* Magnetometer */
"temp_", /* Temperature */ "tm-", /* Temperature */
"humi_", /* Relative Humidity */ "hm-", /* Relative Humidity */
"baro_", /* Barometer */ "br-", /* Barometer */
"li_", /* Ambient light */ "li-", /* Ambient light */
"pr_", /* Proximity */ "pr-", /* Proximity */
"hr_", /* Heart Rate */ "hr-", /* Heart Rate */
"tvoc_", /* TVOC Level */ "tv-", /* TVOC Level */
"noi_", /* Noise Loudness */ "ni-", /* Noise Loudness */
"step_", /* Step sensor */ "st-", /* Step sensor */
"forc_", /* Force sensor */ "fr-", /* Force sensor */
"dust_", /* Dust sensor */ "du-", /* Dust sensor */
"eco2_", /* eCO2 sensor */ "ec-", /* eCO2 sensor */
"gnss_", /* GPS/GNSS sensor */ "gn-", /* GPS/GNSS sensor */
"tof_", /* TOF sensor */ "tf-", /* TOF sensor */
"spo2_", /* SpO2 sensor */ "sp-", /* SpO2 sensor */
"iaq_", /* IAQ sensor */ "ia-", /* IAQ sensor */
"etoh_", /* EtOH sensor */ "et-", /* EtOH sensor */
"bp_" /* Blood Pressure */ "bp-" /* Blood Pressure */
}; };
/* sensor interrupt handler function */ /* sensor interrupt handler function */
...@@ -480,12 +480,12 @@ int rt_hw_sensor_register(rt_sensor_t sensor, ...@@ -480,12 +480,12 @@ int rt_hw_sensor_register(rt_sensor_t sensor,
result = rt_device_register(device, device_name, flag | RT_DEVICE_FLAG_STANDALONE); result = rt_device_register(device, device_name, flag | RT_DEVICE_FLAG_STANDALONE);
if (result != RT_EOK) if (result != RT_EOK)
{ {
LOG_E("rt_sensor[%s] register err code: %d", device_name, result); LOG_E("sensor[%s] register err code: %d", device_name, result);
rt_free(device_name); rt_free(device_name);
return result; return result;
} }
LOG_I("rt_sensor[%s] init success", device_name); LOG_I("sensor[%s] init success", device_name);
rt_free(device_name); rt_free(device_name);
return RT_EOK; return RT_EOK;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册