@@ -235,8 +235,9 @@ static COLDEF wMtrColdef[] =
235235#undef oWMtr
236236
237237// columns definition for "Airflow meter" (AFMTR) report/export
238- #define oAFMtr (m ) offsetof( AFMTR_IVL, m)
239- #define D 3 // decimal digits
238+ #define oAFMt0 (m ) offsetof( AFMTR_IVL, m)
239+ #define oAFMt1 (m ) (offsetof( AFMTR_IVL, m)+sizeof ( AFMTR_IVL))
240+ #define D 1 // decimal digits
240241static COLDEF afMtrColdef[] =
241242/* max offset cvflag */
242243/* colhd flags wid dfw (cnguts.h) (above) */
@@ -247,21 +248,31 @@ static COLDEF afMtrColdef[] =
247248 { " Day" , 8 | 4 , 2 , 0 , USE_NEXT_ARG, CVI },
248249 { " Hr" , 8 | 4 , 2 , 0 , USE_NEXT_ARG, CVI },
249250 { " Subhr" , 8 | 4 , 1 , 0 , USE_NEXT_ARG, CVS }, // ..
250- { " Total" , 0 , 7 , D, oAFMtr (amt_total), CV1 },
251- { " Unknown" , 0 , 7 , D, oAFMtr (amt_unknown),CV1 },
252- { " InfilEx" , 0 , 7 , D, oAFMtr (amt_infilEx),CV1 },
253- { " VentEx" , 0 , 7 , D, oAFMtr (amt_ventEx), CV1 },
254- { " FanEx" , 0 , 7 , D, oAFMtr (amt_fanEx), CV1 },
255- { " InfilIz" , 0 , 7 , D, oAFMtr (amt_infilIz),CV1 },
256- { " VentIz" , 0 , 7 , D, oAFMtr (amt_ventIz), CV1 },
257- { " FanIz" , 0 , 7 , D, oAFMtr (amt_fanIz), CV1 },
258- { " DuctLk" , 0 , 7 , D, oAFMtr (amt_ductLk), CV1 },
259- { " HVAC" , 0 , 7 , D, oAFMtr (amt_hvac), CV1 },
251+ { " Tot+" , 0 , 5 , D, oAFMt0 (amt_total), CV1 },
252+ { " Unkn+" , 0 , 5 , D, oAFMt0 (amt_unknown),CV1 },
253+ { " InfX+" , 0 , 5 , D, oAFMt0 (amt_infilEx),CV1 },
254+ { " VntX+" , 0 , 5 , D, oAFMt0 (amt_ventEx), CV1 },
255+ { " FanX+" , 0 , 5 , D, oAFMt0 (amt_fanEx), CV1 },
256+ { " InfZ+" , 0 , 5 , D, oAFMt0 (amt_infilIz),CV1 },
257+ { " VntZ+" , 0 , 5 , D, oAFMt0 (amt_ventIz), CV1 },
258+ { " FanZ+" , 0 , 5 , D, oAFMt0 (amt_fanIz), CV1 },
259+ { " Duct+" , 0 , 5 , D, oAFMt0 (amt_ductLk), CV1 },
260+ { " HVAC+" , 0 , 5 , D, oAFMt0 (amt_hvac), CV1 },
261+ { " Tot-" , 0 , 5 , D, oAFMt1 (amt_total), CV1 },
262+ { " Unkn-" , 0 , 5 , D, oAFMt1 (amt_unknown),CV1 },
263+ { " InfX-" , 0 , 5 , D, oAFMt1 (amt_infilEx),CV1 },
264+ { " VntX-" , 0 , 5 , D, oAFMt1 (amt_ventEx), CV1 },
265+ { " FanX-" , 0 , 5 , D, oAFMt1 (amt_fanEx), CV1 },
266+ { " InfZ-" , 0 , 5 , D, oAFMt1 (amt_infilIz),CV1 },
267+ { " VntZ-" , 0 , 5 , D, oAFMt1 (amt_ventIz), CV1 },
268+ { " FanZ-" , 0 , 5 , D, oAFMt1 (amt_fanIz), CV1 },
269+ { " Duct-" , 0 , 5 , D, oAFMt1 (amt_ductLk), CV1 },
270+ { " HVAC-" , 0 , 5 , D, oAFMt1 (amt_hvac), CV1 },
260271 { 0 , 0 , 0 , 0 , 0 , CV1 }
261272};
262273#undef D
263- #undef oAFMtr
264-
274+ #undef oAFMt0
275+ # undef oAFMt1
265276
266277// columns definition for "air handler" (AH) report/export
267278#define oAhr (m ) offsetof( AHRES_IVL_SUB, m)
@@ -1258,10 +1269,10 @@ o && dvrip->rpDayEnd >= Top.tp_endDay ) <--- new year's bug! 2-94
12581269 vpRxRow ( dvrip, &rxt, pIvl, shortIvlTexts[rxt.fq ]); // do DHWMTR rpt row. Uses rxt.flags, colDef.
12591270 }
12601271
1261- else if (dvrip->rpTy == C_RPTYCH_AFMTR) // if AFDHW meter report
1272+ else if (dvrip->rpTy == C_RPTYCH_AFMTR) // if AFMETER report
12621273 {
12631274 TI afMtri = dvrip->dv_afMtri > 0 ? dvrip->dv_afMtri : AfMtrR.n ; // subscript
1264- AFMTR_IVL* pIvl = & AfMtrR[afMtri].Y + ( rxt.fq - 1 ); // .M is after .Y, etc
1275+ AFMTR_IVL* pIvl = AfMtrR[afMtri].amt_GetAFMTR_IVL ( rxt.fq );
12651276 rxt.colDef = afMtrColdef; // columns definition table for vpRxRow
12661277 vpRxRow (dvrip, &rxt, pIvl, shortIvlTexts[rxt.fq ]); // do DHWMTR rpt row. Uses rxt.flags, colDef.
12671278 }
@@ -1490,7 +1501,7 @@ void DVRI::dv_vpAfMtrRow(RXPORTINFO *rxt, TI afMtri /*=-1*/)
14901501 if (afMtri == TI_SUM)
14911502 afMtri = AfMtrR.n; // handle "sum"
14921503 AFMTR* pM = AfMtrR.GetAt(afMtri); // record
1493- AFMTR_IVL* pIvl = (& pM->Y) + ( rxt->fq - 1 ); // interval
1504+ AFMTR_IVL* pIvl = pM->amt_GetAFMTR_IVL( rxt->fq); // interval
14941505
14951506 vpRxRow(this, rxt, pIvl, rxt->col1, pM->name, &rxt->xebM, &rxt->xebD, &rxt->xebH, rxt->xebS);
14961507} // dv_vpDHWMtrRow
0 commit comments