added line feed

This commit is contained in:
Djeeberjr 2022-02-19 14:06:07 +01:00
parent ceee567981
commit 6cd67cf00f
2 changed files with 15 additions and 0 deletions

View File

@ -47,6 +47,9 @@ public class PrinterController : Controller
case "barcode":
parsedInstruction = instruction.Deserialize<BarcodeInstruction>();
break;
case "feed":
parsedInstruction = instruction.Deserialize<FeedInstruction>();
break;
default:
return BadRequest();
}

View File

@ -0,0 +1,12 @@
public class FeedInstruction : BaseInstruction
{
public int lines {get; set; } = 1;
public override List<byte[]> GetInstructions()
{
var commands = new List<byte[]>();
commands.Add(e.FeedLines(lines));
return commands;
}
}