Fixed some errors in the controller related to the temperature sensor component.
This commit is contained in:
@ -115,7 +115,7 @@ void InitMission::createTasks(){
|
||||
*/
|
||||
FixedTimeslotTaskIF* arduinoTask = TaskFactory::instance()->
|
||||
createFixedTimeslotTask("ARDUINO_TASK",40,
|
||||
PeriodicTaskIF::MINIMUM_STACK_SIZE, 2, nullptr);
|
||||
PeriodicTaskIF::MINIMUM_STACK_SIZE, 3.2, nullptr);
|
||||
result = pollingSequenceArduinoFunction(arduinoTask);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::error << "InitMission::createTasks:ArduinoPST initialization failed!"
|
||||
@ -124,7 +124,7 @@ void InitMission::createTasks(){
|
||||
|
||||
PeriodicTaskIF* controllerTask = TaskFactory::instance()->
|
||||
createPeriodicTask("CONTROLLER_TASK",40,
|
||||
PeriodicTaskIF::MINIMUM_STACK_SIZE, 2, nullptr);
|
||||
PeriodicTaskIF::MINIMUM_STACK_SIZE, 3.2, nullptr);
|
||||
//result = pollingSequenceControllerFunction(controllerTask);
|
||||
result = controllerTask->addComponent(objects::THERMAL_CONTROLLER);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
@ -161,7 +161,8 @@ void InitMission::createTasks(){
|
||||
udpPollingTask->startTask();
|
||||
//serializeTask->startTask();
|
||||
arduinoTask->startTask();
|
||||
//controllerTask->startTask();
|
||||
TaskFactory::delayTask(6400);
|
||||
controllerTask->startTask();
|
||||
|
||||
//payloadTask->startTask();
|
||||
eventTask->startTask();
|
||||
|
@ -16,14 +16,20 @@ void dataPoolInit(std::map<uint32_t, PoolEntryIF*>* pool_map) {
|
||||
pool_map->insert(
|
||||
std::pair<uint32_t, PoolEntryIF*>(datapool::Temperature_Timestamp,
|
||||
new PoolEntry<unsigned int>(Temperature_Timestamp, 36)));
|
||||
float TEMP_SENSOR_CH1[1] = {0};
|
||||
|
||||
uint8_t TempValidity_SENSOR_CH1[1] = {0};
|
||||
pool_map->insert(
|
||||
std::pair<uint32_t, PoolEntryIF*>(datapool::TEMP_SENSOR_CH1,
|
||||
new PoolEntry<float>(TEMP_SENSOR_CH1, 1)));
|
||||
float TEMP_SENSOR_CH2[1] = {0};
|
||||
std::pair<uint32_t, PoolEntryIF*>(datapool::TempValidity_SENSOR_CH1,
|
||||
new PoolEntry<uint8_t>(TempValidity_SENSOR_CH1, 1)));
|
||||
uint8_t TempValidity_SENSOR_CH2[1] = {0};
|
||||
pool_map->insert(
|
||||
std::pair<uint32_t, PoolEntryIF*>(datapool::TEMP_SENSOR_CH2,
|
||||
new PoolEntry<float>(TEMP_SENSOR_CH2, 1)));
|
||||
std::pair<uint32_t, PoolEntryIF*>(datapool::TempValidity_SENSOR_CH2,
|
||||
new PoolEntry<uint8_t>(TempValidity_SENSOR_CH2, 1)));
|
||||
|
||||
float Temperature_COMPONENT_1[1] = {0};
|
||||
pool_map->insert(
|
||||
std::pair<uint32_t, PoolEntryIF*>(datapool::Temperature_COMPONENT_1,
|
||||
new PoolEntry<float>(Temperature_COMPONENT_1, 1)));
|
||||
int8_t TargetState_COMPONENT_1[1] = {0};
|
||||
pool_map->insert(
|
||||
std::pair<uint32_t, PoolEntryIF*>(datapool::TargetState_COMPONENT_1,
|
||||
@ -36,6 +42,10 @@ void dataPoolInit(std::map<uint32_t, PoolEntryIF*>* pool_map) {
|
||||
pool_map->insert(
|
||||
std::pair<uint32_t, PoolEntryIF*>(datapool::HeaterRequest_COMPONENT_1,
|
||||
new PoolEntry<uint8_t>(HeaterRequest_COMPONENT_1, 1)));
|
||||
float Temperature_COMPONENT_2[1] = {0};
|
||||
pool_map->insert(
|
||||
std::pair<uint32_t, PoolEntryIF*>(datapool::Temperature_COMPONENT_2,
|
||||
new PoolEntry<float>(Temperature_COMPONENT_2, 1)));
|
||||
int8_t TargetState_COMPONENT_2[1] = {0};
|
||||
pool_map->insert(
|
||||
std::pair<uint32_t, PoolEntryIF*>(datapool::TargetState_COMPONENT_2,
|
||||
|
@ -14,15 +14,19 @@ namespace datapool {
|
||||
// The IDs of the variables of the DH and CONTROLLER are here defined.
|
||||
Temperature_value = 0x100001,
|
||||
Temperature_Timestamp = 0x100002,
|
||||
TEMP_SENSOR_CH1 = 0x10003,
|
||||
TEMP_SENSOR_CH2 = 0x10004,
|
||||
TargetState_COMPONENT_1 = 0x10005,
|
||||
CurrentState_COMPONENT_1 = 0x100006,
|
||||
HeaterRequest_COMPONENT_1 = 0x100007,
|
||||
TargetState_COMPONENT_2 = 0x100008,
|
||||
CurrentState_COMPONENT_2 = 0x100009,
|
||||
HeaterRequest_COMPONENT_2 = 0x100010
|
||||
|
||||
TempValidity_SENSOR_CH1 = 0x10003,
|
||||
TempValidity_SENSOR_CH2 = 0x10004,
|
||||
|
||||
Temperature_COMPONENT_1 = 0x10005,
|
||||
TargetState_COMPONENT_1 = 0x10006,
|
||||
CurrentState_COMPONENT_1 = 0x100007,
|
||||
HeaterRequest_COMPONENT_1 = 0x100008,
|
||||
Temperature_COMPONENT_2 = 0x10009,
|
||||
TargetState_COMPONENT_2 = 0x100010,
|
||||
CurrentState_COMPONENT_2 = 0x100011,
|
||||
HeaterRequest_COMPONENT_2 = 0x100012
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user