Ensure mbb* MASK calculated properly
This commit is contained in:
@@ -120,9 +120,9 @@ static long init_record(mbbiDirectRecord *prec, int pass)
|
||||
if (prec->siol.type == CONSTANT)
|
||||
recGblInitConstantLink(&prec->siol, DBF_USHORT, &prec->sval);
|
||||
|
||||
/* Initialize MASK if the user didn't */
|
||||
if (prec->mask == 0)
|
||||
prec->mask = (1 << prec->nobt) - 1;
|
||||
/* Initialize MASK if the user set NOBT instead */
|
||||
if (prec->mask == 0 && prec->nobt <= 32)
|
||||
prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;
|
||||
|
||||
if (pdset->init_record) {
|
||||
status = pdset->init_record(prec);
|
||||
|
||||
@@ -137,9 +137,9 @@ static long init_record(mbbiRecord *prec, int pass)
|
||||
if (prec->siol.type == CONSTANT)
|
||||
recGblInitConstantLink(&prec->siol, DBF_USHORT, &prec->sval);
|
||||
|
||||
/* Initialize MASK if the user didn't */
|
||||
if (prec->mask == 0)
|
||||
prec->mask = (1 << prec->nobt) - 1;
|
||||
/* Initialize MASK if the user set NOBT instead */
|
||||
if (prec->mask == 0 && prec->nobt <= 32)
|
||||
prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;
|
||||
|
||||
if (pdset->init_record)
|
||||
status = pdset->init_record(prec);
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
# National Laboratory.
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
# EPICS BASE Versions 3.13.7
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
recordtype(mbbi) {
|
||||
include "dbCommon.dbd"
|
||||
@@ -15,7 +14,7 @@ recordtype(mbbi) {
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
}
|
||||
field(NOBT,DBF_SHORT) {
|
||||
field(NOBT,DBF_USHORT) {
|
||||
prompt("Number of Bits")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
|
||||
@@ -123,9 +123,9 @@ static long init_record(mbboDirectRecord *prec, int pass)
|
||||
if (recGblInitConstantLink(&prec->dol, DBF_USHORT, &prec->val))
|
||||
prec->udf = FALSE;
|
||||
|
||||
/* Initialize MASK if the user didn't */
|
||||
if (prec->mask == 0)
|
||||
prec->mask = (1 << prec->nobt) - 1;
|
||||
/* Initialize MASK if the user set NOBT instead */
|
||||
if (prec->mask == 0 && prec->nobt <= 32)
|
||||
prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;
|
||||
|
||||
if (pdset->init_record) {
|
||||
status = pdset->init_record(prec);
|
||||
|
||||
@@ -143,9 +143,9 @@ static long init_record(mbboRecord *prec, int pass)
|
||||
if (recGblInitConstantLink(&prec->dol, DBF_USHORT, &prec->val))
|
||||
prec->udf = FALSE;
|
||||
|
||||
/* Initialize MASK if the user didn't */
|
||||
if (prec->mask == 0)
|
||||
prec->mask = (1 << prec->nobt) - 1;
|
||||
/* Initialize MASK if the user set NOBT instead */
|
||||
if (prec->mask == 0 && prec->nobt <= 32)
|
||||
prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;
|
||||
|
||||
if (pdset->init_record) {
|
||||
status = pdset->init_record(prec);
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
# National Laboratory.
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
# EPICS BASE Versions 3.13.7
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
recordtype(mbbo) {
|
||||
include "dbCommon.dbd"
|
||||
@@ -29,7 +28,7 @@ recordtype(mbbo) {
|
||||
interest(1)
|
||||
menu(menuOmsl)
|
||||
}
|
||||
field(NOBT,DBF_SHORT) {
|
||||
field(NOBT,DBF_USHORT) {
|
||||
prompt("Number of Bits")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
|
||||
Reference in New Issue
Block a user