Frontend  0.5.1
Loading...
Searching...
No Matches
Constants

The app uses a lot of constants which are listed here in no particular order.

Controller Size

The controller size is the size of the controller widgets on larger screens. In !kIsWeb builds, this value is also used to set the minimum window size.

Current Limits

The four current limits are part of the firmware settings. The index of the current value ​​can be read or written as cur_lim at the /settings/ endpoint.

DCC BiDi Durations

The five DCC BiDi durations are part of the firmware settings. Using the first value (0) BiDi can be switched off. The current value ​​can be read or written as dcc_bidibit_dur at the /settings/ endpoint.

DCC Programming Types

The four DCC programming types are part of the firmware settings. The index of the current value ​​can be read or written as dcc_prog_type at the /settings/ endpoint.

Fake Initial CVs

Fake Initial Loco CVs

A list of initial CVs for locomotives for use with fake services.

Fake Initial Accessory CVs

A list of initial CVs for accessories for use with fake services.

Fake Services Provider Container

This is a global container for providers. Please not that this is bad practice, but we need a common provider container for all fake services. This is the only way we can inject this container to fake services as well as the entire widget tree.

When faking services this container gets injected into runApp.

// Expose global `ProviderContainer` to widget tree for fake services
if (const String.fromEnvironment('OPENREMISE_FRONTEND_FAKE_SERVICES') ==
'true') {
runApp(
UncontrolledProviderScope(
child: const MyApp(),
),
);
}
Definition main.dart:92
final fakeServicesProviderContainer
Fake services provider container.
Definition fake_services_provider_container.dart:47

See also #295 and #1387.

Key Codes

The KeyCodes class contains constant integer values ​​that are used when controller buttons are pressed. The values have the following scheme:

  • <0 for special inputs
  • 0-63 for the function keys
  • 100-109 for long presses of the function keys

OpenRemise Icons

An icon set with specific OpenRemise icons created using fluttericon.com.

Small Screen Width

This is the width over which a large screen is assumed. The app changes its layout depending on the screen size. This value is therefore often compared to MediaQuery.of(context).size.width.

Turnout Map

turnoutMap maps the type enumeration of turnouts to their assets. This allows the app to display the correct asset for the state based on the turnout positions.

WebSocket Batch Size

This is the maximum number of WebSocket messages grouped and sent at once.

Warning
Extreme caution is advised when increasing this value. Many small messages Many small packets quickly overload the input buffers of the ESP32.

See also #45.

ZIMO

MS Decoder IDs

A (not complete) list of ZIMO MS decoder IDs. This list is used exclusively for fake services.

MX Decoder IDs

A list of ZIMO MX decoder IDs.

Previous Next
Models Utilities