mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-07-28 09:53:45 +02:00
ONACTIVATE catchers etc
UNTESTED SO FAR
This commit is contained in:
4
DCC.cpp
4
DCC.cpp
@@ -25,6 +25,7 @@
|
||||
#include "version.h"
|
||||
#include "FSH.h"
|
||||
#include "IODevice.h"
|
||||
#include "RMFT2.h"
|
||||
|
||||
// This module is responsible for converting API calls into
|
||||
// messages to be sent to the waveform generator.
|
||||
@@ -253,6 +254,9 @@ void DCC::setAccessory(int address, byte number, bool activate) {
|
||||
b[1] = ((((address / 64) % 8) << 4) + (number % 4 << 1) + activate % 2) ^ 0xF8; // second byte is of the form 1AAACDDD, where C should be 1, and the least significant D represent activate/deactivate
|
||||
|
||||
DCCWaveform::mainTrack.schedulePacket(b, 2, 4); // Repeat the packet four times
|
||||
#if defined(RMFT_ACTIVE)
|
||||
RMFT2::activateEvent(address<<2|number,activate);
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user