add auto threshold config
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:
@ -916,3 +916,47 @@ ReturnValue_t DebugCamera::createCommand(uint8_t* buffer) {
|
||||
adduint32(param, buffer + offset);
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
AutoThreshold::AutoThreshold() : ArcsecJsonParamBase(arcseckeys::AUTO_THRESHOLD) {}
|
||||
|
||||
size_t AutoThreshold::getSize() { return COMMAND_SIZE; }
|
||||
|
||||
ReturnValue_t AutoThreshold::createCommand(uint8_t* buffer) {
|
||||
sif::debug << "creating auto threshold command" << std::endl;
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
uint8_t offset = 0;
|
||||
std::string param;
|
||||
addSetParamHeader(buffer, startracker::ID::LOG_SUBSCRIPTION);
|
||||
offset = 2;
|
||||
result = getParam(arcseckeys::AT_MODE, param);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
adduint8(param, buffer + offset);
|
||||
offset += 1;
|
||||
result = getParam(arcseckeys::AT_DESIRED_BLOB_COUNTS, param);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
adduint8(param, buffer + offset);
|
||||
offset += 1;
|
||||
result = getParam(arcseckeys::AT_MIN_THRESHOLD, param);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
adduint16(param, buffer + offset);
|
||||
offset += 2;
|
||||
result = getParam(arcseckeys::AT_MAX_THRESHOLD, param);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
adduint16(param, buffer + offset);
|
||||
offset += 2;
|
||||
result = getParam(arcseckeys::AT_THRESHOLD_KP, param);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
addfloat(param, buffer + offset);
|
||||
offset += 4;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user