@measurequick/measurequick-report-generator 1.5.199 → 1.5.200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -223,55 +223,103 @@ export async function getReport(payload, _test) {
|
|
|
223
223
|
|
|
224
224
|
form.getTextField("YourSystemScorePage2").setText(`${systemScorePercentage} ${systemScoreGrade}`);
|
|
225
225
|
|
|
226
|
-
// Print targets and range icons
|
|
227
|
-
//
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
// Check
|
|
246
|
-
if (
|
|
247
|
-
|
|
248
|
-
const idealLow = t.targets
|
|
249
|
-
const idealHigh = t.targets
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
226
|
+
// Print targets and range icons for heat pump heating
|
|
227
|
+
// Heat pump heating target zones - some are in data, some in targets
|
|
228
|
+
const measureLabels = ["Superheat", "Subcooling", "Condenser", "TempSplit", "Tesp", "FilterFace"];
|
|
229
|
+
|
|
230
|
+
for (let i = 0; i < measureLabels.length; i++) {
|
|
231
|
+
const label = measureLabels[i];
|
|
232
|
+
let targetZone = "";
|
|
233
|
+
let icon = iconRangeGreen;
|
|
234
|
+
let iconPlacement = "Mid";
|
|
235
|
+
let value = "";
|
|
236
|
+
let mid, low, high;
|
|
237
|
+
|
|
238
|
+
if (label === "Superheat") {
|
|
239
|
+
// Temperature Rise - no specific target zone for HP heating, show measured value
|
|
240
|
+
value = textFields.tempRise;
|
|
241
|
+
// HP heating doesn't have fixed temp rise targets like gas heating
|
|
242
|
+
} else if (label === "Subcooling") {
|
|
243
|
+
// Approach - LLT minus entering dry bulb
|
|
244
|
+
value = textFields.approach;
|
|
245
|
+
// Check for approach targets in targets object
|
|
246
|
+
if (t.targets && t.targets.approach !== undefined) {
|
|
247
|
+
mid = parseFloat(t.targets.approach);
|
|
248
|
+
const idealLow = t.targets.approach_ideal_low !== undefined ? parseFloat(t.targets.approach_ideal_low) : 3;
|
|
249
|
+
const idealHigh = t.targets.approach_ideal_high !== undefined ? parseFloat(t.targets.approach_ideal_high) : 3;
|
|
250
|
+
low = mid - idealLow;
|
|
251
|
+
high = mid + idealHigh;
|
|
252
|
+
if (!isNaN(low) && !isNaN(high)) {
|
|
253
|
+
targetZone = `(${low.toFixed(1)} - ${high.toFixed(1)})`;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
} else if (label === "Condenser") {
|
|
257
|
+
// COP - target is in data.hp_heating_cop_target
|
|
258
|
+
value = textFields.cop;
|
|
259
|
+
if (t.data && t.data.hp_heating_cop_target !== undefined) {
|
|
260
|
+
mid = parseFloat(t.data.hp_heating_cop_target);
|
|
261
|
+
// COP ideal range is typically ±0.3
|
|
262
|
+
low = mid - 0.3;
|
|
263
|
+
high = mid + 0.3;
|
|
264
|
+
if (!isNaN(low) && !isNaN(high)) {
|
|
265
|
+
targetZone = `(${low.toFixed(2)} - ${high.toFixed(2)})`;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
} else if (label === "TempSplit") {
|
|
269
|
+
// Outdoor Air Temp - no target zone, just informational
|
|
270
|
+
value = textFields.oat;
|
|
271
|
+
} else if (label === "Tesp") {
|
|
272
|
+
// Total External Static Pressure
|
|
273
|
+
value = textFields.tesp;
|
|
274
|
+
if (t.targets && t.targets.pressure_static_total_external !== undefined) {
|
|
275
|
+
mid = parseFloat(t.targets.pressure_static_total_external);
|
|
276
|
+
high = mid * 1.4;
|
|
277
|
+
if (!isNaN(high)) {
|
|
278
|
+
targetZone = `(< ${high.toFixed(2)})`;
|
|
260
279
|
}
|
|
261
280
|
}
|
|
281
|
+
} else if (label === "FilterFace") {
|
|
282
|
+
// Airflow - no specific target zone
|
|
283
|
+
value = textFields.airflow;
|
|
284
|
+
}
|
|
262
285
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
286
|
+
// Determine range indicator position if we have target values
|
|
287
|
+
if (value && value !== "--" && mid !== undefined) {
|
|
288
|
+
const actual = parseFloat(value);
|
|
289
|
+
if (!isNaN(actual)) {
|
|
290
|
+
if (label === "Tesp") {
|
|
291
|
+
// TESP: only check if above threshold
|
|
292
|
+
if (actual > high) {
|
|
293
|
+
icon = iconRangeRed;
|
|
294
|
+
iconPlacement = "High";
|
|
295
|
+
}
|
|
296
|
+
} else if (low !== undefined && high !== undefined) {
|
|
297
|
+
if (actual < low) {
|
|
298
|
+
icon = iconRangeRed;
|
|
299
|
+
iconPlacement = "Low";
|
|
300
|
+
} else if (actual > high) {
|
|
301
|
+
icon = iconRangeRed;
|
|
302
|
+
iconPlacement = "High";
|
|
303
|
+
}
|
|
304
|
+
}
|
|
267
305
|
}
|
|
268
306
|
}
|
|
269
|
-
|
|
307
|
+
|
|
308
|
+
// Set target zone text
|
|
270
309
|
try {
|
|
271
|
-
form.getTextField(`${label}Target`).setText(
|
|
310
|
+
form.getTextField(`${label}Target`).setText(targetZone);
|
|
272
311
|
} catch (e) {
|
|
273
312
|
// Field may not exist
|
|
274
313
|
}
|
|
314
|
+
|
|
315
|
+
// Set range indicator icon if value exists
|
|
316
|
+
if (value && value !== "--") {
|
|
317
|
+
try {
|
|
318
|
+
form.getButton(`Image${label}${iconPlacement}_af_image`).setImage(icon);
|
|
319
|
+
} catch (e) {
|
|
320
|
+
// Field may not exist
|
|
321
|
+
}
|
|
322
|
+
}
|
|
275
323
|
}
|
|
276
324
|
|
|
277
325
|
// Skip pass/fail subsystem review for heat pump heating
|