move json init somewhere else
This commit is contained in:
@ -16,7 +16,8 @@ extern "C" {
|
||||
}
|
||||
|
||||
StarTrackerHandler::StarTrackerHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie,
|
||||
StrHelper* strHelper, power::Switch_t powerSwitch)
|
||||
const char* jsonFileStr, StrHelper* strHelper,
|
||||
power::Switch_t powerSwitch)
|
||||
: DeviceHandlerBase(objectId, comIF, comCookie),
|
||||
temperatureSet(this),
|
||||
versionSet(this),
|
||||
@ -41,6 +42,7 @@ StarTrackerHandler::StarTrackerHandler(object_id_t objectId, object_id_t comIF,
|
||||
logSubscriptionSet(this),
|
||||
debugCameraSet(this),
|
||||
strHelper(strHelper),
|
||||
paramJsonFile(jsonFileStr),
|
||||
powerSwitch(powerSwitch) {
|
||||
if (comCookie == nullptr) {
|
||||
sif::error << "StarTrackerHandler: Invalid com cookie" << std::endl;
|
||||
@ -60,6 +62,24 @@ ReturnValue_t StarTrackerHandler::initialize() {
|
||||
return result;
|
||||
}
|
||||
|
||||
// TODO: This takes ages. Move it into a separate thread, use a mutexed boolean
|
||||
// to check whether init was done. Or move it into the helper class..
|
||||
// Also move update of these classes into the helper class.
|
||||
tracking.init(paramJsonFile);
|
||||
logLevel.init(paramJsonFile);
|
||||
logSubscription.init(paramJsonFile);
|
||||
debugCamera.init(paramJsonFile);
|
||||
algo.init(paramJsonFile);
|
||||
validation.init(paramJsonFile);
|
||||
matching.init(paramJsonFile);
|
||||
lisa.init(paramJsonFile);
|
||||
centroiding.init(paramJsonFile);
|
||||
camera.init(paramJsonFile);
|
||||
imageProcessor.init(paramJsonFile);
|
||||
mounting.init(paramJsonFile);
|
||||
limits.init(paramJsonFile);
|
||||
subscription.init(paramJsonFile);
|
||||
|
||||
EventManagerIF* manager = ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER);
|
||||
if (manager == nullptr) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
|
Reference in New Issue
Block a user