Update sagittactl to v10.7 #605

Merged
muellerr merged 9 commits from update_sagittactl_v10.7 into develop 2023-04-16 11:25:39 +02:00
3 changed files with 13 additions and 11 deletions
Showing only changes of commit 740275f57a - Show all commits

View File

@ -884,7 +884,7 @@ ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id,
switch (id) { switch (id) {
case (startracker::REQ_TIME): { case (startracker::REQ_TIME): {
result = handleTm(packet, timeSet, startracker::TimeSet::SIZE); result = handleTm(packet, timeSet, startracker::TimeSet::SIZE, "REQ_TIME");
break; break;
} }
case (startracker::PING_REQUEST): { case (startracker::PING_REQUEST): {
@ -899,7 +899,7 @@ ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id,
break; break;
} }
case (startracker::REQ_VERSION): { case (startracker::REQ_VERSION): {
result = handleTm(packet, versionSet, startracker::VersionSet::SIZE); result = handleTm(packet, versionSet, startracker::VersionSet::SIZE, "REQ_VERSION");
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return result; return result;
} }
@ -910,23 +910,23 @@ ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id,
break; break;
} }
case (startracker::REQ_INTERFACE): { case (startracker::REQ_INTERFACE): {
result = handleTm(packet, interfaceSet, startracker::InterfaceSet::SIZE); result = handleTm(packet, interfaceSet, startracker::InterfaceSet::SIZE, "REQ_INTERFACE");
break; break;
} }
case (startracker::REQ_POWER): { case (startracker::REQ_POWER): {
result = handleTm(packet, powerSet, startracker::PowerSet::SIZE); result = handleTm(packet, powerSet, startracker::PowerSet::SIZE, "REQ_POWER");
break; break;
} }
case (startracker::REQ_SOLUTION): { case (startracker::REQ_SOLUTION): {
result = handleTm(packet, solutionSet, startracker::SolutionSet::SIZE); result = handleTm(packet, solutionSet, startracker::SolutionSet::SIZE, "REQ_SOLUTION");
break; break;
} }
case (startracker::REQ_TEMPERATURE): { case (startracker::REQ_TEMPERATURE): {
result = handleTm(packet, temperatureSet, startracker::TemperatureSet::SIZE); result = handleTm(packet, temperatureSet, startracker::TemperatureSet::SIZE, "REQ_TEMP");
break; break;
} }
case (startracker::REQ_HISTOGRAM): { case (startracker::REQ_HISTOGRAM): {
result = handleTm(packet, histogramSet, startracker::HistogramSet::SIZE); result = handleTm(packet, histogramSet, startracker::HistogramSet::SIZE, "REQ_HISTO");
break; break;
} }
case (startracker::SUBSCRIPTION): case (startracker::SUBSCRIPTION):
@ -1976,7 +1976,7 @@ ReturnValue_t StarTrackerHandler::checkProgram() {
} }
ReturnValue_t StarTrackerHandler::handleTm(const uint8_t* rawFrame, LocalPoolDataSetBase& dataset, ReturnValue_t StarTrackerHandler::handleTm(const uint8_t* rawFrame, LocalPoolDataSetBase& dataset,
size_t size) { size_t size, const char* context) {
ReturnValue_t result = returnvalue::OK; ReturnValue_t result = returnvalue::OK;
uint8_t status = startracker::getStatusField(rawFrame); uint8_t status = startracker::getStatusField(rawFrame);
if (status != startracker::STATUS_OK) { if (status != startracker::STATUS_OK) {
@ -1992,7 +1992,8 @@ ReturnValue_t StarTrackerHandler::handleTm(const uint8_t* rawFrame, LocalPoolDat
dataset.setValidityBufferGeneration(false); dataset.setValidityBufferGeneration(false);
result = dataset.deSerialize(&reply, &size, SerializeIF::Endianness::LITTLE); result = dataset.deSerialize(&reply, &size, SerializeIF::Endianness::LITTLE);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
sif::warning << "StarTrackerHandler::handleTm: Deserialization failed" << std::endl; sif::warning << "StarTrackerHandler::handleTm: Deserialization failed for " << context
<< std::endl;
} }
dataset.setValidityBufferGeneration(true); dataset.setValidityBufferGeneration(true);
dataset.setValidity(true, true); dataset.setValidity(true, true);

View File

@ -481,7 +481,8 @@ class StarTrackerHandler : public DeviceHandlerBase {
* *
* @return returnvalue::OK if successful, otherwise error return value * @return returnvalue::OK if successful, otherwise error return value
*/ */
ReturnValue_t handleTm(const uint8_t* rawFrame, LocalPoolDataSetBase& dataset, size_t size); ReturnValue_t handleTm(const uint8_t* rawFrame, LocalPoolDataSetBase& dataset, size_t size,
const char* context);
/** /**
* @brief Checks if star tracker is in valid mode for executing the received command. * @brief Checks if star tracker is in valid mode for executing the received command.

View File

@ -641,7 +641,7 @@ class TimeSet : public StaticLocalDataSet<TIME_SET_ENTRIES> {
*/ */
class SolutionSet : public StaticLocalDataSet<SOLUTION_SET_ENTRIES> { class SolutionSet : public StaticLocalDataSet<SOLUTION_SET_ENTRIES> {
public: public:
static const size_t SIZE = 78; static const size_t SIZE = 79;
SolutionSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, SOLUTION_SET_ID) {} SolutionSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, SOLUTION_SET_ID) {}