STR time #611

Merged
muellerr merged 25 commits from str_set_time into main 2023-07-14 12:43:21 +02:00
2 changed files with 2 additions and 3 deletions
Showing only changes of commit 0e3980dc37 - Show all commits

View File

@ -466,11 +466,10 @@ ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t devi
return returnvalue::OK; return returnvalue::OK;
} }
case (startracker::SET_TIME_FROM_SYS_TIME): { case (startracker::SET_TIME_FROM_SYS_TIME): {
// Might be buggy, need more answers from arcsec...
SetTimeActionRequest setTimeRequest{}; SetTimeActionRequest setTimeRequest{};
timeval tv; timeval tv;
Clock::getClock(&tv); Clock::getClock(&tv);
setTimeRequest.unixTime = (tv.tv_sec * 1000000) + (tv.tv_usec); setTimeRequest.unixTime = (static_cast<uint64_t>(tv.tv_sec) * 1000 * 1000) + (static_cast<uint64_t>(tv.tv_usec));
arc_pack_settime_action_req(&setTimeRequest, commandBuffer, &rawPacketLen); arc_pack_settime_action_req(&setTimeRequest, commandBuffer, &rawPacketLen);
size_t serLen = 0; size_t serLen = 0;
// Time in milliseconds. Manual serialization because arcsec API ignores endianness. // Time in milliseconds. Manual serialization because arcsec API ignores endianness.

2
tmtc

@ -1 +1 @@
Subproject commit 1f2f2aac13b0b32c22f0a75e557743ad32f7dc70 Subproject commit 62bd5356220bab1ce9f3ddaa7aaf75963b8bd596