Skip to content

Add WeatherStar 4000 console display renderer#5

Open
devp wants to merge 6 commits intomainfrom
claude/weatherstar-console-display-XgJ7t
Open

Add WeatherStar 4000 console display renderer#5
devp wants to merge 6 commits intomainfrom
claude/weatherstar-console-display-XgJ7t

Conversation

@devp
Copy link
Copy Markdown
Owner

@devp devp commented Feb 8, 2026

Portable C program that renders a classic Weather Channel "Local on the
8s" screen using ANSI 24-bit color escape codes. Includes a 5x7 bitmap
font, framebuffer-based drawing, and PNG screenshot output via libpng.

No GUI, no heavy runtimes — just gcc, libpng, and a terminal.

https://claude.ai/code/session_012KpuXnB1cGuo1YehDfp5AH

promote my doc review prompts

improve my main CODER prompt

commit wip FINDER prompt
devp and others added 4 commits February 21, 2026 16:39
Portable C program that renders a classic Weather Channel "Local on the
8s" screen using ANSI 24-bit color escape codes.  Includes a 5x7 bitmap
font, framebuffer-based drawing, and PNG screenshot output via libpng.

No GUI, no heavy runtimes — just gcc, libpng, and a terminal.

https://claude.ai/code/session_012KpuXnB1cGuo1YehDfp5AH
Split the monolithic weatherstar.c into focused modules:
- fb.h: framebuffer types, palette, drawing primitives
- font.h: 5x7 bitmap font data and text rendering
- icons.h: weather icon drawing (sun, cloud)
- display.h: WeatherStar 4000 screen layout composition
- screenshot.h: PNG output (libpng) and ANSI terminal output
- main.c: entry point and CLI parsing

Still compiles as a single translation unit (gcc main.c) — no
multi-object build complexity.

Remove redundant weatherstar.sh wrapper; Makefile is sufficient.

Bug fixes and improvements:
- Fix memory leak: row buffer leaked on libpng longjmp error path
  (allocate before setjmp so it can be freed in the error handler)
- Fix rounded-rect corner clearing: use integer distance² comparison
  instead of sqrtf — faster and avoids float-to-int edge cases
- Centralise background gradient into fb_bg_at() helper to eliminate
  duplicated interpolation code across 4 corner branches
- Buffer ANSI output per-line instead of per-pixel printf (10x fewer
  syscalls, ~3.6 MB output now written in 200 fwrite calls vs 128k)
- Add null checks for png_create_write_struct / png_create_info_struct

https://claude.ai/code/session_012KpuXnB1cGuo1YehDfp5AH
@devp devp force-pushed the claude/weatherstar-console-display-XgJ7t branch from fce7886 to 825abee Compare February 21, 2026 21:39
Design doc for a family dashboard on Pi Zero W: rotating slides
rendered with Pillow, blitted directly to /dev/fb0 via mmap.
Weather is the first slide, co-located with Pi-hole.

https://claude.ai/code/session_012KpuXnB1cGuo1YehDfp5AH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants