str image helper, step failure handling

This commit is contained in:
Jakob Meier
2021-11-29 15:02:14 +01:00
parent 077913400f
commit 1affc1e1d3
4 changed files with 37 additions and 13 deletions

View File

@ -604,12 +604,13 @@ ReturnValue_t StarTrackerHandler::handleUploadImageReply() {
if (result != RETURN_OK) {
return result;
}
uint32_t position = deserializeUint32(decodedFrame + ACTION_DATA_OFFSET);
if (position != rememberUploadPosition) {
sif::warning << "StarTrackerHandler::handleUploadImageReply: Invalid position"
<< std::endl;
return UPLOAD_IMAGE_FAILED;
}
// Position seems to be always 0 (independent of sent position)
// uint32_t position = deserializeUint32(decodedFrame + ACTION_DATA_OFFSET);
// if (position != rememberUploadPosition) {
// sif::warning << "StarTrackerHandler::handleUploadImageReply: Invalid position"
// << std::endl;
// return UPLOAD_IMAGE_FAILED;
// }
return result;
}

View File

@ -90,7 +90,7 @@ private:
// position (uint32) + 1024 image data
static const size_t UPLOAD_COMMAND_LEN = 1028;
// Max valid position value in upload image command
static const uint16_t MAX_POSITION= 3071;
static const uint16_t MAX_POSITION= 4095;
static const uint8_t STATUS_OFFSET = 2;
static const uint8_t TICKS_OFFSET = 3;
static const uint8_t TIME_OFFSET = 7;