1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-24 13:21:23 +01:00

Fix FADE(pin,0,0) operation in RMFT

This commit is contained in:
Neil McKechnie 2021-08-29 01:10:47 +01:00
parent 0f55835b8b
commit 09eae0ea91

View File

@ -165,7 +165,7 @@ void PCA9685::_writeAnalogue(VPIN vpin, int value, uint8_t profile, uint16_t dur
profileValue==Medium ? 20 : // 1.0 seconds profileValue==Medium ? 20 : // 1.0 seconds
profileValue==Slow ? 40 : // 2.0 seconds profileValue==Slow ? 40 : // 2.0 seconds
profileValue==Bounce ? sizeof(_bounceProfile)-1 : // ~ 1.5 seconds profileValue==Bounce ? sizeof(_bounceProfile)-1 : // ~ 1.5 seconds
duration * 2; // Convert from deciseconds (100ms) to refresh cycles (50ms) duration * 2 + 1; // Convert from deciseconds (100ms) to refresh cycles (50ms)
s->stepNumber = 0; s->stepNumber = 0;
s->toPosition = value; s->toPosition = value;
s->fromPosition = s->currentPosition; s->fromPosition = s->currentPosition;