Commit a9f446ba authored by Franksen, Benjamin's avatar Franksen, Benjamin
Browse files

LowCAL: completed removal of NO_GP_PATCH #ifdefs

parent 8abe32a3
......@@ -50,7 +50,6 @@
#define USE_GPS
#ifdef EMBEDDED_CONTROLLER
#define NO_GP_PATCH
#undef USE_GPS
#endif
......@@ -194,9 +193,7 @@ typedef struct
/* a function to query the higher protocol
layer about that variable */
void* query_data; /* Parameter to function query_func() */
#ifndef NO_GP_PATCH
int inhibit_time;
#endif
int inhibit_time;
#ifdef LCAL_STAT
Buf_Stat stat; /* Statistics */
#endif
......@@ -713,9 +710,7 @@ prot_Return lowcal_init_start (
glbl_num_slots = num_slots;
/* Set up error buf */
#ifndef NO_GP_PATCH
ERRORBUF.inhibit_time=0;
#endif
ERRORBUF.err_type = errtype;
ERRORBUF.out_data[1] = LCAL_E_IMUX;
......@@ -934,10 +929,7 @@ prot_Return lowcal_init_entity_cb (
}
/* Connect varset to slot */
slot_p->varset_p = varset;
#ifndef NO_GP_PATCH
slot_p->inhibit_time= 0;
#endif
}
UNLOCK(mutex); /* End of critical section */
......@@ -1148,18 +1140,17 @@ prot_Return lowcal_init_entity_cb (
return(PROT_ERR);
}
#ifndef NO_GP_PATCH
slot_p->inhibit_time= var_attrib.inhibit_time;
sci_ret = sci_set_inhibit(prot_handle,
(sci_Object*) slot_p->out_object,
(var_attrib.inhibit_time * 100));
slot_p->inhibit_time= var_attrib.inhibit_time;
sci_ret = sci_set_inhibit(prot_handle,
(sci_Object*) slot_p->out_object,
(var_attrib.inhibit_time * 100));
if (sci_ret & SCI_ERROR) {
sci_get_errcode((sci_Struc*) prot_handle, &err);
sci_err((int) err, "sci_set_inhibit");
return(PROT_ERR);
}
if (sci_ret & SCI_ERROR) {
sci_get_errcode((sci_Struc*) prot_handle, &err);
sci_err((int) err, "sci_set_inhibit");
return(PROT_ERR);
}
#endif
PRF(4, ("Slot %d: OUT object initialized:\n"
"port %d, COB %d, type %d, length %d, timeout %d.\n",
......@@ -1510,10 +1501,8 @@ prot_Return lowcal_get (
}
}
#ifndef NO_GP_PATCH
if (slot_p->inhibit_time!=0)
func_ret |= PROT_INHIB;
#endif
EXIT:
......@@ -2467,11 +2456,6 @@ long lowcal_defines(void)
#else
printf("\tEMBEDDED_CONTROLLER: undefined\n");
#endif
#ifdef NO_GP_PATCH
printf("\tNO_GP_PATCH: defined\n");
#else
printf("\tNO_GP_PATCH: undefined\n");
#endif
#ifdef BE
printf("\tBE: defined\n");
#else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment