--- remove unused code

This commit is contained in:
Yunhorn 2024-07-26 12:25:58 +08:00
parent 9b9e1618ff
commit 125c6326d4
1 changed files with 11 additions and 25 deletions

View File

@ -987,15 +987,15 @@ static void SendTxData(void)
AppData.Buffer[i++] = (uint8_t)(sensorData.fall_speed)&0xff; //18 fall detected speed
AppData.Buffer[i++] = (uint8_t)(sensorData.fall_gravity)&0xff; //19 fall detected gravity
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_start_timestamp>>24)&0xff; //20 fall start time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_start_timestamp>>16)&0xff; //21 fall start time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_start_timestamp>>8)&0xff; //22 fall start time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_start_timestamp)&0xff; //23 fall start time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_start_timestamp>>24)&0xff; //20 SOS start time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_start_timestamp>>16)&0xff; //21 SOS start time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_start_timestamp>>8)&0xff; //22 SOS start time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_start_timestamp)&0xff; //23 SOS start time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_stop_timestamp>>24)&0xff; //24 fall start time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_stop_timestamp>>16)&0xff; //25 fall start time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_stop_timestamp>>8)&0xff; //26 fall start time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_stop_timestamp)&0xff; //27 fall start time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_stop_timestamp>>24)&0xff; //24 SOS stop time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_stop_timestamp>>16)&0xff; //25 SOS stop time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_stop_timestamp>>8)&0xff; //26 SOS stop time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor2_stop_timestamp)&0xff; //27 SOS stop time stamp
AppData.Buffer[i++] = (uint8_t)(sensorData.event_sensor3_fall_start_time_stamp>>24)&0xff; //28 fall start time stamp
@ -2924,31 +2924,17 @@ void STS_SENSOR_Function_Test_Process(void)
}
uint32_t STS_Get_Date_Time_Stamp(void) //uint32_t *time_stamp, uint8_t *datetimestamp)
uint32_t STS_Get_Date_Time_Stamp(void)
{
struct tm localtime;
SysTime_t UnixEpoch = SysTimeGet();
UnixEpoch.Seconds -= 18; /*removing leap seconds*/
SysTimeLocalTime(UnixEpoch.Seconds, &localtime);
//*time_stamp = (uint32_t)UnixEpoch.Seconds;
APP_LOG(TS_OFF, VLEVEL_L, "LTIME:%02dh%02dm%02ds on %02d/%02d/%04d\r\n",
APP_LOG(TS_OFF, VLEVEL_M, "UTC TIME:%02dh%02dm%02ds on %02d/%02d/%04d\r\n",
localtime.tm_hour, localtime.tm_min, localtime.tm_sec,
localtime.tm_mday, localtime.tm_mon + 1, localtime.tm_year + 1900);
return (uint32_t)UnixEpoch.Seconds;
#if 0
datetimestamp[0] = localtime.tm_hour;
datetimestamp[1] = localtime.tm_min;
datetimestamp[2] = localtime.tm_sec;
datetimestamp[3] = localtime.tm_mday;
datetimestamp[4] = localtime.tm_mon+1;
datetimestamp[5] = ((localtime.tm_year+1900)>>8)&0xff;
datetimestamp[6] = ((localtime.tm_year+1900))&0xff;
#endif
}