|
LCC Fusion Project 1.0
LCC Automation
|
#include <DCCpp.hpp>

Static Public Member Functions | |
| static void | begin () |
| static void | beginMain (uint8_t inOptionalDirectionMotor, uint8_t inSignalPin, uint8_t inSignalEnablePin, uint8_t inCurrentMonitor) |
| static void | beginProg (uint8_t inOptionalDirectionMotor, uint8_t inSignalPin, uint8_t inSignalEnablePin, uint8_t inCurrentMonitor) |
| static void | beginMainDccSignal (uint8_t inSignalPin) |
| static void | beginProgDccSignal (uint8_t inSignalPin) |
| static void | setDebugDccMode () |
| static bool | IsMainTrack (volatile RegisterList *apRegs) |
| static bool | IsMainTrackDeclared () |
| static bool | IsProgTrackDeclared () |
| static void | loop () |
| static void | panicStop (bool inStop) |
| static void | powerOn (bool inMain=true, bool inProg=true) |
| static void | powerOff (bool inMain=true, bool inProg=true) |
| static byte | setAckThreshold (byte inNewValue) |
| static void | setCurrentSampleMaxMain (float inMax) |
| static void | setCurrentSampleMaxProg (float inMax) |
| static float | getCurrentMain () |
| static float | getCurrentProg () |
| static bool | setSpeedMain (int nReg, int inLocoId, int inStepsNumber, int inNewSpeed, bool inForward) |
| static int | identifyLocoIdMain () |
| static int | readCvMain (int inCvId, int callBack=100, int callBackSub=200) |
| static void | writeCvMain (int inCvId, byte inValue, int callBack=100, int callBackSub=200) |
| static void | setFunctionsMain (int nReg, int inLocoId, FunctionsState &inStates) |
| static bool | setSpeedProg (int nReg, int inLocoId, int inStepsNumber, int inNewSpeed, bool inForward) |
| static int | identifyLocoIdProg () |
| static int | readCvProg (int inCvId, int callBack=100, int callBackSub=200) |
| static bool | writeCvProg (int inCvId, byte inValue, int callBack=100, int callBackSub=200) |
| static void | setFunctionsProg (int nReg, int inLocoId, FunctionsState &inStates) |
| static void | setAccessory (int inAddress, byte inSubAddress, byte inActivate) |
| static void | showConfiguration () |
This is the main class of the library. All data and functions are static. There is no need to instantiate this class.
|
static |
|
static |
Initializes the main track.
| inOptionalDirectionMotor | Pin for the rerouting of shields direction pin, set it to UNDEFINED_PIN if not used. |
| inSignalPin | Pin for the signal pin, the one driven by an interruption, set it to UNDEFINED_PIN if not used (but the line will be always down...). |
| inSignalEnablePin | Pin for the enable/PWM pin, set it to UNDEFINED_PIN if not used. |
| inCurrentMonitor | Pin for the current monitor analog pin, set it to UNDEFINED_PIN if not used. |
Definition at line 147 of file DCCpp.cpp.


|
static |
Initializes the main track.
| inSignalPin | Pin for the signal pin, the one driven by an interruption, set it to UNDEFINED_PIN if not used (but the line will be always down...). |
Definition at line 228 of file DccSignalESP32.cpp.


|
static |
Initializes the programming track.
| inOptionalDirectionMotor | Pin for the rerouting of shields direction pin, set it to UNDEFINED_PIN if not used. |
| inSignalPin | Pin for the signal pin, the one driven by an interruption, set it to UNDEFINED_PIN if not used (but the line will be always down...). |
| inSignalEnablePin | Pin for the enable/PWM pin, set it to UNDEFINED_PIN if not used. |
| inCurrentMonitor | Pin for the current monitor analog pin, set it to UNDEFINED_PIN if not used. |
Definition at line 182 of file DCCpp.cpp.


|
static |
Initializes the programming track.
| inSignalPin | Pin for the signal pin, the one driven by an interruption, set it to UNDEFINED_PIN if not used (but the line will be always down...). |
Definition at line 252 of file DccSignalESP32.cpp.


|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Checks if the given RegisterList is for the main track or not.
| apRegs | RegisterList to check. |
|
inlinestatic |
Checks if beginMain() has been called with the right arguments !
|
inlinestatic |
Checks if beginProg() has been called with the right arguments !
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
Try to read a CV from a decoder on the main track. Be sure there is only one loco on the track before calling this function !
| inCvId | CV id from 0 to 255. |
| callBack | an arbitrary integer (0-32767) that is ignored by the Base Station and is simply echoed back in the output - useful for external programs that call this function. Default 100. |
| callBackSub | a second arbitrary integer (0-32767) that is ignored by the Base Station and is simply echoed back in the output - useful for external programs (e.g. DCC++ Interface) that call this function. Default 200 |
|
inlinestatic |
Try to read a CV from a decoder on the programming track. Be sure there is only one loco on the track before calling this function !
| inCvId | CV id from 0 to 255. |
| callBack | an arbitrary integer (0-32767) that is ignored by the Base Station and is simply echoed back in the output - useful for external programs that call this function. Default 100. |
| callBackSub | a second arbitrary integer (0-32767) that is ignored by the Base Station and is simply echoed back in the output - useful for external programs (e.g. DCC++ Interface) that call this function. Default 200 |
|
static |
|
static |
Set the minimum threshold value to validate a CV reading or writing..
| inNewValue | Maximum value between 0 and 1023. Default is 30. The threshold that the exponentially-smoothed analogRead samples (after subtracting the baseline current) must cross to establish ACKNOWLEDGEMENT. |
|
inlinestatic |
|
inlinestatic |
|
static |
Set the tracks in slow 'debug' mode only for tests.
Definition at line 275 of file DccSignalESP32.cpp.
|
inlinestatic |
Set the functions states of the given decoder on the main track.
| nReg | Register number. Original DCC++ use register 0 to send function states only a few times. DCCpp Can use any register to be able to send function packets repeatedly like the speed packets, |
| inLocoId | Decoder address in short or long format. |
| inStates | FunctionsState class with the wanted new status. |
|
inlinestatic |
Set the functions states of the given decoder on the programming track.
| nReg | Register number. Original DCC++ use register 0 to send function states only a few times. DCCpp Can use any register to be able to send function packets repeatedly like the speed packets, |
| inLocoId | Decoder address in short or long format. |
| inStates | FunctionsState class with the wanted new status. |
|
inlinestatic |
For the given decoder id, set the speed and the direction on the main track.
| nReg | Register number. Avoid register 0, used for one shot commands like accessories or CV programming. |
| inLocoId | Decoder address in short or long format. |
| inStepsNumber | According to the decoder configuration, set it to 14, 28 or 128 . |
| inNewSpeed | Speed of the loco, between 2 and the steps number - 1 (13, 27 or 127). 0 means normal complete stop. 1 means emergency stop. |
| inForward | True means forward move, false means backward. |
|
inlinestatic |
For the given decoder id, set the speed and the direction on the programming track.
| nReg | Register number. Avoid register 0, used for one shot commands like accessories or CV programming. |
| inLocoId | Decoder address in short or long format. |
| inStepsNumber | According to the decoder configuration, set it to 14, 28 or 128 . |
| inNewSpeed | Speed of the loco, between 2 and the steps number - 1 (13, 27 or 127). 0 means normal complete stop. 1 means emergency stop. |
| inForward | True means forward move, false means backward. |
|
static |
|
inlinestatic |
Write the given CV on the main track. Be sure there is only one loco on the track before calling this function !
| inCvId | CV id from 0 to 255. |
| inValue | CV new value from 0 to 255. |
| callBack | an arbitrary integer (0-32767) that is ignored by the Base Station and is simply echoed back in the output - useful for external programs that call this function. Default 100. |
| callBackSub | a second arbitrary integer (0-32767) that is ignored by the Base Station and is simply echoed back in the output - useful for external programs (e.g. DCC++ Interface) that call this function. Default 200 |
|
inlinestatic |
Write the given CV on the programming track.
| inCvId | CV id from 0 to 255. |
| inValue | CV new value from 0 to 255. |
| callBack | an arbitrary integer (0-32767) that is ignored by the Base Station and is simply echoed back in the output - useful for external programs that call this function. Default 100. |
| callBackSub | a second arbitrary integer (0-32767) that is ignored by the Base Station and is simply echoed back in the output - useful for external programs (e.g. DCC++ Interface) that call this function. Default 200 |