2021-11-22 23:26:04 +01:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <Arduino.h>
|
|
|
|
#include "DCCPacket.h"
|
|
|
|
#include "DCCWaveform.h"
|
2021-11-28 23:36:47 +01:00
|
|
|
#include "DIAG.h"
|
2021-11-22 23:26:04 +01:00
|
|
|
|
|
|
|
class DCCTrack {
|
|
|
|
public:
|
|
|
|
DCCTrack(DCCWaveform *w);
|
|
|
|
void schedulePacket(const byte buffer[], byte byteCount, byte repeats);
|
|
|
|
void schedulePacket(dccPacket packet);
|
2021-11-29 00:14:24 +01:00
|
|
|
inline void addDriver(MotorDriver *m) {
|
|
|
|
mD.push_back(m);
|
2021-11-28 23:36:47 +01:00
|
|
|
};
|
2021-11-22 23:26:04 +01:00
|
|
|
static DCCTrack mainTrack;
|
|
|
|
static DCCTrack progTrack;
|
|
|
|
private:
|
|
|
|
DCCWaveform *waveform;
|
|
|
|
std::vector<MotorDriver *>mD;
|
|
|
|
};
|
|
|
|
|
|
|
|
|