+ duration += pushBits(preData, rx51device);
+
+ // Next, add the actual command:
+ duration += pushBits(bits, rx51device);
+
+ // Next, add the "post" data:
+ duration += pushBits(postData, rx51device);
+
+ // Finally add the "trail":
+ if (hasTrailerPulse)
+ {
+ rx51device.addSingle(trailerPulse);
+ duration += trailerPulse;
+ }
+
+ return duration;
+}
+
+
+int NECProtocol::generateHeadlessCommand(
+ const CommandSequence &bits,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // First, the "pre" data:
+ duration += pushBits(preData, rx51device);