1.硬件温度测试
This commit is contained in:
parent
831e465815
commit
88c3820e38
|
@ -2273,6 +2273,12 @@ void sf_hw_info_save(char *name)
|
||||||
int fd = 0;
|
int fd = 0;
|
||||||
//struct stat st;
|
//struct stat st;
|
||||||
|
|
||||||
|
struct tm drRtcTime;
|
||||||
|
|
||||||
|
UIMenuStoreInfo *pPara = sf_ui_para_get();
|
||||||
|
char datestr[30] = { 0 };
|
||||||
|
|
||||||
|
|
||||||
tmpBuf = malloc(512);
|
tmpBuf = malloc(512);
|
||||||
|
|
||||||
if (tmpBuf == NULL) {
|
if (tmpBuf == NULL) {
|
||||||
|
@ -2280,6 +2286,23 @@ void sf_hw_info_save(char *name)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
drRtcTime = hwclock_get_time(TIME_ID_CURRENT);
|
||||||
|
|
||||||
|
if(pPara->DateStyle == SF_DATE_TIME_YYMMDD)
|
||||||
|
{
|
||||||
|
sprintf(datestr, "%d/%02d/%02d/%02d :%02d:%02d", drRtcTime.tm_year, drRtcTime.tm_mon, drRtcTime.tm_mday, drRtcTime.tm_hour, drRtcTime.tm_min, drRtcTime.tm_sec);
|
||||||
|
}
|
||||||
|
else if (pPara->DateStyle == SF_DATE_TIME_MMDDYY)
|
||||||
|
{
|
||||||
|
sprintf(datestr, "%02d/%02d/%d %02d:%02d:%02d", drRtcTime.tm_mon, drRtcTime.tm_mday, drRtcTime.tm_year, drRtcTime.tm_hour, drRtcTime.tm_min, drRtcTime.tm_sec);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf(datestr, "%02d/%02d/%d %02d:%02d:%02d", drRtcTime.tm_mday, drRtcTime.tm_mon, drRtcTime.tm_year,drRtcTime.tm_hour, drRtcTime.tm_min, drRtcTime.tm_sec);
|
||||||
|
}
|
||||||
|
//printf("[%s:%d]customStr:%s\n", __FUNCTION__, __LINE__, datestr);
|
||||||
|
|
||||||
|
|
||||||
//snprintf(fileName, sizeof(fileName), "%s", SF_HW_TEST_FILE);
|
//snprintf(fileName, sizeof(fileName), "%s", SF_HW_TEST_FILE);
|
||||||
|
|
||||||
if(access(SF_HW_TEST_FILE, F_OK) == 0)
|
if(access(SF_HW_TEST_FILE, F_OK) == 0)
|
||||||
|
@ -2292,7 +2315,7 @@ void sf_hw_info_save(char *name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sprintf(tmpBuf, "%s IRSHTTER=%d\r\n", name, IRSHTTER);
|
sprintf(tmpBuf, "%s %s IRSHTTER=%d TemperAdc=%lu\r\n", datestr, name, IRSHTTER, sf_get_temper_adc());
|
||||||
printf("%s\r", tmpBuf);
|
printf("%s\r", tmpBuf);
|
||||||
|
|
||||||
if(fd)
|
if(fd)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user