v1.9.0 #175
@ -35,7 +35,6 @@ StarTrackerHandler::StarTrackerHandler(object_id_t objectId, object_id_t comIF,
|
|||||||
downloadBlobPixel(this),
|
downloadBlobPixel(this),
|
||||||
cameraSet(this),
|
cameraSet(this),
|
||||||
limitsSet(this),
|
limitsSet(this),
|
||||||
blobSet(this),
|
|
||||||
strHelper(strHelper) {
|
strHelper(strHelper) {
|
||||||
if (comCookie == nullptr) {
|
if (comCookie == nullptr) {
|
||||||
sif::error << "StarTrackerHandler: Invalid com cookie" << std::endl;
|
sif::error << "StarTrackerHandler: Invalid com cookie" << std::endl;
|
||||||
@ -515,10 +514,6 @@ ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t devi
|
|||||||
result = prepareRequestLimitsParams();
|
result = prepareRequestLimitsParams();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
case (StarTracker::REQ_BLOB_PARAMS): {
|
|
||||||
result = prepareRequestBlobParams();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
@ -561,6 +556,8 @@ void StarTrackerHandler::fillCommandAndReplyMap() {
|
|||||||
StarTracker::MAX_FRAME_SIZE * 2 + 2);
|
StarTracker::MAX_FRAME_SIZE * 2 + 2);
|
||||||
this->insertInCommandAndReplyMap(StarTracker::CAMERA, 3, nullptr,
|
this->insertInCommandAndReplyMap(StarTracker::CAMERA, 3, nullptr,
|
||||||
StarTracker::MAX_FRAME_SIZE * 2 + 2);
|
StarTracker::MAX_FRAME_SIZE * 2 + 2);
|
||||||
|
this->insertInCommandAndReplyMap(StarTracker::CAMERA, 3, nullptr,
|
||||||
|
StarTracker::MAX_FRAME_SIZE * 2 + 2);
|
||||||
this->insertInCommandAndReplyMap(StarTracker::CENTROIDING, 3, nullptr,
|
this->insertInCommandAndReplyMap(StarTracker::CENTROIDING, 3, nullptr,
|
||||||
StarTracker::MAX_FRAME_SIZE * 2 + 2);
|
StarTracker::MAX_FRAME_SIZE * 2 + 2);
|
||||||
this->insertInCommandAndReplyMap(StarTracker::LISA, 3, nullptr,
|
this->insertInCommandAndReplyMap(StarTracker::LISA, 3, nullptr,
|
||||||
@ -601,8 +598,6 @@ void StarTrackerHandler::fillCommandAndReplyMap() {
|
|||||||
StarTracker::MAX_FRAME_SIZE * 2 + 2);
|
StarTracker::MAX_FRAME_SIZE * 2 + 2);
|
||||||
this->insertInCommandAndReplyMap(StarTracker::REQ_LIMITS, 3, nullptr,
|
this->insertInCommandAndReplyMap(StarTracker::REQ_LIMITS, 3, nullptr,
|
||||||
StarTracker::MAX_FRAME_SIZE * 2 + 2);
|
StarTracker::MAX_FRAME_SIZE * 2 + 2);
|
||||||
this->insertInCommandAndReplyMap(StarTracker::REQ_BLOB_PARAMS, 3, nullptr,
|
|
||||||
StarTracker::MAX_FRAME_SIZE * 2 + 2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t remainingSize,
|
ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t remainingSize,
|
||||||
|
@ -350,109 +350,6 @@ ReturnValue_t Camera::createCommand(uint8_t* buffer) {
|
|||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
Blob::Blob() : ArcsecJsonParamBase(arcseckeys::BLOB) {}
|
|
||||||
|
|
||||||
size_t Blob::getSize() { return COMMAND_SIZE; }
|
|
||||||
|
|
||||||
ReturnValue_t Blob::createCommand(uint8_t* buffer) {
|
|
||||||
ReturnValue_t result = RETURN_OK;
|
|
||||||
uint8_t offset = 0;
|
|
||||||
std::string param;
|
|
||||||
addSetParamHeader(buffer, StarTracker::ID::BLOB);
|
|
||||||
offset = 2;
|
|
||||||
result = getParam(arcseckeys::MODE, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint8(param, buffer + offset);
|
|
||||||
offset += sizeof(uint8_t);
|
|
||||||
result = getParam(arcseckeys::MIN_VALUE, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint8(param, buffer + offset);
|
|
||||||
offset += sizeof(uint8_t);
|
|
||||||
result = getParam(arcseckeys::MIN_DISTANCE, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint8(param, buffer + offset);
|
|
||||||
offset += sizeof(uint8_t);
|
|
||||||
result = getParam(arcseckeys::NEIGHBOUR_DISTANCE, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint8(param, buffer + offset);
|
|
||||||
offset += sizeof(uint8_t);
|
|
||||||
result = getParam(arcseckeys::NEIGHBOUR_BRIGHT_PIXELS, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint8(param, buffer + offset);
|
|
||||||
offset += sizeof(uint8_t);
|
|
||||||
result = getParam(arcseckeys::MIN_TOTAL_VALUE, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint16(param, buffer + offset);
|
|
||||||
offset += sizeof(uint16_t);
|
|
||||||
result = getParam(arcseckeys::MAX_TOTAL_VALUE, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint16(param, buffer + offset);
|
|
||||||
offset += sizeof(uint16_t);
|
|
||||||
result = getParam(arcseckeys::MIN_BRIGHT_NEIGHBOURS, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint16(param, buffer + offset);
|
|
||||||
offset += sizeof(uint16_t);
|
|
||||||
result = getParam(arcseckeys::MAX_BRIGHT_NEIGHBOURS, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint16(param, buffer + offset);
|
|
||||||
offset += sizeof(uint16_t);
|
|
||||||
result = getParam(arcseckeys::MAX_PIXEL_TO_CONSIDER, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint32(param, buffer + offset);
|
|
||||||
offset += sizeof(uint32_t);
|
|
||||||
result = getParam(arcseckeys::SIGNAL_THRESHOLD, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint8(param, buffer + offset);
|
|
||||||
offset += sizeof(uint8_t);
|
|
||||||
result = getParam(arcseckeys::BLOB_DARK_THRESHOLD, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint8(param, buffer + offset);
|
|
||||||
offset += sizeof(uint8_t);
|
|
||||||
result = getParam(arcseckeys::ENABLE_HISTOGRAM, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint8(param, buffer + offset);
|
|
||||||
offset += sizeof(uint8_t);
|
|
||||||
result = getParam(arcseckeys::ENABLE_CONTRAST, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint8(param, buffer + offset);
|
|
||||||
offset += sizeof(uint8_t);
|
|
||||||
result = getParam(arcseckeys::BIN_MODE, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
adduint8(param, buffer + offset);
|
|
||||||
offset += sizeof(uint8_t);
|
|
||||||
return RETURN_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
Centroiding::Centroiding() : ArcsecJsonParamBase(arcseckeys::CENTROIDING) {}
|
Centroiding::Centroiding() : ArcsecJsonParamBase(arcseckeys::CENTROIDING) {}
|
||||||
|
|
||||||
size_t Centroiding::getSize() { return COMMAND_SIZE; }
|
size_t Centroiding::getSize() { return COMMAND_SIZE; }
|
||||||
|
@ -92,22 +92,6 @@ class Camera : public ArcsecJsonParamBase {
|
|||||||
ReturnValue_t createCommand(uint8_t* buffer) override;
|
ReturnValue_t createCommand(uint8_t* buffer) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Generates the command to configure the blob algorithm
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
class Blob : public ArcsecJsonParamBase {
|
|
||||||
public:
|
|
||||||
Blob();
|
|
||||||
|
|
||||||
size_t getSize();
|
|
||||||
|
|
||||||
private:
|
|
||||||
static const size_t COMMAND_SIZE = 24;
|
|
||||||
|
|
||||||
ReturnValue_t createCommand(uint8_t* buffer) override;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Generates the command to configure the centroiding algorithm
|
* @brief Generates the command to configure the centroiding algorithm
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user