#include <ThrottleScreen.h>
◆ ThrottleScreen()
ThrottleScreen::ThrottleScreen |
( |
DCCEXProtocol * |
dccexProtocolClient, |
|
|
uint8_t |
throttleStep, |
|
|
uint8_t |
throttleStepFaster, |
|
|
uint8_t |
throttleStepFastest |
|
) |
| |
Constructor for the throttle screen, requires throttle step values.
- Parameters
-
dccexProtocolClient | Pointer to the DCCEXProtocol client connection in use by the application |
throttleStep | Normal throttle step change |
throttleStepFaster | Faster throttle step change (eg. rotary encoder moves faster) |
throttleStepFastest | Fastest throttle step change (eg. rotary encoder moves fastest) |
◆ _toggleLights()
void ThrottleScreen::_toggleLights |
( |
| ) |
|
|
private |
Toggle lights (assumed to be F0) on/off.
◆ _toggleTrackPower()
void ThrottleScreen::_toggleTrackPower |
( |
| ) |
|
|
private |
Toggle track power state - if unknown, turn on.
◆ drawScreen()
Implement this method to draw the associated screen object on the specified display.
- Parameters
-
display | Pointer to the display object |
Implements ScreenInterface.
◆ getSpeed()
uint8_t ThrottleScreen::getSpeed |
( |
| ) |
|
Get the current speed.
- Returns
- Speed
◆ handleUserConfirmationAction()
Implement this method to define what to do when user confirmation actions are performed.
- Parameters
-
action | UserConfirmationAction::[None|SingleClick|DoubleClick|LongPress] |
Implements ScreenInterface.
◆ handleUserSelectionAction()
void ThrottleScreen::handleUserSelectionAction |
( |
UserSelectionAction |
action, |
|
|
bool |
throttleInverted |
|
) |
| |
|
overridevirtual |
Implement this method to define what to do when user selection actions are performed.
- Parameters
-
action | UserSelectionAction::[None|Up|UpFaster|UpFastest|Down|DownFaster|DownFastest] |
Implements ScreenInterface.
◆ locoBroadcastReceived()
void ThrottleScreen::locoBroadcastReceived |
( |
LocoBroadcast |
locoBroadcast | ) |
|
Method to call when a loco broadcast has been received.
- Parameters
-
locoBroadcast | LocoBroadcast data structure containing address, speed, direction, and function map |
◆ requestLocoUpdate()
void ThrottleScreen::requestLocoUpdate |
( |
| ) |
|
Explicitly request an update for the currently selected loco address.
◆ requestTrackPowerUpdate()
void ThrottleScreen::requestTrackPowerUpdate |
( |
| ) |
|
Explicitly request a track power update (actually sends for server version which does this)
◆ setLoco()
void ThrottleScreen::setLoco |
( |
Loco * |
loco | ) |
|
Set the loco currently being operated.
- Parameters
-
loco | Pointer to the loco object |
◆ trackPowerUpdateReceived()
void ThrottleScreen::trackPowerUpdateReceived |
( |
TrackPower |
trackPower | ) |
|
Method to call when a track power update has been received.
- Parameters
-
trackPower | Track power state |
◆ _dccexProtocolClient
DCCEXProtocol* ThrottleScreen::_dccexProtocolClient |
|
private |
◆ _direction
Direction ThrottleScreen::_direction |
|
private |
◆ _directionChanged
bool ThrottleScreen::_directionChanged |
|
private |
◆ _lastSpeedUpdate
unsigned long ThrottleScreen::_lastSpeedUpdate |
|
private |
◆ _loco
Loco* ThrottleScreen::_loco |
|
private |
◆ _speed
uint8_t ThrottleScreen::_speed |
|
private |
◆ _speedChanged
bool ThrottleScreen::_speedChanged |
|
private |
◆ _speedUpdateDelay
unsigned long ThrottleScreen::_speedUpdateDelay |
|
private |
◆ _throttleStep
uint8_t ThrottleScreen::_throttleStep |
|
private |
◆ _throttleStepFaster
uint8_t ThrottleScreen::_throttleStepFaster |
|
private |
◆ _throttleStepFastest
uint8_t ThrottleScreen::_throttleStepFastest |
|
private |
◆ _trackPower
TrackPower ThrottleScreen::_trackPower |
|
private |
◆ _trackPowerChanged
bool ThrottleScreen::_trackPowerChanged |
|
private |
The documentation for this class was generated from the following files: