修复温度不能获取负值
Change-Id: I5f1ee70905f9c5ae33e10e2a9faeede0a349449e
diff --git a/mbtk/liblynq_lib/src/lynq_thermal.c b/mbtk/liblynq_lib/src/lynq_thermal.c
index 08f3073..f3e6e3d 100755
--- a/mbtk/liblynq_lib/src/lynq_thermal.c
+++ b/mbtk/liblynq_lib/src/lynq_thermal.c
@@ -87,6 +87,8 @@
int ret = 0;
int thermal = -1;
int thermal_num = 0;
+ mbtk_thermal_info_t temp;
+ memset(&temp, 0, sizeof(mbtk_thermal_info_t));
ret = qser_thermal_client_init();
if(ret != QSER_RESULT_SUCCESS)
@@ -95,7 +97,8 @@
return QSER_RESULT_FAIL;
}
- ret = mbtk_temp_get(qser_info_handle, 0, &thermal);
+ ret = mbtk_temp_get(qser_info_handle, 0, &temp);
+ thermal = temp.ther;
if(ret != QSER_RESULT_SUCCESS)
{
LOGE("[qser_thermal]mbtk_temp_get fail.");