Remove the lower limit on count rate for simulated hardware
r3640 | dcl | 2012-07-11 17:31:41 +1000 (Wed, 11 Jul 2012) | 1 line
This commit is contained in:
@@ -926,10 +926,10 @@ int hware_read(pHWARE hware, unsigned long long* value)
|
||||
gettimeofday(&this_time, NULL);
|
||||
delta_time = (this_time.tv_sec + 1e-6 * this_time.tv_usec) -
|
||||
(hware->last_time.tv_sec + 1e-6 * hware->last_time.tv_usec);
|
||||
delta_count = (long long)(0.5 + delta_time * hware->source);
|
||||
delta_count = (long long)(0.5 + 1000 * delta_time * hware->source);
|
||||
hware->count64 += delta_count;
|
||||
hware->last_time = this_time;
|
||||
*value = hware->count64;
|
||||
*value = hware->count64 / 1000;
|
||||
return 0;
|
||||
}
|
||||
int hware_source(pHWARE hware, int value)
|
||||
@@ -952,9 +952,6 @@ int hware_source(pHWARE hware, int value)
|
||||
hware->source = 80000000;
|
||||
break;
|
||||
default:
|
||||
if (value < 1000)
|
||||
hware->source = 1000;
|
||||
else
|
||||
hware->source = value;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user