some adaptions to new firmware
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
parent
e56c538518
commit
6be7cb4d0c
@ -149,6 +149,8 @@ void ObjectFactory::produce(void* args) {
|
|||||||
#if OBSW_DEBUG_IMTQ == 1
|
#if OBSW_DEBUG_IMTQ == 1
|
||||||
imtqHandler->setToGoToNormal(true);
|
imtqHandler->setToGoToNormal(true);
|
||||||
imtqHandler->setStartUpImmediately();
|
imtqHandler->setStartUpImmediately();
|
||||||
|
#else
|
||||||
|
(void) imtqHandler;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
createReactionWheelComponents(gpioComIF);
|
createReactionWheelComponents(gpioComIF);
|
||||||
|
@ -53,7 +53,6 @@ static const char VAL_7[] = "val7";
|
|||||||
static const char REG_8[] = "reg8";
|
static const char REG_8[] = "reg8";
|
||||||
static const char VAL_8[] = "val8";
|
static const char VAL_8[] = "val8";
|
||||||
static const char FREQ_1[] = "freq1";
|
static const char FREQ_1[] = "freq1";
|
||||||
static const char FREQ_2[] = "freq2";
|
|
||||||
|
|
||||||
static const char BLOB[] = "blob";
|
static const char BLOB[] = "blob";
|
||||||
static const char MIN_VALUE[] = "minValue";
|
static const char MIN_VALUE[] = "minValue";
|
||||||
@ -66,7 +65,7 @@ static const char MIN_BRIGHT_NEIGHBOURS[] = "minBrightNeighbours";
|
|||||||
static const char MAX_BRIGHT_NEIGHBOURS[] = "maxBrightNeighbours";
|
static const char MAX_BRIGHT_NEIGHBOURS[] = "maxBrightNeighbours";
|
||||||
static const char MAX_PIXEL_TO_CONSIDER[] = "maxPixelsToConsider";
|
static const char MAX_PIXEL_TO_CONSIDER[] = "maxPixelsToConsider";
|
||||||
static const char SIGNAL_THRESHOLD[] = "signalThreshold";
|
static const char SIGNAL_THRESHOLD[] = "signalThreshold";
|
||||||
static const char DARK_THRESHOLD[] = "darkThreshold";
|
static const char BLOB_DARK_THRESHOLD[] = "darkThreshold";
|
||||||
static const char ENABLE_HISTOGRAM[] = "enableHistogram";
|
static const char ENABLE_HISTOGRAM[] = "enableHistogram";
|
||||||
static const char ENABLE_CONTRAST[] = "enableContrast";
|
static const char ENABLE_CONTRAST[] = "enableContrast";
|
||||||
static const char BIN_MODE[] = "binMode";
|
static const char BIN_MODE[] = "binMode";
|
||||||
@ -74,6 +73,7 @@ static const char BIN_MODE[] = "binMode";
|
|||||||
static const char CENTROIDING[] = "centroiding";
|
static const char CENTROIDING[] = "centroiding";
|
||||||
static const char ENABLE_FILTER[] = "enableFilter";
|
static const char ENABLE_FILTER[] = "enableFilter";
|
||||||
static const char MAX_QUALITY[] = "maxquality";
|
static const char MAX_QUALITY[] = "maxquality";
|
||||||
|
static const char DARK_THRESHOLD[] = "darkthreshold";
|
||||||
static const char MIN_QUALITY[] = "minquality";
|
static const char MIN_QUALITY[] = "minquality";
|
||||||
static const char MAX_INTENSITY[] = "maxintensity";
|
static const char MAX_INTENSITY[] = "maxintensity";
|
||||||
static const char MIN_INTENSITY[] = "minintensity";
|
static const char MIN_INTENSITY[] = "minintensity";
|
||||||
@ -86,6 +86,7 @@ static const char TRANSMATRIX_10[] = "transmatrix10";
|
|||||||
static const char TRANSMATRIX_11[] = "transmatrix11";
|
static const char TRANSMATRIX_11[] = "transmatrix11";
|
||||||
|
|
||||||
static const char LISA[] = "lisa";
|
static const char LISA[] = "lisa";
|
||||||
|
static const char LISA_MODE[] = "mode";
|
||||||
static const char PREFILTER_DIST_THRESHOLD[] = "prefilterDistThreshold";
|
static const char PREFILTER_DIST_THRESHOLD[] = "prefilterDistThreshold";
|
||||||
static const char PREFILTER_ANGLE_THRESHOLD[] = "prefilterAngleThreshold";
|
static const char PREFILTER_ANGLE_THRESHOLD[] = "prefilterAngleThreshold";
|
||||||
static const char FOV_WIDTH[] = "fov_width";
|
static const char FOV_WIDTH[] = "fov_width";
|
||||||
|
@ -8,9 +8,15 @@ ReturnValue_t ArcsecJsonParamBase::create(std::string fullname, uint8_t* buffer)
|
|||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = RETURN_OK;
|
||||||
result = init(fullname);
|
result = init(fullname);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
|
sif::warning << "ArcsecJsonParamBase::create: Failed to init parameter command for set "
|
||||||
|
<< setName << std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = createCommand(buffer);
|
result = createCommand(buffer);
|
||||||
|
if (result != RETURN_OK) {
|
||||||
|
sif::warning << "ArcsecJsonParamBase::create: Failed to create parameter command for set "
|
||||||
|
<< setName << std::endl;
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -321,11 +321,11 @@ ReturnValue_t StarTrackerHandler::buildTransitionDeviceCommand(DeviceCommandId_t
|
|||||||
*id = StarTracker::CAMERA;
|
*id = StarTracker::CAMERA;
|
||||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||||
paramJsonFile.size());
|
paramJsonFile.size());
|
||||||
case StartupState::BLOB:
|
// case StartupState::BLOB:
|
||||||
startupState = StartupState::WAIT_FOR_EXECUTION;
|
// startupState = StartupState::WAIT_FOR_EXECUTION;
|
||||||
*id = StarTracker::BLOB;
|
// *id = StarTracker::BLOB;
|
||||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
// return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||||
paramJsonFile.size());
|
// paramJsonFile.size());
|
||||||
case StartupState::CENTROIDING:
|
case StartupState::CENTROIDING:
|
||||||
startupState = StartupState::WAIT_FOR_EXECUTION;
|
startupState = StartupState::WAIT_FOR_EXECUTION;
|
||||||
*id = StarTracker::CENTROIDING;
|
*id = StarTracker::CENTROIDING;
|
||||||
@ -785,7 +785,7 @@ ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id,
|
|||||||
|
|
||||||
void StarTrackerHandler::setNormalDatapoolEntriesInvalid() {}
|
void StarTrackerHandler::setNormalDatapoolEntriesInvalid() {}
|
||||||
|
|
||||||
uint32_t StarTrackerHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 20000; }
|
uint32_t StarTrackerHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 30000; }
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
LocalDataPoolManager& poolManager) {
|
LocalDataPoolManager& poolManager) {
|
||||||
@ -2069,7 +2069,8 @@ void StarTrackerHandler::handleStartup(const uint8_t* parameterId) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (StarTracker::ID::CAMERA): {
|
case (StarTracker::ID::CAMERA): {
|
||||||
startupState = StartupState::BLOB;
|
// startupState = StartupState::BLOB;
|
||||||
|
startupState = StartupState::CENTROIDING;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (StarTracker::ID::BLOB): {
|
case (StarTracker::ID::BLOB): {
|
||||||
|
@ -304,13 +304,7 @@ ReturnValue_t Camera::createCommand(uint8_t* buffer) {
|
|||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
addfloat(param, buffer + offset);
|
adduint32(param, buffer + offset);
|
||||||
offset += sizeof(float);
|
|
||||||
result = getParam(arcseckeys::FREQ_2, param);
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
addfloat(param, buffer + offset);
|
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -390,7 +384,7 @@ ReturnValue_t Blob::createCommand(uint8_t* buffer) {
|
|||||||
}
|
}
|
||||||
adduint8(param, buffer + offset);
|
adduint8(param, buffer + offset);
|
||||||
offset += sizeof(uint8_t);
|
offset += sizeof(uint8_t);
|
||||||
result = getParam(arcseckeys::DARK_THRESHOLD, param);
|
result = getParam(arcseckeys::BLOB_DARK_THRESHOLD, param);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -439,6 +433,12 @@ ReturnValue_t Centroiding::createCommand(uint8_t* buffer) {
|
|||||||
}
|
}
|
||||||
addfloat(param, buffer + offset);
|
addfloat(param, buffer + offset);
|
||||||
offset += sizeof(float);
|
offset += sizeof(float);
|
||||||
|
result = getParam(arcseckeys::DARK_THRESHOLD, param);
|
||||||
|
if (result != RETURN_OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
addfloat(param, buffer + offset);
|
||||||
|
offset += sizeof(float);
|
||||||
result = getParam(arcseckeys::MIN_QUALITY, param);
|
result = getParam(arcseckeys::MIN_QUALITY, param);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
return result;
|
return result;
|
||||||
@ -511,6 +511,12 @@ ReturnValue_t Lisa::createCommand(uint8_t* buffer) {
|
|||||||
std::string param;
|
std::string param;
|
||||||
addSetParamHeader(buffer, StarTracker::ID::LISA);
|
addSetParamHeader(buffer, StarTracker::ID::LISA);
|
||||||
offset = 2;
|
offset = 2;
|
||||||
|
result = getParam(arcseckeys::LISA_MODE, param);
|
||||||
|
if (result != RETURN_OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
adduint32(param, buffer + offset);
|
||||||
|
offset += sizeof(uint32_t);
|
||||||
result = getParam(arcseckeys::PREFILTER_DIST_THRESHOLD, param);
|
result = getParam(arcseckeys::PREFILTER_DIST_THRESHOLD, param);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
return result;
|
return result;
|
||||||
|
@ -71,7 +71,7 @@ class Camera : public ArcsecJsonParamBase {
|
|||||||
size_t getSize();
|
size_t getSize();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const size_t COMMAND_SIZE = 43;
|
static const size_t COMMAND_SIZE = 39;
|
||||||
|
|
||||||
ReturnValue_t createCommand(uint8_t* buffer) override;
|
ReturnValue_t createCommand(uint8_t* buffer) override;
|
||||||
};
|
};
|
||||||
@ -103,7 +103,7 @@ class Centroiding : public ArcsecJsonParamBase {
|
|||||||
size_t getSize();
|
size_t getSize();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const size_t COMMAND_SIZE = 47;
|
static const size_t COMMAND_SIZE = 51;
|
||||||
|
|
||||||
ReturnValue_t createCommand(uint8_t* buffer) override;
|
ReturnValue_t createCommand(uint8_t* buffer) override;
|
||||||
};
|
};
|
||||||
@ -119,7 +119,7 @@ class Lisa : public ArcsecJsonParamBase {
|
|||||||
size_t getSize();
|
size_t getSize();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const size_t COMMAND_SIZE = 48;
|
static const size_t COMMAND_SIZE = 52;
|
||||||
|
|
||||||
ReturnValue_t createCommand(uint8_t* buffer) override;
|
ReturnValue_t createCommand(uint8_t* buffer) override;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user