My Project
Loading...
Searching...
No Matches
MCLocoAction.h
Go to the documentation of this file.
1#pragma once
2
3#include <Arduino.h>
4
5#include "MCChannel.h"
6
7// Loco action
9{
10 public:
11 MCLocoAction(MCChannel *channel, int16_t targetPerc, HubLedColor color);
12
14
15 int16_t GetTargetPowerPerc();
16
18
19 private:
20 // Holds the target channel.
21 MCChannel *_channel;
22
23 // Holds the target power percentage to apply to the port.
24 int16_t _targetPerc;
25
26 // Holds the requested color for the onboard hub's LED.
27 HubLedColor _hubLedColor = HubLedColor::NONE;
28};
Definition MCChannel.h:7
Definition MCLocoAction.h:9
int16_t GetTargetPowerPerc()
Definition MCLocoAction.cpp:11
MCLocoAction(MCChannel *channel, int16_t targetPerc, HubLedColor color)
Definition MCLocoAction.cpp:3
MCChannel * GetChannel()
Definition MCLocoAction.cpp:6
HubLedColor GetColor()
Definition MCLocoAction.cpp:16
HubLedColor
Definition enums.h:40
@ NONE
Definition enums.h:53