mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-08-01 16:58:06 +00:00
Trimming reclaims blank margins but cannot compact a layout that genuinely spans the display — a five-column forecast, a progress bar drawn at 100% width, a stat block with the panel's whole width between its elements. Those need the plugin to make different layout decisions, which means telling it the screen is narrower while it renders. DisplayManager.render_size() presents a smaller logical canvas for the duration of a Vegas content fetch, reusing the same _LogicalMatrix indirection double-sided mode already relies on so plugins see a consistent size from every accessor. Plugins that size themselves from matrix.width need no changes at all; one that wants to be explicit can read the new BasePlugin.get_vegas_render_width(). Width is a percentage so a single setting travels across panel sizes: vegas_scroll.render_width_pct globally, or vegas_width_pct in an individual plugin's config. Measured on a 512x64 panel with real data: ledmatrix-weather 1536px -> 576px (forecast becomes narrow cards) youtube-stats 353px -> 199px (2% blank left, so genuinely compact) geochron 453px -> 153px (ink density rises to 100%) ledmatrix-flights 950px -> 740px The youtube-stats figure is the clearest evidence the layout itself changed rather than being cropped: at full width the content had to be trimmed from 512px to 353px, whereas at 40% it arrives with almost no blank to reclaim. Row spacing is now measured rather than added. A flat gap gets it wrong in both directions at once — content drawn flush to its own edges ends up nearly touching (reported for recent sports scores, which sat 8px apart), while content already carrying wide margins gets pushed even further out. separation_gap() measures the blank each pair already has and adds only the shortfall, up to min_content_separation (default 24). intra_plugin_gap stays as a floor applied regardless. Two tests shipped in the previous commit encoded the old flat-gap arithmetic and are updated to the measured semantics, including one renamed to reflect that zero intra_plugin_gap alone no longer butts rows together. Also fixes a real bug found while testing: the harness display manager had no render_size(), and because the adapter catches broadly that surfaced as "no content" rather than an error, silently dropping five plugins. Added the context to VisualTestDisplayManager for parity, and _render_at() now degrades to a no-op on any display manager lacking it, so a third-party or older harness loses the narrowing rather than the content. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ
164 lines
4.5 KiB
JSON
164 lines
4.5 KiB
JSON
{
|
|
"web_display_autostart": true,
|
|
"schedule": {
|
|
"enabled": false,
|
|
"mode": "per-day",
|
|
"start_time": "07:00",
|
|
"end_time": "23:00",
|
|
"days": {
|
|
"monday": {
|
|
"enabled": false,
|
|
"start_time": "07:00",
|
|
"end_time": "23:00"
|
|
},
|
|
"tuesday": {
|
|
"enabled": false,
|
|
"start_time": "07:00",
|
|
"end_time": "23:00"
|
|
},
|
|
"wednesday": {
|
|
"enabled": false,
|
|
"start_time": "07:00",
|
|
"end_time": "23:00"
|
|
},
|
|
"thursday": {
|
|
"enabled": false,
|
|
"start_time": "07:00",
|
|
"end_time": "23:00"
|
|
},
|
|
"friday": {
|
|
"enabled": false,
|
|
"start_time": "07:00",
|
|
"end_time": "23:00"
|
|
},
|
|
"saturday": {
|
|
"enabled": false,
|
|
"start_time": "07:00",
|
|
"end_time": "23:00"
|
|
},
|
|
"sunday": {
|
|
"enabled": false,
|
|
"start_time": "07:00",
|
|
"end_time": "23:00"
|
|
}
|
|
}
|
|
},
|
|
"dim_schedule": {
|
|
"enabled": false,
|
|
"dim_brightness": 30,
|
|
"mode": "global",
|
|
"start_time": "20:00",
|
|
"end_time": "07:00",
|
|
"days": {
|
|
"monday": {
|
|
"enabled": false,
|
|
"start_time": "20:00",
|
|
"end_time": "07:00"
|
|
},
|
|
"tuesday": {
|
|
"enabled": false,
|
|
"start_time": "20:00",
|
|
"end_time": "07:00"
|
|
},
|
|
"wednesday": {
|
|
"enabled": false,
|
|
"start_time": "20:00",
|
|
"end_time": "07:00"
|
|
},
|
|
"thursday": {
|
|
"enabled": false,
|
|
"start_time": "20:00",
|
|
"end_time": "07:00"
|
|
},
|
|
"friday": {
|
|
"enabled": false,
|
|
"start_time": "20:00",
|
|
"end_time": "07:00"
|
|
},
|
|
"saturday": {
|
|
"enabled": false,
|
|
"start_time": "20:00",
|
|
"end_time": "07:00"
|
|
},
|
|
"sunday": {
|
|
"enabled": false,
|
|
"start_time": "20:00",
|
|
"end_time": "07:00"
|
|
}
|
|
}
|
|
},
|
|
"timezone": "America/New_York",
|
|
"location": {
|
|
"city": "Tampa",
|
|
"state": "Florida",
|
|
"country": "US"
|
|
},
|
|
"display": {
|
|
"hardware": {
|
|
"rows": 32,
|
|
"cols": 64,
|
|
"chain_length": 2,
|
|
"parallel": 1,
|
|
"brightness": 90,
|
|
"hardware_mapping": "adafruit-hat",
|
|
"scan_mode": 0,
|
|
"pwm_bits": 9,
|
|
"pwm_dither_bits": 1,
|
|
"pwm_lsb_nanoseconds": 130,
|
|
"disable_hardware_pulsing": false,
|
|
"inverse_colors": false,
|
|
"show_refresh_rate": false,
|
|
"led_rgb_sequence": "RGB",
|
|
"limit_refresh_rate_hz": 100
|
|
},
|
|
"runtime": {
|
|
"gpio_slowdown": 3,
|
|
"rp1_rio": 0
|
|
},
|
|
"double_sided": {
|
|
"enabled": false,
|
|
"copies": 2,
|
|
"axis": "horizontal"
|
|
},
|
|
"display_durations": {},
|
|
"plugin_rotation_order": [],
|
|
"use_short_date_format": true,
|
|
"vegas_scroll": {
|
|
"enabled": false,
|
|
"scroll_speed": 50,
|
|
"separator_width": 32,
|
|
"plugin_order": [],
|
|
"excluded_plugins": [],
|
|
"target_fps": 125,
|
|
"buffer_ahead": 2,
|
|
"intra_plugin_gap": 8,
|
|
"render_width_pct": 100,
|
|
"min_content_separation": 24,
|
|
"auto_trim": true,
|
|
"trim_threshold": 10,
|
|
"content_padding": 8,
|
|
"min_plugin_width": 8,
|
|
"lead_in_width": 0,
|
|
"plugins_per_cycle": 6,
|
|
"max_plugin_width_ratio": 3.0,
|
|
"dynamic_duration_enabled": true,
|
|
"min_cycle_duration": 60,
|
|
"max_cycle_duration": 240
|
|
}
|
|
},
|
|
"sync": {
|
|
"role": "standalone",
|
|
"port": 5765,
|
|
"follower_position": "left"
|
|
},
|
|
"plugin_system": {
|
|
"plugins_directory": "plugin-repos",
|
|
"auto_discover": true,
|
|
"auto_load_enabled": true
|
|
},
|
|
"web-ui-info": {
|
|
"enabled": true,
|
|
"display_duration": 10
|
|
}
|
|
}
|