Adds a "2. CONFIGURATION" step alongside WiFi setup: a second QR code linking straight to the captive portal page (http://<ap-ip>/), for anyone who's joined the AP but wants a one-scan shortcut to the config form instead of relying on the captive-portal popup. The AP netif is now created (but not started) before the display renders, since the AP's IP is fixed at netif creation and needed for this QR before the network is actually up. Pulls the pixel/text drawing primitives (previously private to qr_onboarding.c) out into epd_draw.c/.h so the upcoming status screen can reuse them instead of duplicating.
26 lines
997 B
C
26 lines
997 B
C
#pragma once
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
#include "epd7in3e.h"
|
|
#include "fonts.h"
|
|
|
|
/** Sets one pixel in a malloc'd EPD_FRAME_BYTES buffer (packed 2px/byte, per epd7in3e.h). */
|
|
void epd_draw_pixel(uint8_t *frame, int x, int y, epd_color_t color);
|
|
|
|
/**
|
|
* Draws text (uppercased) in the given sFONT (see components/epaper_fonts)
|
|
* with its top-left corner at (origin_x, origin_y).
|
|
*/
|
|
void epd_draw_text(uint8_t *frame, const sFONT *font, const char *text, int origin_x, int origin_y);
|
|
|
|
/** Same as epd_draw_text(), but horizontally centered on center_x. */
|
|
void epd_draw_text_centered(uint8_t *frame, const sFONT *font, const char *text, int center_x, int y);
|
|
|
|
/** Draws a line of the given thickness (in pixels) between two points. */
|
|
void epd_draw_line(uint8_t *frame, int x0, int y0, int x1, int y1, int thickness);
|
|
|
|
/** Draws a checkmark (short down-stroke, long up-stroke) inside a size x size box at (x, y). */
|
|
void epd_draw_checkmark(uint8_t *frame, int x, int y, int size);
|