Skip to content

Commit 074b575

Browse files
HanSur94claude
andcommitted
fix: three CI-caught bugs — AxisColor, SensorRegistry, stdint.h
1. DashboardTheme: add missing AxisColor field (derived from ToolbarFontColor). Used by 6 widgets but never defined — caused "Unrecognized field name AxisColor" in MATLAB CI. 2. example_dashboard_advanced: register sensors in SensorRegistry before DashboardEngine.load() so fromStruct can resolve sensor keys. 3. mksqlite.c: add #include <stdint.h> for uint32_t — MATLAB's mex compiler on Linux CI doesn't implicitly include it like GCC does. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e0fe350 commit 074b575

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

examples/example_dashboard_advanced.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,21 @@
275275
d.save(jsonPath);
276276
fprintf('\nSaved to: %s\n', jsonPath);
277277

278+
% Register sensors so fromStruct can resolve them during load
279+
SensorRegistry.register('T-401', sTemp);
280+
SensorRegistry.register('P-201', sPress);
281+
SensorRegistry.register('F-301', sFlow);
282+
278283
% Load back — multi-page layout, InfoFile, and widget properties all preserved
279284
d2 = DashboardEngine.load(jsonPath);
280285
fprintf('Reloaded: %d widget(s), %d page(s), InfoFile="%s"\n', ...
281286
numel(d2.Widgets), numel(d2.Pages), d2.InfoFile);
282287
assert(numel(d2.Pages) == 2, 'Expected 2 pages after reload');
283288

284-
% Clean up temp file
289+
% Clean up
290+
SensorRegistry.unregister('T-401');
291+
SensorRegistry.unregister('P-201');
292+
SensorRegistry.unregister('F-301');
285293
delete(jsonPath);
286294
fprintf('Temp file cleaned up.\n');
287295

libs/Dashboard/DashboardTheme.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@
117117
d.GridLineColor = [0.82 0.82 0.82];
118118
end
119119

120+
% Axis label/tick color — derive from toolbar font (readable on widget bg)
121+
if ~isfield(d, 'AxisColor')
122+
d.AxisColor = d.ToolbarFontColor;
123+
end
124+
120125
% Shared defaults across all presets
121126
d.WidgetBorderWidth = 1;
122127
d.HeaderFontSize = 14;

libs/FastSense/mksqlite.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "sqlite3.h"
2222
#include <string.h>
2323
#include <stdlib.h>
24+
#include <stdint.h>
2425

2526
/* ---- Constants ---- */
2627
#define MAX_DBS 16

0 commit comments

Comments
 (0)