1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-26 17:46:14 +01:00

Compare commits

..

2 Commits

Author SHA1 Message Date
Asbelos
2894a34591 correct MOMENTUM_FACTOR 2024-07-25 19:45:09 +01:00
Asbelos
60c62f6fe7 notes only 2024-07-25 15:17:10 +01:00
2 changed files with 7 additions and 4 deletions

2
DCC.h
View File

@ -109,7 +109,7 @@ public:
byte momentumA, momentumD;
byte targetSpeed; // speed set by throttle
};
static const int16_t MOMENTUM_FACTOR=8;
static const int16_t MOMENTUM_FACTOR=7;
static const byte MOMENTUM_USE_DEFAULT=255;
static byte getMomentum(LOCO * slot);

View File

@ -5,16 +5,19 @@ The momentum is applied regardless of the throttle type used (or even EXRAIL).
Momentum is specified in mS / throttle_step.
There is a new command `<m cabid mS>`
There is a new command `<m cabid accelerating [brake]>`
where the brake value defaults to the accelerating value.
For example:
`<m 3 0>` sets loco 3 to no momentum.
`<m 3 21>` sets loco 3 to 21 mS/step.
`<m 3 21 42>` sets loco 3 to 21 mS/step accelerating and 42 mS/step when decelerating.
`<m 0 21>` sets the default momentum to 21mS/Step for all current and future locos that have not been specifically set.
`<m 3 -1>` sets loco 3 to track the default momentum value.
EXRAIL
A new macro `MOMENTUM(mSecPerStep)` sets the momentum value of the current tasks loco.
A new macro `MOMENTUM(accel [, decel])` sets the momentum value of the current tasks loco ot the global default if loco=0.
Note: Setting Momentum 7,14,21 etc is similar in effect to setting a decoder CV03 to 1,2,3. At present the same momentum value is used for acceleration and deceleration. The `<m>` command may be extended in future to separate these values.
Note: Setting Momentum 7,14,21 etc is similar in effect to setting a decoder CV03/CV04 to 1,2,3.