1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-27 01:56:14 +01:00
CommandStation-EX/DCCPacket.h

17 lines
542 B
C
Raw Normal View History

#pragma once
const byte MAX_PACKET_SIZE = 5; // NMRA standard extended packets, payload size WITHOUT checksum.
2021-12-04 20:07:34 +01:00
// Number of preamble bits (moved here so MotorDriver and Waveform know)
const int PREAMBLE_BITS_MAIN = 16;
const int PREAMBLE_BITS_PROG = 22;
class dccPacket {
public:
byte data[MAX_PACKET_SIZE+1]; // space for checksum if needed
byte length : 4; // future proof up to 15
byte repeat : 4; // hopefully 15 enough for ever
//byte priority : 2; // 0 repeats; 1 mobile function ; 2 accessory ; 3 mobile speed
};