Some minor documentation of the code.
This commit is contained in:
parent
c70fed0aa9
commit
58a3cd34ed
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -109,9 +109,13 @@ void InitMission::createTasks(){
|
|||||||
sif::error << "Object add component failed" << std::endl;
|
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()->
|
FixedTimeslotTaskIF* arduinoTask = TaskFactory::instance()->
|
||||||
createFixedTimeslotTask("ARDUINO_TASK",40,
|
createFixedTimeslotTask("ARDUINO_TASK",40,
|
||||||
PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8/*6.4*/, nullptr);
|
PeriodicTaskIF::MINIMUM_STACK_SIZE, 2, nullptr);
|
||||||
result = pollingSequenceArduinoFunction(arduinoTask);
|
result = pollingSequenceArduinoFunction(arduinoTask);
|
||||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
sif::error << "InitMission::createTasks:ArduinoPST initialization failed!"
|
sif::error << "InitMission::createTasks:ArduinoPST initialization failed!"
|
||||||
@ -151,7 +155,7 @@ void InitMission::createTasks(){
|
|||||||
|
|
||||||
//Main thread sleep
|
//Main thread sleep
|
||||||
sif::debug << "Starting Tasks in 2 seconds" << std::endl;
|
sif::debug << "Starting Tasks in 2 seconds" << std::endl;
|
||||||
TaskFactory::delayTask(2400);
|
TaskFactory::delayTask(2000);
|
||||||
distributerTask->startTask();
|
distributerTask->startTask();
|
||||||
udpBridgeTask->startTask();
|
udpBridgeTask->startTask();
|
||||||
udpPollingTask->startTask();
|
udpPollingTask->startTask();
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* dataPoolInit.cpp
|
* dataPoolInit.cpp
|
||||||
*
|
*
|
||||||
* brief: Initialisation function for all variables in the data pool.
|
* brief: Initialization 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.
|
|
||||||
*/
|
*/
|
||||||
#include "../../../bsp_linux/fsfwconfig/datapool/dataPoolInit.h"
|
#include "../../../bsp_linux/fsfwconfig/datapool/dataPoolInit.h"
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
namespace SUBSYSTEM_ID {
|
namespace SUBSYSTEM_ID {
|
||||||
enum {
|
enum {
|
||||||
DUMMY = 10,
|
DUMMY = 10,
|
||||||
|
|
||||||
// Here I add the ID of Arduino for TCS and eventual useful events.
|
// Here I add the ID of Arduino for TCS and eventual useful events.
|
||||||
ARDUINO_TCS = 11,
|
ARDUINO_TCS = 11,
|
||||||
};
|
};
|
||||||
|
@ -38,7 +38,7 @@ enum mission_objects {
|
|||||||
CCSDS_DISTRIBUTOR = 0x10,
|
CCSDS_DISTRIBUTOR = 0x10,
|
||||||
PUS_DISTRIBUTOR = 0x11,
|
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_DEVICE_HANDLER = 0x12,
|
||||||
ARDUINO_COM_IF = 0x13,
|
ARDUINO_COM_IF = 0x13,
|
||||||
|
@ -17,6 +17,4 @@ ReturnValue_t pollingSequenceArduinoFunction(FixedTimeslotTaskIF *thisSequence);
|
|||||||
ReturnValue_t pollingSequenceControllerFunction(FixedTimeslotTaskIF *thisSequence);
|
ReturnValue_t pollingSequenceControllerFunction(FixedTimeslotTaskIF *thisSequence);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* BSP_LINUX_FSFWCONFIG_POLLINGSEQUENCE_POLLINGSEQUENCEARDUINO_H_ */
|
#endif /* BSP_LINUX_FSFWCONFIG_POLLINGSEQUENCE_POLLINGSEQUENCEARDUINO_H_ */
|
||||||
|
@ -18,9 +18,6 @@ ReturnValue_t pollingSequenceControllerFunction(
|
|||||||
uint32_t length = thisSequence->getPeriodMs();
|
uint32_t length = thisSequence->getPeriodMs();
|
||||||
|
|
||||||
thisSequence->addSlot(objects::THERMAL_CONTROLLER, length * 1, 0);
|
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) {
|
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
@ -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.
|
* 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.
|
* These vectors will be then saved in the framework datapool in order to be used by the controller.
|
||||||
*/
|
*/
|
||||||
printf(
|
/*printf(
|
||||||
"\n***********************************************************************************************\n");
|
"\n***********************************************************************************************\n");
|
||||||
printf("TEMPERATURE parameters are: ");
|
printf("TEMPERATURE parameters are: ");*/
|
||||||
for (int i = 0; i < 36; i++) {
|
for (int i = 0; i < 36; i++) {
|
||||||
memcpy(&Temp_ch.start_string, &packet[27 * i + 0], 8);
|
memcpy(&Temp_ch.start_string, &packet[27 * i + 0], 8);
|
||||||
memcpy(&Temp_ch.Typ, &packet[27 * i + 8], 1);
|
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.
|
* Anyway they are available and they can be used if necessary.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*printf(
|
printf(
|
||||||
"\n\n***********************************************************************************************\n");
|
"\n\n***********************************************************************************************\n");
|
||||||
printf("ENVIRONMENTAL parameters are: ");
|
printf("ENVIRONMENTAL parameters are: ");
|
||||||
for (int j = 0; j < 9; j++) {
|
for (int j = 0; j < 9; j++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user