Skip to content

Commit 957f72a

Browse files
committed
fix: issue where events for a sensor with no data are still being shown
1 parent f2cba2e commit 957f72a

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

resources/release-notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- (All) Add support for more date formats for metadata readers
44
- (All) Add support for specifying `LegendOrientation`
55
- (IMAP) Add sensor activation attempts and activation status to SID15 (`mag.imap.hk.SID15`)
6+
- (IMAP) Fix issue where events for a sensor with no data are still being shown
67

78
## Project
89

src/mission/imap/+mag/+imap/+view/Field.m

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,20 @@ function visualize(this)
122122
error("Unrecognized event ""%s"".", e);
123123
end
124124

125+
if ~primary.HasData
126+
ed(1:2) = [];
127+
end
128+
129+
if ~secondary.HasData
130+
ed(end-1:end) = [];
131+
end
132+
125133
eventData = [eventData, ed]; %#ok<AGROW>
126134
end
127135
end
128136

129137
function [numHK, hkData] = getHKData(this, pwrHK, primary, secondary, primarySensor, secondarySensor)
130-
138+
131139
numHK = 0;
132140
hkData = {};
133141

@@ -139,9 +147,9 @@ function visualize(this)
139147
hkData = [hkData, {pwrHK, ...
140148
mag.graphics.style.Default(Title = compose("%s & ICU Temperatures", primarySensor), YLabel = this.TLabel, Legend = [primarySensor, "ICU"], Charts = mag.graphics.chart.Plot(YVariables = [primarySensor, "ICU"] + "Temperature"))}];
141149
end
142-
150+
143151
if ~isempty(secondary) && secondary.HasData
144-
152+
145153
numHK = 1;
146154
hkData = [hkData, {pwrHK, ...
147155
mag.graphics.style.Default(Title = compose("%s & ICU Temperatures", secondarySensor), YLabel = this.TLabel, YAxisLocation = "right", Legend = [secondarySensor, "ICU"], Charts = mag.graphics.chart.Plot(YVariables = [secondarySensor, "ICU"] + "Temperature"))}];

0 commit comments

Comments
 (0)