19#ifndef THROTTLESCREEN_H
20#define THROTTLESCREEN_H
24#include <DCCEXProtocol.h>
33 ThrottleScreen(DCCEXProtocol *dccexProtocolClient, uint8_t throttleStep, uint8_t throttleStepFaster,
34 uint8_t throttleStepFastest);
UserConfirmationAction
User confirmation action data types available.
Definition UserConfirmationInterface.h:23
UserSelectionAction
User selection action data types available.
Definition UserSelectionInterface.h:23
Interface class to abstract construction of what is displayed on screen from the physical implementat...
Definition DisplayInterface.h:29
Definition ScreenInterface.h:27
Definition ThrottleScreen.h:26
void _toggleLights()
Toggle lights (assumed to be F0) on/off.
Definition ThrottleScreen.cpp:197
void _toggleTrackPower()
Toggle track power state - if unknown, turn on.
Definition ThrottleScreen.cpp:189
bool _directionChanged
Definition ThrottleScreen.h:74
void trackPowerUpdateReceived(TrackPower trackPower)
Method to call when a track power update has been received.
Definition ThrottleScreen.cpp:178
bool _speedChanged
Definition ThrottleScreen.h:72
DCCEXProtocol * _dccexProtocolClient
Definition ThrottleScreen.h:78
void requestLocoUpdate()
Explicitly request an update for the currently selected loco address.
Definition ThrottleScreen.cpp:185
uint8_t _speed
Definition ThrottleScreen.h:71
void setLoco(Loco *loco)
Set the loco currently being operated.
Definition ThrottleScreen.cpp:160
void locoBroadcastReceived(LocoBroadcast locoBroadcast)
Method to call when a loco broadcast has been received.
Definition ThrottleScreen.cpp:162
TrackPower _trackPower
Definition ThrottleScreen.h:76
void handleUserConfirmationAction(UserConfirmationAction action) override
Implement this method to define what to do when user confirmation actions are performed.
Definition ThrottleScreen.cpp:37
uint8_t _throttleStepFastest
Definition ThrottleScreen.h:81
Direction _direction
Definition ThrottleScreen.h:73
void drawScreen(DisplayInterface *display) override
Implement this method to draw the associated screen object on the specified display.
Definition ThrottleScreen.cpp:144
bool _trackPowerChanged
Definition ThrottleScreen.h:77
Loco * _loco
Definition ThrottleScreen.h:75
uint8_t _throttleStepFaster
Definition ThrottleScreen.h:80
uint8_t getSpeed()
Get the current speed.
Definition ThrottleScreen.cpp:176
void handleUserSelectionAction(UserSelectionAction action, bool throttleInverted) override
Implement this method to define what to do when user selection actions are performed.
Definition ThrottleScreen.cpp:68
void requestTrackPowerUpdate()
Explicitly request a track power update (actually sends for server version which does this)
Definition ThrottleScreen.cpp:187
unsigned long _lastSpeedUpdate
Definition ThrottleScreen.h:83
uint8_t _throttleStep
Definition ThrottleScreen.h:79
unsigned long _speedUpdateDelay
Definition ThrottleScreen.h:82
Structure for data from a Loco broadcast.
Definition EventStructure.h:42