Operates the given locomotive.
Namespace: XpressnetLibAssembly: XpressnetLib (in XpressnetLib.dll) Version: 0.1.4195.39796
Syntax
C# |
---|
public bool LocoSetSpeedAndDirection(
int locoAddr,
int steps,
int speed,
bool direction
) |
Visual C++ |
---|
public:
bool LocoSetSpeedAndDirection(
int locoAddr,
int steps,
int speed,
bool direction
) |
Parameters
- locoAddr
- Type: System..::..Int32
Locomotive address
- steps
- Type: System..::..Int32
Speed steps to use (this must comply with the decoder setting, otherwise it can cause erratic behavior)
- speed
- Type: System..::..Int32
Speed of the locomotive (0 = stop, 1 = emergency stop, 2+ movement)
- direction
- Type: System..::..Boolean
Direction of travel (true = forward)
Return Value
True if the command has been successfully processed by the command station.
See Also