rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
settings_text.c File Reference

The schema's words in English: the settings' labels, help lines and option lists, from the one text table, ui_text.def (shared/text). More...

#include "settings.h"
#include "settings_opts.h"
#include "settings_sensors.h"
#include <stddef.h>

Functions

const char * settings_label (setting_id_t id)
 A setting's label in English, from ui_text.def.
const char * settings_help (setting_id_t id)
 A setting's help line in English, from ui_text.def.
int settings_option_list (setting_id_t id)
 Which option list a setting shows, so a language's options are found by it.

Variables

static const char *const k_labels [SETTING_COUNT]
 settings_opts_<name>: each option list's English.
static const char *const k_helps [SETTING_COUNT]
 The settings' help lines in English, by setting.
static const char *const *const k_lists []
 The option lists in the order of ui_text.def's UI_OPTIONS(), which a language's options follow.

Detailed Description

The schema's words in English: the settings' labels, help lines and option lists, from the one text table, ui_text.def (shared/text).

The categories' names are settings.c's. ui_text.c gives every language's.

SPDX-License-Identifier: MIT

Function Documentation

◆ settings_help()

const char * settings_help ( setting_id_t id)

A setting's help line in English, from ui_text.def.

Parameters
idThe setting.
Returns
Its help line, "" for none and for an id out of range. ui_setting_help() gives it in the language showing.

◆ settings_label()

const char * settings_label ( setting_id_t id)

A setting's label in English, from ui_text.def.

Parameters
idThe setting.
Returns
Its label; "" for an id out of range. ui_setting_label() gives it in the language showing.

◆ settings_option_list()

int settings_option_list ( setting_id_t id)

Which option list a setting shows, so a language's options are found by it.

Parameters
idThe setting.
Returns
The list's place among the UI_OPTIONS() of ui_text.def, counted from 0; -1 for a setting that is no choice and for an id out of range.

Variable Documentation

◆ k_helps

const char* const k_helps[SETTING_COUNT]
static
Initial value:
= {
}

The settings' help lines in English, by setting.

◆ k_labels

const char* const k_labels[SETTING_COUNT]
static
Initial value:
= {
}

settings_opts_<name>: each option list's English.

The settings' labels in English, by setting.

◆ k_lists

const char* const* const k_lists[]
static
Initial value:
= {
}

The option lists in the order of ui_text.def's UI_OPTIONS(), which a language's options follow.