feat(brand): AP SSID WeVisto-XXXX + logo placeholder + 4-step copy
Rename the AP broadcast SSID from PictureFrame-XXXX to WeVisto-XXXX
(operation.h:ap_ssid_from_mac + main.cpp:enter_provisioning). Tests
updated to match.
Setup screens (both panels):
- Top-right header chip replaced with a draw_logo_placeholder() box —
a 'WeVisto' text mark with a 'PLACEHOLDER' subtitle. When the real
brand asset lands, swap the function for a paste of the file at the
same coordinates; no layout change needed.
- Step list rewritten to Matt's spec (4 steps, not 5):
1. Turn on your WeVisto
2. Unlock your phone
3. Scan QR 1 — This will connect your phone to the WeVisto
4. Scan QR 2 — This will open the WeVisto setup page
Step 5 (type WiFi password) lived only in the on-panel guide; the
user does that on the phone via the captive portal, where the
prompt is already explicit.
- Regenerated both panels' setup_bg / ap_bg / ap_bg_retry assets via
the gen_screens scripts.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+41
-18
@@ -120,17 +120,42 @@ def draw_qr_frame(draw, qx, qy, qp, accent):
|
||||
draw.rectangle([qx - 4, qy - 4, qx + qp + 3, qy + qp + 3], outline=BK, width=4)
|
||||
|
||||
|
||||
def draw_header(draw, accent, header_text, ssid_text):
|
||||
"""Yellow/red band along the top with a section title + SSID chip."""
|
||||
def draw_header(draw, accent, header_text):
|
||||
"""Coloured band along the top with section title on the left. Logo
|
||||
placeholder is rendered separately by draw_logo_placeholder() so the
|
||||
brand mark sits in the top right of every setup screen."""
|
||||
draw.rectangle([0, 0, W - 1, HEADER_H - 1], fill=accent)
|
||||
draw.text((LEFT_PAD, 40), header_text, font=F_BAR, fill=BK)
|
||||
|
||||
if ssid_text:
|
||||
bb = draw.textbbox((0, 0), ssid_text, font=F_CHIP)
|
||||
chip_w = bb[2] - bb[0] + 36
|
||||
chip_x = W - chip_w - LEFT_PAD
|
||||
draw.rectangle([chip_x, 25, chip_x + chip_w, HEADER_H - 25], fill=BK)
|
||||
draw.text((chip_x + 18, 38), ssid_text, font=F_CHIP, fill=accent)
|
||||
|
||||
# ── Logo placeholder ─────────────────────────────────────────────────────────
|
||||
# Box dimensions for the top-right placeholder. When the real brand mark
|
||||
# lands, replace draw_logo_placeholder() with a paste of assets/logo.png
|
||||
# (or similar) at these same coordinates so the layout stays stable.
|
||||
LOGO_W = 300
|
||||
LOGO_H = 92
|
||||
LOGO_X = W - LOGO_W - LEFT_PAD # 864
|
||||
LOGO_Y = (HEADER_H - LOGO_H) // 2 # 19
|
||||
|
||||
def draw_logo_placeholder(img):
|
||||
"""White rounded-look box with 'WeVisto' brand text in the top right of
|
||||
the header. Stand-in for the real logo — same position will be reused."""
|
||||
draw = ImageDraw.Draw(img)
|
||||
draw.rectangle([LOGO_X, LOGO_Y, LOGO_X + LOGO_W - 1, LOGO_Y + LOGO_H - 1], fill=WH)
|
||||
draw.rectangle([LOGO_X, LOGO_Y, LOGO_X + LOGO_W - 1, LOGO_Y + LOGO_H - 1],
|
||||
outline=BK, width=4)
|
||||
|
||||
f_logo = ttf("DejaVuSans-Bold.ttf", 44)
|
||||
bb = draw.textbbox((0, 0), "WeVisto", font=f_logo)
|
||||
tw = bb[2] - bb[0]
|
||||
draw.text((LOGO_X + (LOGO_W - tw) // 2, LOGO_Y + 12), "WeVisto",
|
||||
font=f_logo, fill=BK)
|
||||
|
||||
f_hint = ttf("DejaVuSans-Bold.ttf", 14)
|
||||
bb = draw.textbbox((0, 0), "PLACEHOLDER", font=f_hint)
|
||||
pw = bb[2] - bb[0]
|
||||
draw.text((LOGO_X + (LOGO_W - pw) // 2, LOGO_Y + LOGO_H - 22),
|
||||
"PLACEHOLDER", font=f_hint, fill=BK)
|
||||
|
||||
|
||||
def draw_divider(draw):
|
||||
@@ -256,10 +281,8 @@ def gen_ap(accent=YL,
|
||||
img = Image.new("RGB", (W, H), WH)
|
||||
draw = ImageDraw.Draw(img)
|
||||
|
||||
# Universal brand chip — firmware doesn't write text into static .bin
|
||||
# assets, so leaving a per-device SSID placeholder here would lie on
|
||||
# every other unit. Same image for every frame.
|
||||
draw_header(draw, accent, header_text, "PICTUREFRAME")
|
||||
draw_header(draw, accent, header_text)
|
||||
draw_logo_placeholder(img)
|
||||
draw_divider(draw)
|
||||
|
||||
# ── LEFT COLUMN ──────────────────────────────────────────────────────────
|
||||
@@ -275,11 +298,10 @@ def gen_ap(accent=YL,
|
||||
# 5 numbered steps — same instructions as the 7.3" but with the larger
|
||||
# type that fits comfortably on a 13.3" portrait body.
|
||||
steps = [
|
||||
("Plug in the frame", ""),
|
||||
("Unlock your phone", ""),
|
||||
("Scan QR 1", "joins your phone to PictureFrame"),
|
||||
("Scan QR 2", "opens the setup page"),
|
||||
("Type your home WiFi", "password and tap Connect"),
|
||||
("Turn on your WeVisto", ""),
|
||||
("Unlock your phone", ""),
|
||||
("Scan QR 1", "This will connect your phone to the WeVisto"),
|
||||
("Scan QR 2", "This will open the WeVisto setup page"),
|
||||
]
|
||||
step_y0 = head_y + 240
|
||||
step_pitch = 92
|
||||
@@ -375,7 +397,8 @@ def gen_setup():
|
||||
img = Image.new("RGB", (W, H), WH)
|
||||
draw = ImageDraw.Draw(img)
|
||||
|
||||
draw_header(draw, GR, "WIFI CONNECTED — STEP 2 OF 2", "192.168.x.x")
|
||||
draw_header(draw, GR, "WIFI CONNECTED — STEP 2 OF 2")
|
||||
draw_logo_placeholder(img)
|
||||
|
||||
# Centered heading
|
||||
text_center(draw, W // 2, BODY_Y + 30, "Almost ready", F_HEAD, BK)
|
||||
|
||||
Reference in New Issue
Block a user