fix support for link 0

This commit is contained in:
2024-11-29 10:42:07 +01:00
committed by Andrew Johnson
parent ead8b7e82b
commit 5143258011

View File

@ -282,7 +282,7 @@ static void processCallback(epicsCallback *arg)
static long get_units(DBADDR *paddr, char *units)
{
seqRecord *prec = (seqRecord *) paddr->precord;
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY1);
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY0);
if (fieldOffset >= 0)
switch (fieldOffset & 2) {
@ -299,7 +299,7 @@ static long get_units(DBADDR *paddr, char *units)
static long get_precision(const DBADDR *paddr, long *pprecision)
{
seqRecord *prec = (seqRecord *) paddr->precord;
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY1);
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY0);
short precision;
if (fieldOffset >= 0)
@ -321,7 +321,7 @@ static long get_precision(const DBADDR *paddr, long *pprecision)
static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble *pgd)
{
seqRecord *prec = (seqRecord *) paddr->precord;
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY1);
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY0);
if (fieldOffset >= 0)
switch (fieldOffset & 2) {
@ -341,7 +341,7 @@ static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble *pgd)
static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble *pcd)
{
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY1);
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY0);
if (fieldOffset >= 0 && (fieldOffset & 2) == 0) { /* DLYn */
pcd->lower_ctrl_limit = 0.0;
@ -355,7 +355,7 @@ static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble *pcd)
static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble *pad)
{
seqRecord *prec = (seqRecord *) paddr->precord;
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY1);
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY0);
if (fieldOffset >= 0 && (fieldOffset & 2) == 2) /* DOn */
dbGetAlarmLimits(get_dol(prec, fieldOffset),