From 6cd67cf00fe3f133acd36692cd3d85598e464b10 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Sat, 19 Feb 2022 14:06:07 +0100 Subject: [PATCH] added line feed --- Controllers/PrinterController.cs | 3 +++ Instructions/FeedInstruction.cs | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 Instructions/FeedInstruction.cs diff --git a/Controllers/PrinterController.cs b/Controllers/PrinterController.cs index 478ea99..e30b85b 100644 --- a/Controllers/PrinterController.cs +++ b/Controllers/PrinterController.cs @@ -47,6 +47,9 @@ public class PrinterController : Controller case "barcode": parsedInstruction = instruction.Deserialize(); break; + case "feed": + parsedInstruction = instruction.Deserialize(); + break; default: return BadRequest(); } diff --git a/Instructions/FeedInstruction.cs b/Instructions/FeedInstruction.cs new file mode 100644 index 0000000..0967abf --- /dev/null +++ b/Instructions/FeedInstruction.cs @@ -0,0 +1,12 @@ +public class FeedInstruction : BaseInstruction +{ + public int lines {get; set; } = 1; + public override List GetInstructions() + { + var commands = new List(); + + commands.Add(e.FeedLines(lines)); + + return commands; + } +}