|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
A new build's first start, kept once the panel works as a whole: see panel_trial.h and shared/fwupdate/fw_trial.h. More...
#include "panel_trial.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include "esp_log.h"#include "fw_ota.h"#include "fw_trial.h"#include "panel.h"#include "panel_main.h"#include "rcbench_version.h"#include "ui_screen.h"#include "ui_text.h"Functions | |
| static void | report (fw_boot_t r, const char *other) |
| The band's line for what the start check found. On the splash it waits in s_boot_alert for the hand-over; after it, it shows at once. | |
| static fw_boot_t | check (bool ui_up) |
| Run the start check and report it. | |
| void | panel_trial_begin (bool ui_up) |
| Settle the start's check at the display and touch step. | |
| void | panel_trial_mark (uint32_t steps) |
| Record start-up steps (FW_TRIAL_CARD, FW_TRIAL_SETTINGS) from app_main. | |
| static void | name_missing (uint32_t missing, char *out, size_t cap) |
| The steps not seen, by name, for the console. | |
| void | panel_trial_frame (bool flushed, bool quiet) |
| Once per pass of the screen loop, after the flip: keep the build when fw_trial_poll() says so. | |
Variables | |
| static const char * | TAG = "rcbench" |
| The console tag the panel's start-up lines carry. | |
| atomic_bool | s_trial_control_ran |
| The control task finished one pass; set by that task. | |
| atomic_bool | s_trial_logger_ran |
| The logger task finished one pass; set by that task. | |
| static fw_trial_t | s_trial |
| This start's trial; app_main's task only: bring_up(), app_main and the screen loop. | |
A new build's first start, kept once the panel works as a whole: see panel_trial.h and shared/fwupdate/fw_trial.h.
bring_up() settles the check at the display and touch step: without either, a trial start goes back at once. With both up the trial stays open through the card, the settings, the control and logger tasks and the first frame, and the screen loop keeps the build from panel_trial_frame(). A panic or reset before that starts the build before it.
Built with -D RCBENCH_TRIAL_CRASH=ON, a trial start aborts at the moment it would be kept, before the check and before any line that says it was kept, for a check on the bench that a start which fails late goes back. A start that is no trial runs as any other.
SPDX-License-Identifier: MIT
|
static |
Run the start check and report it.
| ui_up | Whether the display and touch came up. |
|
static |
The steps not seen, by name, for the console.
| missing | FW_TRIAL_* bits. |
| out | Where the names go. |
| cap | Bytes at out. |
| void panel_trial_begin | ( | bool | ui_up | ) |
Settle the start's check at the display and touch step.
Without the display or touch (ui_up false) a trial start goes back to the build before it here and does not return. A start that is no trial is settled here too: the band's line for a build that went back. A trial start with both up stays on trial until panel_trial_frame() keeps it.
| ui_up | Whether the display and touch came up. |
| void panel_trial_frame | ( | bool | flushed, |
| bool | quiet ) |
Once per pass of the screen loop, after the flip: keep the build when fw_trial_poll() says so.
| flushed | Whether this pass's frame reached the display. |
| quiet | Whether the bench can take a flash write now (flash_gate_open(), as the settings save asks). |
| void panel_trial_mark | ( | uint32_t | steps | ) |
Record start-up steps (FW_TRIAL_CARD, FW_TRIAL_SETTINGS) from app_main.
| steps | One or more FW_TRIAL_* steps. |
|
static |
The band's line for what the start check found. On the splash it waits in s_boot_alert for the hand-over; after it, it shows at once.
| r | The check's result. |
| other | The written build's version, for FW_BOOT_ROLLED_BACK. |