Commit ec29280
committed
fix(demo): scale MonitorTag.MinDuration to datenum time base
MonitorTag.applyDebounce_ measures run duration in parent-X native
units. plantConfig expresses MinDuration in seconds (1 / 2 / 3), which
was correct while the data generator emitted posix seconds as the
time base. After the datenum switch, parent-X is in days — so a
config value of '1 second' was being treated as '1 day' of debounce,
and every 3-second breach (3.5e-5 days) was quietly zeroed out by the
debounce filter before it could fire the monitor.
Divide each MinDuration by 86400 when constructing the MonitorTags in
registerPlantTags, so the demo's monitors keep human-readable seconds
in plantConfig while the instantiated tags use the correct datenum
units on the wire. Criticality and AlarmOff predicates are unaffected
(the AlarmOff condition is evaluated on Y, not on X).
Regression suite: 80/80 green.1 parent 27ad9b0 commit ec29280
1 file changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
100 | | - | |
| 108 | + | |
101 | 109 | | |
102 | 110 | | |
103 | 111 | | |
| |||
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
109 | | - | |
| 117 | + | |
110 | 118 | | |
111 | 119 | | |
112 | 120 | | |
| |||
115 | 123 | | |
116 | 124 | | |
117 | 125 | | |
118 | | - | |
| 126 | + | |
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
| |||
124 | 132 | | |
125 | 133 | | |
126 | 134 | | |
127 | | - | |
| 135 | + | |
128 | 136 | | |
129 | 137 | | |
130 | 138 | | |
| |||
0 commit comments