|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
PICK A PIN's drawing: the board, its buttons and marks, the head with the protocol list's face, the PINS and IN USE tables and the open list. picker_screen.c holds the state, the touch handling and the screen's interface (picker_screen.h); picker_geometry.c says where things sit; picker_screen_int.h is what the three share. More...
#include <stdio.h>#include <string.h>#include "board_drawing.h"#include "link_pages.h"#include "outputs_screen.h"#include "outputs_screen_int.h"#include "picker_port.h"#include "picker_screen.h"#include "port_view.h"#include "ui_pinlist.h"#include "ui_text.h"#include "ui_theme.h"#include "ui_widgets.h"#include "picker_screen_int.h"Functions | |
| static void | draw_board (gfx_canvas_t *c) |
| The board itself: the IOmcu's drawing, or its outline and pads. | |
| static void | cross (gfx_canvas_t *c, int x, int y, gfx_color_t col, int r, int w) |
| A cross with a dark halo, on a pad that has no button. | |
| static void | trace (gfx_canvas_t *c, int x, int y0, int y1, gfx_color_t col) |
Draws a vertical trace from y0 to y1 at column x with a dark halo. | |
| static void | disc (gfx_canvas_t *c, int x, int y, int r, gfx_color_t col) |
| A disc with a dark ring, as a rounded square so the fit check sees the shape the label sits on. | |
| static void | draw_pads_that_are_not_pins (gfx_canvas_t *c) |
| The grounds and the rails, marked inside the board on a short trace; RUN and the enable crossed dim on the pad. | |
| static void | draw_buttons (gfx_canvas_t *c) |
| Draws the pin buttons of both tiers, the picked ones lit. | |
| static void | draw_head (gfx_canvas_t *c) |
| Above the PINS table: the protocol list's face, the count, the reason. | |
| static void | draw_mine (gfx_canvas_t *c) |
| The left column: what this protocol holds, in channel order, with the pad number printed on the board beside each. | |
| static uint8_t | use_add (picker_use_t *t, uint8_t n, picker_use_kind_t kind, uint8_t proto, uint8_t gpio, int8_t channel) |
| A line of the IN USE table, its box not yet placed. | |
| static uint8_t | in_use (picker_use_t t[PICKER_USE_MAX]) |
| The IN USE table: the programming port's pin first, because a pin the port drives is the one a lead must not go on without knowing; then what SETUP > INTERFACES holds, for the same reason; then the pins other protocols hold, groups in the order their first pin falls, so the channels count down the page rather than jumping about with the protocol numbering. Returns the number of lines. | |
| bool | picker_screen_in_use (uint8_t k, picker_use_t *out) |
| static void | draw_theirs (gfx_canvas_t *c) |
| The right column: the programming port's pin, then pins another protocol holds, and which one. | |
| static void | draw_list (gfx_canvas_t *c) |
| Draws the open protocol list with its PROG PORT entries. | |
| void | pk_render (gfx_canvas_t *c, int buffer_index) |
Draws the screen into frame buffer buffer_index. | |
PICK A PIN's drawing: the board, its buttons and marks, the head with the protocol list's face, the PINS and IN USE tables and the open list. picker_screen.c holds the state, the touch handling and the screen's interface (picker_screen.h); picker_geometry.c says where things sit; picker_screen_int.h is what the three share.
SPDX-License-Identifier: MIT
|
static |
The grounds and the rails, marked inside the board on a short trace; RUN and the enable crossed dim on the pad.
A servo lead has three wires and the buttons describe one of them. These are the other two, and they go inside the outline because that is the only room left: the space beside the board is the buttons', and a mark on the pad itself would be under 40 pixels like the pad is.
| bool picker_screen_in_use | ( | uint8_t | k, |
| picker_use_t * | out ) |
Line k of the IN USE table; false past the last.
| void pk_render | ( | gfx_canvas_t * | c, |
| int | buffer_index ) |
Draws the screen into frame buffer buffer_index.
| c | canvas drawn on |
| buffer_index | the frame buffer |