[udf-dlm-develop] A possible bug
Brought to you by:
esm
From: Steve G. <ge...@ss...> - 2000-01-24 21:32:43
|
I've edited the FUV housekeeping PIDF, getting all the volts and amps properly scaled. The UDF retrievals come out OK when I use a C program, matching what we get from our LZ-based displays. Harald's program using IDL and DLM does not yield the correct results. For example, "DPU_P5VMON" returns 8.507e+07, instead of 5.02 -- it's our 5-Volt service. Large numbers like these are being returned for all voltages and amperages, but some housekeeping items do come out right. The difference is whether the PIDF specifies 1 unit or 2. When 2 units are specified, the garbage result comes back; when 1 unit is specified, we get the right result. To check this, I modified the PIDF to set 1 unit for DPU_P5VMON. This yields a value 205, which is correct for the raw, unscaled byte. One unit works; two units don't. I already made this kind of mistake in my C interface to UDF. I had to change my code to copy tables from the first unit, then append more tables from the second unit, or as many units as there are in the PIDF. Two units are convenient for housekeeping, because I don't have to modify Chris's unit definitions. The first unit (Chris's) isolates the housekeeping byte. The second unit (which I added) multiplies the byte by the appropriate scaling constant. |