Skip to content
Snippets Groups Projects
Commit 6231d3e1 authored by Hinko Kocevar's avatar Hinko Kocevar
Browse files

Merge branch 'jira_pbibcm_236' into 'master'

PBIBCM-236 Increase medium speed diff moving averager

See merge request !43
parents 784e22de d4b2f8d3
No related branches found
No related tags found
No related merge requests found
Pipeline #185658 failed
# Beam Current Monitor module CHANGELOG
## 0.9.13
- [ PBIBCM-236 ](https://jira.esss.lu.se/browse/PBIBCM-236) Increase medium speed diff moving averager
## 0.9.12
- [ PBIBCM-209 ](https://jira.esss.lu.se/browse/PBIBCM-209) Extend options of Trigger Source PVs
- [ PBIBCM-143 ](https://jira.esss.lu.se/browse/PBIBCM-143) Add Leaky Integrator
......
......@@ -2720,9 +2720,9 @@ int sis8300drvbcm_set_differential_medium_window_width_inverse(sis8300drv_usr *s
SIS8300BCM_DIFF_BANK_OFF + \
SIS8300BCM_DIFF_X_MEDIUM_WINDOW_WIDTH_INV_OFF;
// non-inverted value
int value = width - 2.0;
unsigned int value = (unsigned int) (width - 2.0);
// inverted value
value = (int)((1 << 23) / (88 * (value + 2)));
value = (1 << 31) / (88 * (value + 2));
return sis8300drv_reg_write(sisuser, reg, value);
}
......@@ -2744,13 +2744,13 @@ int sis8300drvbcm_get_differential_medium_window_width_inverse(sis8300drv_usr *s
(SIS8300BCM_CHANNEL_BLOCK_SIZE * channel) + \
SIS8300BCM_DIFF_BANK_OFF + \
SIS8300BCM_DIFF_X_MEDIUM_WINDOW_WIDTH_INV_OFF;
// register has lowest 24 bits defined
unsigned value;
// register has lowest 32 bits defined
unsigned int value;
ret = sis8300drv_reg_read(sisuser, reg, &value);
if (ret) {
return ret;
}
*width = ((double)value * 88.0 * (n_value + 2.0)) / (double)(1 << 23);
*width = ((double)value * 88.0 * (n_value + 2.0)) / (double)(1 << 31);
return ret;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment