dataforth(datasheet): PROPOSED Defect-A fix — render RTD input as Temp (C), not resistance

Repo copy only (review before deploying to C:\Shares\testdatadb). Folds RTD
(sensorNum 7) into the temperature path so the ACCURACY input column shows
'Temp. (C)' with signed temperature values, matching the original DOS-generated
datasheets and thermocouples (3-6). raw_data stimulus is already in deg C; no
conversion. getSensorNum and the i==13 ohm/ohm unit override are untouched.

Verified read-only against deployed env: 8B35 SN 179553-13 now shows Temp (C);
regression over 184 5B/8B renders -> 15 RTD changed (intended), 0 non-RTD changed.
Does NOT address Defect B (DSCA template). See DATASHEET-RTD-BUG-DIAGNOSIS-2026-06-17.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-17 14:07:36 -07:00
parent b00dbb8311
commit 5b68893941

View File

@@ -438,12 +438,11 @@ function buildTSpecs(specs, family, stepResponse) {
function formatAccuracyLine(point, sensorNum, maxIn) { function formatAccuracyLine(point, sensorNum, maxIn) {
let stimStr; let stimStr;
if (sensorNum >= 3 && sensorNum <= 6) { if ((sensorNum >= 3 && sensorNum <= 6) || sensorNum === 7) {
// Temperature: +####.## // Temperature: +####.## (thermocouples 3-6 AND RTD 7 — Dataforth RTD
// datasheets report the input as temperature, not the raw resistance.
// The .DAT/raw_data stimulus is already in degrees C, so no conversion.)
stimStr = formatSigned(point.stim, 2, 8); stimStr = formatSigned(point.stim, 2, 8);
} else if (sensorNum === 7) {
// Resistance: #####.##
stimStr = point.stim.toFixed(2).padStart(8);
} else { } else {
// Voltage/Current: +###.### // Voltage/Current: +###.###
const scale = (maxIn != null && maxIn < 1) ? 1000 : 1; const scale = (maxIn != null && maxIn < 1) ? 1000 : 1;
@@ -557,12 +556,11 @@ function generateExactDatasheet(record, specs) {
// Input column header based on sensor type // Input column header based on sensor type
let inputHeader; let inputHeader;
if (sensorNum >= 3 && sensorNum <= 6) { if ((sensorNum >= 3 && sensorNum <= 6) || sensorNum === 7) {
// RTD (7) reports temperature, same as thermocouples (3-6).
inputHeader = ' Temp. (C)'; inputHeader = ' Temp. (C)';
} else if (sensorNum === 2 || sensorNum === 9) { } else if (sensorNum === 2 || sensorNum === 9) {
inputHeader = ' Iin (mA)'; inputHeader = ' Iin (mA)';
} else if (sensorNum === 7) {
inputHeader = ' Rin (ohms)';
} else { } else {
inputHeader = (maxIn != null && maxIn < 1) ? ' Vin (mV)' : ' Vin (V)'; inputHeader = (maxIn != null && maxIn < 1) ? ' Vin (mV)' : ' Vin (V)';
} }