Commit e5d7fac0 authored by Xiwen JIANG's avatar Xiwen JIANG

asn1c compliation problem + small changes in openair0_lib

parent aac0097b
...@@ -25,7 +25,6 @@ reset_color="$(tput sgr0)" ...@@ -25,7 +25,6 @@ reset_color="$(tput sgr0)"
function error() function error()
{ {
echo -e "$red_color"ERROR: "$@""$reset_color" echo -e "$red_color"ERROR: "$@""$reset_color"
exit 1
} }
function check_sha1() function check_sha1()
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
#define max(a,b) ((a)>(b) ? (a) : (b)) #define max(a,b) ((a)>(b) ? (a) : (b))
//#define DEBUG_EXMIMO #define DEBUG_EXMIMO
exmimo_pci_interface_bot_virtual_t openair0_exmimo_pci[MAX_CARDS]; // contains userspace pointers for each card exmimo_pci_interface_bot_virtual_t openair0_exmimo_pci[MAX_CARDS]; // contains userspace pointers for each card
...@@ -594,15 +594,15 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi ...@@ -594,15 +594,15 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi
#endif #endif
for (n=n1,ntot=0;ntot<nsamps;n=n2) { for (n=n1,ntot=0;ntot<nsamps;n=n2) {
while ((ts < exm->last_ts_rx + n) && while ((ts < exm->last_ts_rx + n) &&
(exm->watchdog_exit==0)) { (exm->watchdog_exit==0)) {
diff = exm->last_ts_rx+n - ts; // difference in samples between current timestamp and last RX received sample diff = exm->last_ts_rx+n - ts; // difference in samples between current timestamp and last RX received sample
// go to sleep until we should have enough samples (1024 for a bit more) // go to sleep until we should have enough samples (1024 for a bit more)
#ifdef DEBUG_EXMIMO #ifdef DEBUG_EXMIMO
printf("portion %d samples, ts %lu, last_ts_rx %lu (%lu) => sleeping %u us\n",n,ts,exm->last_ts_rx,exm->last_ts_rx+n, printf("portion %d samples, (n1, n2) = (%d, %d), ts %lu, last_ts_rx %lu (%lu) => sleeping %u us\n",n,n1,n2,ts,exm->last_ts_rx,exm->last_ts_rx+n,
(unsigned int)((double)(diff+1024)*1e6/cfg->sample_rate)); (unsigned int)((double)(diff+1024)*1e6/cfg->sample_rate));
#endif #endif
tv_nsec=(unsigned long)((double)(diff+3840)*1e9/cfg->sample_rate); tv_nsec=(unsigned long)((double)(diff+1024)*1e9/cfg->sample_rate);
// tv_nsec = 500000L; // tv_nsec = 500000L;
old_ts = ts; old_ts = ts;
rt_sleep(&sleep_time,tv_nsec); rt_sleep(&sleep_time,tv_nsec);
......
Markdown is supported
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