aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-05-10 12:00:21 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-05-10 12:00:21 +0300
commit39bb4d802486e86cf534a18e781b267b048c293f (patch)
tree2aff5194251bb2bbfb12e8a4022307715e3b56af /Software/Embedded_SW/Embedded
parent30b9452d7d554b26ac78746cf6ad0a290b0a4ed3 (diff)
downloadTango-39bb4d802486e86cf534a18e781b267b048c293f.tar.gz
Tango-39bb4d802486e86cf534a18e781b267b048c293f.zip
File system errors reporting, alarm handling task resilience.
Diffstat (limited to 'Software/Embedded_SW/Embedded')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c2
-rw-r--r--Software/Embedded_SW/Embedded/Common/Utilities/Utils.c2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c11
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c17
4 files changed, 18 insertions, 14 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
index 1cf86c705..4acfe8d4c 100644
--- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
+++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
@@ -188,7 +188,7 @@ uint32_t FileChunkUploadRequestFunc(MessageContainer* requestContainer)
status = ERROR_CODE__FILE_NOT_FOUND;
}*/
- responseContainer = createContainer(MESSAGE_TYPE__FileChunkUploadResponse, requestContainer->token, false, &response, &file_chunk_upload_response__pack, &file_chunk_upload_response__get_packed_size);
+ responseContainer = createContainer(MESSAGE_TYPE__FileChunkUploadResponse, requestContainer->token, FileDone, &response, &file_chunk_upload_response__pack, &file_chunk_upload_response__get_packed_size);
if (Fresult!= OK)
{
responseContainer.error = getErrorCode(Fresult);
diff --git a/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c b/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c
index 078aa5f53..341a43704 100644
--- a/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c
+++ b/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c
@@ -43,7 +43,7 @@ void *my_malloc(size_t _size)
malloc_time[malloc_index] = msec_millisecondCounter;
}
*/
- if (addr)
+ if ((addr)&&(_size>400))
{
malloc_addr[malloc_index] = addr;
malloc_size[malloc_index] = _size;
diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
index 37db3f84c..931b6674f 100644
--- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
+++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
@@ -671,14 +671,15 @@ uint32_t AlarmHandling_ControlTrigger(uint32_t IfIndex, uint32_t ReadValue)
}
void AlarmHandlingSetAlarm(uint32_t AlarmId, bool value)
{
- AlarmHandlingMessageStruc Message;
+ AlarmHandlingInternalSetAlarm( AlarmId, value);
+ /*AlarmHandlingMessageStruc Message;
//send message to the Millisec task
Message.messageId = AlarmHandlingAlarm;
Message.AlarmId = AlarmId;
Message.Value = value;
if (AlarmHandlingMsgQ != NULL)
- Mailbox_post(AlarmHandlingMsgQ , &Message, BIOS_NO_WAIT);
+ Mailbox_post(AlarmHandlingMsgQ , &Message, BIOS_NO_WAIT);*/
}
void AlarmHandlingInternalSetAlarm(uint32_t AlarmId, bool value)
{
@@ -702,7 +703,7 @@ void AlarmHandlingInternalSetAlarm(uint32_t AlarmId, bool value)
AlarmState[Alarm_i].EventPtr->message = AlarmItem[Alarm_i].EventName;
AlarmState[Alarm_i].Status = value;
}
- Report("Alarm ON ", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, RpMessage, value, Alarm_i);
+ Report("Alarm ON ", __FILE__,AlarmState[Alarm_i].EventPtr,AlarmItem[Alarm_i].EventType, RpMessage, value, Alarm_i);
}
else
{
@@ -1042,7 +1043,7 @@ void SendEventNotifications(void)
}
response.n_events = 0;
-
+ UInt Key = Task_disable();
for (i = 0;i<MAX_SYSTEM_ALARMS;i++)
{
if (AlarmState[i].Status == true)
@@ -1071,6 +1072,7 @@ void SendEventNotifications(void)
else
{
LOG_ERROR(response.n_events,"events malloc error");
+ Task_restore(Key);
return;
}
}
@@ -1078,6 +1080,7 @@ void SendEventNotifications(void)
{
response.events = NULL;
}
+ Task_restore(Key);
responseContainer = createAllocatedContainer(MESSAGE_TYPE__StartEventsNotificationResponse, AlarmHandlingToken, false, &response, &start_events_notification_response__pack, &start_events_notification_response__get_packed_size,&alarm_response_buffer);
responseContainer.continuous = true;
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
index 75542744f..cd748fd5c 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
@@ -561,11 +561,11 @@ c. Go to step 2.a x Segment.BrushStopsCount.
int NumofReadyDispensers = 0;
//REPORT_MSG((int)DispenserPrepareControlId, "Prepare Callback");
- DispenserBuildTimeCounter+=eOneSecond;
+ DispenserBuildTimeCounter+=500;
- if (DispenserBuildTimeCounter<=(3*eOneSecond))
+ if (DispenserBuildTimeCounter<(2*eOneSecond))
{
- REPORT_MSG(DispenserBuildTimeCounter,"waiting 3 seconds for pressure changes");
+ REPORT_MSG(DispenserBuildTimeCounter,"waiting 2 seconds for pressure changes");
return OK;
}
for (i = 0; i < MAX_DYE_DISPENSERS; i++)
@@ -573,7 +573,7 @@ c. Go to step 2.a x Segment.BrushStopsCount.
//IDS_StopHomeDispenser(i);
if (DispenserUsedInJob[i] == true) //we actually should check for all dispensers
{
- if (GetDispenserPressure(i) > 1.0)
+ if (GetDispenserPressure(i) > 0.80)
NumofReadyDispensers++;
}
}
@@ -632,8 +632,8 @@ c. Go to step 2.a x Segment.BrushStopsCount.
}
PrepeareSpeed = JobTicket->processparameters->dyeingspeed*JobTicket->processparameters->maxinkuptake*1.30;
- REPORT_MSG((int)JobTicket->processparameters->dyeingspeed, "dyeing speed");
- REPORT_MSG((int)JobTicket->processparameters->maxinkuptake, "max ink uptake");
+ //REPORT_MSG((int)JobTicket->processparameters->dyeingspeed, "dyeing speed");
+ //REPORT_MSG((int)JobTicket->processparameters->maxinkuptake, "max ink uptake");
if (HeaterCheckReady() == true)
{
@@ -669,7 +669,8 @@ c. Go to step 2.a x Segment.BrushStopsCount.
for (i = 0; i < MAX_DYE_DISPENSERS; i++)
{
dispenserspeed = PrepeareSpeed/MotorsCfg[DispenserIdToMotorId[i]].microstep;
- REPORT_MSG((int)dispenserspeed, "Prepare Speed");
+ dispenserspeed = 480;
+ Report("Prepare Speed",__FILE__,__LINE__,i,RpWarning,(int)dispenserspeed,0);
//IDS_StopHomeDispenser(i);
if (DispenserUsedInJob[i] == true) //we actually should check for all dispensers
{
@@ -678,7 +679,7 @@ c. Go to step 2.a x Segment.BrushStopsCount.
}
}
DispenserBuildTimeCounter = 0;
- DispenserPrepareControlId = AddControlCallback( IDS_Prepare_Callback, eOneSecond,TemplateDataReadCBFunction ,0, 0, 0 );
+ DispenserPrepareControlId = AddControlCallback( IDS_Prepare_Callback, 500,TemplateDataReadCBFunction ,0, 0, 0 );
}
//********************************************************************************************************************