1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 23:56:13 +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

@ -1001,18 +1001,20 @@ void RMFT2::loop2() {
return; return;
} }
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);