diff --git a/_bin/linux/debug/fsfw-example-linux.elf b/_bin/linux/debug/fsfw-example-linux.elf index 76e93d9..86183cd 100755 Binary files a/_bin/linux/debug/fsfw-example-linux.elf and b/_bin/linux/debug/fsfw-example-linux.elf differ diff --git a/_obj/linux/debug/bsp_linux/core/InitMission.o b/_obj/linux/debug/bsp_linux/core/InitMission.o index 2a57db5..81ea0ae 100644 Binary files a/_obj/linux/debug/bsp_linux/core/InitMission.o and b/_obj/linux/debug/bsp_linux/core/InitMission.o differ diff --git a/_obj/linux/debug/mission/DeviceHandler/ArduinoDeviceHandler.o b/_obj/linux/debug/mission/DeviceHandler/ArduinoDeviceHandler.o index b548819..173b154 100644 Binary files a/_obj/linux/debug/mission/DeviceHandler/ArduinoDeviceHandler.o and b/_obj/linux/debug/mission/DeviceHandler/ArduinoDeviceHandler.o differ diff --git a/bsp_linux/core/InitMission.cpp b/bsp_linux/core/InitMission.cpp index 8a5f840..f2284e9 100644 --- a/bsp_linux/core/InitMission.cpp +++ b/bsp_linux/core/InitMission.cpp @@ -109,9 +109,13 @@ void InitMission::createTasks(){ sif::error << "Object add component failed" << std::endl; } + /* Time period set experimentally. + * It should be set an optimal period of execution for both + * the device handler and the arduino operations. + */ FixedTimeslotTaskIF* arduinoTask = TaskFactory::instance()-> createFixedTimeslotTask("ARDUINO_TASK",40, - PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8/*6.4*/, nullptr); + PeriodicTaskIF::MINIMUM_STACK_SIZE, 2, nullptr); result = pollingSequenceArduinoFunction(arduinoTask); if(result != HasReturnvaluesIF::RETURN_OK) { sif::error << "InitMission::createTasks:ArduinoPST initialization failed!" @@ -151,7 +155,7 @@ void InitMission::createTasks(){ //Main thread sleep sif::debug << "Starting Tasks in 2 seconds" << std::endl; - TaskFactory::delayTask(2400); + TaskFactory::delayTask(2000); distributerTask->startTask(); udpBridgeTask->startTask(); udpPollingTask->startTask(); diff --git a/bsp_linux/fsfwconfig/datapool/dataPoolInit.cpp b/bsp_linux/fsfwconfig/datapool/dataPoolInit.cpp index 8d0688b..78b4d47 100644 --- a/bsp_linux/fsfwconfig/datapool/dataPoolInit.cpp +++ b/bsp_linux/fsfwconfig/datapool/dataPoolInit.cpp @@ -1,9 +1,7 @@ /* -* dataPoolInit.cpp +* dataPoolInit.cpp * -* brief: Initialisation function for all variables in the data pool. -* This file was auto-generated by getDataPoolFromFLPmib.py via -* the flpmib database at 2018-06-04T12:02:46+00:00. +* brief: Initialization function for all variables in the data pool. */ #include "../../../bsp_linux/fsfwconfig/datapool/dataPoolInit.h" diff --git a/bsp_linux/fsfwconfig/datapool/dataPoolInit.h b/bsp_linux/fsfwconfig/datapool/dataPoolInit.h index a8ea7d8..58397c6 100644 --- a/bsp_linux/fsfwconfig/datapool/dataPoolInit.h +++ b/bsp_linux/fsfwconfig/datapool/dataPoolInit.h @@ -1,7 +1,7 @@ /* -* dataPoolInit.h +* dataPoolInit.h * -* brief: Initialization function for all variables in the data pool. +* brief: Initialization function for all variables in the data pool. */ #ifndef DATAPOOLINIT_H_ #define DATAPOOLINIT_H_ diff --git a/bsp_linux/fsfwconfig/events/subsystemIdRanges.h b/bsp_linux/fsfwconfig/events/subsystemIdRanges.h index 01fc668..9bc42d5 100644 --- a/bsp_linux/fsfwconfig/events/subsystemIdRanges.h +++ b/bsp_linux/fsfwconfig/events/subsystemIdRanges.h @@ -1,5 +1,5 @@ /* - * subsystemIdRanges.h + * subsystemIdRanges.h * * Created on: Jul 27, 2018 * Author: gaisser @@ -11,7 +11,6 @@ namespace SUBSYSTEM_ID { enum { DUMMY = 10, - // Here I add the ID of Arduino for TCS and eventual useful events. ARDUINO_TCS = 11, }; diff --git a/bsp_linux/fsfwconfig/objects/systemObjectList.h b/bsp_linux/fsfwconfig/objects/systemObjectList.h index 5e5f143..76be7e2 100644 --- a/bsp_linux/fsfwconfig/objects/systemObjectList.h +++ b/bsp_linux/fsfwconfig/objects/systemObjectList.h @@ -38,7 +38,7 @@ enum mission_objects { CCSDS_DISTRIBUTOR = 0x10, PUS_DISTRIBUTOR = 0x11, - //Here the IDs of the DH and CONTROLLER + //Here the IDs of the DH and CONTROLLER are defined. ARDUINO_DEVICE_HANDLER = 0x12, ARDUINO_COM_IF = 0x13, diff --git a/bsp_linux/fsfwconfig/pollingsequence/PollingSequenceArduino.h b/bsp_linux/fsfwconfig/pollingsequence/PollingSequenceArduino.h index 5c9167d..f88174b 100644 --- a/bsp_linux/fsfwconfig/pollingsequence/PollingSequenceArduino.h +++ b/bsp_linux/fsfwconfig/pollingsequence/PollingSequenceArduino.h @@ -17,6 +17,4 @@ ReturnValue_t pollingSequenceArduinoFunction(FixedTimeslotTaskIF *thisSequence); ReturnValue_t pollingSequenceControllerFunction(FixedTimeslotTaskIF *thisSequence); - - #endif /* BSP_LINUX_FSFWCONFIG_POLLINGSEQUENCE_POLLINGSEQUENCEARDUINO_H_ */ diff --git a/bsp_linux/fsfwconfig/pollingsequence/pollingSequenceControllerFunction.cpp b/bsp_linux/fsfwconfig/pollingsequence/pollingSequenceControllerFunction.cpp index b16655c..405eaca 100644 --- a/bsp_linux/fsfwconfig/pollingsequence/pollingSequenceControllerFunction.cpp +++ b/bsp_linux/fsfwconfig/pollingsequence/pollingSequenceControllerFunction.cpp @@ -18,9 +18,6 @@ ReturnValue_t pollingSequenceControllerFunction( uint32_t length = thisSequence->getPeriodMs(); thisSequence->addSlot(objects::THERMAL_CONTROLLER, length * 1, 0); - //thisSequence->addSlot(objects::THERMAL_CONTROLLER, length * 0.2, 1); - //thisSequence->addSlot(objects::THERMAL_CONTROLLER, length * 0.4, 2); - //thisSequence->addSlot(objects::THERMAL_CONTROLLER, length * 0.6, 3); if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) { return HasReturnvaluesIF::RETURN_OK; diff --git a/mission/DeviceHandler/ArduinoDeviceHandler.cpp b/mission/DeviceHandler/ArduinoDeviceHandler.cpp index d98461f..c90c48f 100644 --- a/mission/DeviceHandler/ArduinoDeviceHandler.cpp +++ b/mission/DeviceHandler/ArduinoDeviceHandler.cpp @@ -86,9 +86,9 @@ ReturnValue_t ArduinoDH::interpretDeviceReply(DeviceCommandId_t id, * The data of temperature, environment and orientation are then stored in three separated vectors. * These vectors will be then saved in the framework datapool in order to be used by the controller. */ - printf( + /*printf( "\n***********************************************************************************************\n"); - printf("TEMPERATURE parameters are: "); + printf("TEMPERATURE parameters are: ");*/ for (int i = 0; i < 36; i++) { memcpy(&Temp_ch.start_string, &packet[27 * i + 0], 8); memcpy(&Temp_ch.Typ, &packet[27 * i + 8], 1); @@ -118,7 +118,7 @@ ReturnValue_t ArduinoDH::interpretDeviceReply(DeviceCommandId_t id, * Anyway they are available and they can be used if necessary. */ - /*printf( + printf( "\n\n***********************************************************************************************\n"); printf("ENVIRONMENTAL parameters are: "); for (int j = 0; j < 9; j++) {