diff --git a/vacApp/Db/vs_settings.req b/vacApp/Db/vs_settings.req new file mode 100644 index 0000000..1d37d01 --- /dev/null +++ b/vacApp/Db/vs_settings.req @@ -0,0 +1,2 @@ +$(P)$(GAUGE).PREC + diff --git a/vacApp/src/vsRecord.c b/vacApp/src/vsRecord.c index 1fc7775..0717f06 100644 --- a/vacApp/src/vsRecord.c +++ b/vacApp/src/vsRecord.c @@ -270,19 +270,20 @@ static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble * pcd) ******************************************************************************/ static long get_precision(const DBADDR *paddr, long *precision) { + vsRecord *pvs = (vsRecord *)paddr->precord; int fieldIndex = dbGetFieldIndex(paddr); + *precision = pvs->prec; if (fieldIndex == vsRecordVAL || fieldIndex == vsRecordPRES || fieldIndex == vsRecordCGAP || fieldIndex == vsRecordCGBP || fieldIndex == vsRecordSP1R || fieldIndex == vsRecordSP2R || fieldIndex == vsRecordSP3R || fieldIndex == vsRecordSP4R) { - *precision = 1; return 0; } if (fieldIndex == vsRecordLPRS || fieldIndex == vsRecordLCAP || fieldIndex == vsRecordLCBP) { - *precision = 2; + *precision = pvs->prec + 1; return 0; } *precision = 0; diff --git a/vacApp/src/vsRecord.dbd b/vacApp/src/vsRecord.dbd index 22f5aa4..489f0b3 100644 --- a/vacApp/src/vsRecord.dbd +++ b/vacApp/src/vsRecord.dbd @@ -39,6 +39,12 @@ recordtype(vs) { initial("5") interest(1) } + field(PREC,DBF_SHORT) { + prompt("Display Precision") + promptgroup(GUI_DISPLAY) + interest(1) + initial("1") + } field(IG1S,DBF_MENU) { prompt("Ion Gauge 1 Set") promptgroup(GUI_ALARMS)