Commit 2fe986bc authored by Franksen, Benjamin's avatar Franksen, Benjamin
Browse files

gps/writer: optional extra delay between sends, off by default

parent e1921352
......@@ -65,6 +65,9 @@
* Globals 'n' Defines
**************************************************************************-*/
/* set to a positive number (of microseconds) to force delay between sends */
#define WRITER_EXTRA_DELAY 0
#define WAIT_BEFORE_REBOOT 100 /* [ms] */
int gps_writer_debug = 0;
......@@ -187,6 +190,13 @@ void gps_writer(void *arg)
int writer_disabled = 0;
gps_callbacks callback_struct;
#if WRITER_EXTRA_DELAY
alm_t extra_alarm;
epicsEventId extra_sem;
extra_sem = epicsEventCreate(epicsEventEmpty);
extra_alarm = alm_create_event(extra_sem);
#endif
taskwdInsert(epicsThreadGetIdSelf(), NULL, NULL);
......@@ -242,6 +252,10 @@ void gps_writer(void *arg)
data.c, &delay_dummy, p_ret, &callback_struct);
}
#if WRITER_EXTRA_DELAY
alm_start(extra_alarm, 400);
epicsEventWait(extra_sem);
#endif
}
}
}
......
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