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

Killblink on neopixel set.

This commit is contained in:
Asbelos 2024-09-08 09:26:37 +01:00
parent 360c426675
commit 66e57b5ab2

View File

@ -1002,17 +1002,19 @@ void RMFT2::loop2() {
} }
break; break;
#ifndef IO_NO_HAL
case OPCODE_NEOPIXEL: case OPCODE_NEOPIXEL:
// OPCODE_NEOPIXEL,V([-]vpin),OPCODE_PAD,V(colour_RG),OPCODE_PAD,V(colour_B),OPCODE_PAD,V(count) // OPCODE_NEOPIXEL,V([-]vpin),OPCODE_PAD,V(colour_RG),OPCODE_PAD,V(colour_B),OPCODE_PAD,V(count)
{ {
VPIN vpin=operand>0?operand:-operand; VPIN vpin=operand>0?operand:-operand;
auto count=getOperand(3); auto count=getOperand(3);
for (auto pix=vpin;pix<vpin+count;pix++) for (auto pix=vpin;pix<vpin+count;pix++) {
IODevice::writeAnalogue(pix,getOperand(1),operand>0,getOperand(2)); killBlinkOnVpin(pix);
IODevice::writeAnalogue(pix,getOperand(1),operand>0,getOperand(2));
}
} }
break; break;
#ifndef IO_NO_HAL
case OPCODE_WAITFORTT: // OPCODE_WAITFOR,V(turntable_id) case OPCODE_WAITFORTT: // OPCODE_WAITFOR,V(turntable_id)
if (Turntable::ttMoving(operand)) { if (Turntable::ttMoving(operand)) {
delayMe(100); delayMe(100);