1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-23 08:06:13 +01:00
CommandStation-EX/DCCTrack.h
2021-11-28 23:36:47 +01:00

24 lines
528 B
C++

#pragma once
#include <Arduino.h>
#include "DCCPacket.h"
#include "DCCWaveform.h"
#include "DIAG.h"
class DCCTrack {
public:
DCCTrack(DCCWaveform *w);
void schedulePacket(const byte buffer[], byte byteCount, byte repeats);
void schedulePacket(dccPacket packet);
inline void addDriver(MotorDriver *m) { mD.push_back(m);
DIAG(F("Track: mDType=%d count=%d"),m->type(), mD.size());
};
static DCCTrack mainTrack;
static DCCTrack progTrack;
private:
DCCWaveform *waveform;
std::vector<MotorDriver *>mD;
};