rcommand get_time patch timestamp

This commit is contained in:
cyberman54 committed 2021-05-03 19:36:22 +02:00
1 parent 0f50fe3e30
commit 35f27ca415
1 file changed
+2 -1
+2 -1
View File
@@ -381,8 +381,9 @@ void get_batt(uint8_t val[]) {
void get_time(uint8_t val[]) { void get_time(uint8_t val[]) {
ESP_LOGI(TAG, "Remote command: get time"); ESP_LOGI(TAG, "Remote command: get time");
time_t t = now();
payload.reset(); payload.reset();
payload.addTime(now()); payload.addTime(t);
payload.addByte(timeStatus() << 4 | timeSource); payload.addByte(timeStatus() << 4 | timeSource);
SendPayload(TIMEPORT); SendPayload(TIMEPORT);
}; };