aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/General
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2020-06-16 18:35:56 +0300
committerAvi Levkovich <avi@twine-s.com>2020-06-16 18:35:56 +0300
commit969afb0ba72af89a368ac124458b06b848cd1bed (patch)
treea4013da72016832131bc07fb4da3f449765ebfed /Software/Embedded_SW/Embedded/Modules/General
parente807f8ba35e206bd78024e616fc3382b986b5308 (diff)
downloadTango-969afb0ba72af89a368ac124458b06b848cd1bed.tar.gz
Tango-969afb0ba72af89a368ac124458b06b848cd1bed.zip
Check safety in the dispensers only for available and supports dispensers (with EEPROM 128KB)
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/General')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/Safety.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
index 0f326d133..a615d09f8 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
@@ -664,8 +664,8 @@ uint32_t HWConfigurationFunc(MessageContainer* requestContainer)
memcpy(&ExistingDataLen,(void *)GENHWCFG_MAP_IN_FLASH,sizeof(ExistingDataLen));
// if (ExistingDataLen == requestContainer->data.len)
{
- compare = memcmp (requestContainer->data.data,((void *)GENHWCFG_MAP_IN_FLASH),requestContainer->data.len);
- report("!!!!!!!!!data compare hw func", __FILE__,compare,requestContainer->data.len,RpMessage,ExistingDataLen,0);
+ compare = memcmp (requestContainer->data.data,((void *)GENHWCFG_MAP_IN_FLASH+4),requestContainer->data.len);
+ Report("!!!!!!!!!data compare hw func", __FILE__,compare,requestContainer->data.len,RpMessage,ExistingDataLen,0);
//if compare is equal no need to store the data
// if (compare == 0)
{
diff --git a/Software/Embedded_SW/Embedded/Modules/General/Safety.c b/Software/Embedded_SW/Embedded/Modules/General/Safety.c
index 9680e11d0..e8454370c 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/Safety.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/Safety.c
@@ -54,7 +54,8 @@ uint32_t Safety_Main_State(uint32_t IfIndex, uint32_t BusyFlag)
#endif
for (Disp_i = 0;Disp_i < MAX_SYSTEM_DISPENSERS;Disp_i++)
{
- if (isMotorConfigured(Disp_i + HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1)==true)
+ //Check safety in the dispensers only for configured, available and supports dispensers (with EEPROM 128KB)
+ if ((isMotorConfigured(Disp_i + HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1)==true) && (Dispenser_struct[Disp_i].Type == DISP_TYPE_EEPROM128KB))
{
Indication = Check_Disp_Safety_Stop_Indication(Disp_i);
AllDispensersInSafety &= Indication;