Add option to kick drawer at the start of the print

This commit is contained in:
Daniel Mahaffy 2018-07-13 10:06:19 +04:00
parent b373c4c838
commit 8982f5af39
3 changed files with 6 additions and 1 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.swp

View file

@ -208,6 +208,7 @@
*DefaultCashDrawerType: 0DoNothing *DefaultCashDrawerType: 0DoNothing
*CashDrawerType 0DoNothing/Do Nothing: "" *CashDrawerType 0DoNothing/Do Nothing: ""
*CashDrawerType 1OpenDrawer/Open After Document: "" *CashDrawerType 1OpenDrawer/Open After Document: ""
*CashDrawerType 2OpenDrawerBefore/Open Before Document: ""
*CloseUI: *CashDrawerType *CloseUI: *CashDrawerType
*CloseGroup: CashDrawerGroup *CloseGroup: CashDrawerGroup

View file

@ -333,6 +333,9 @@ inline void initializeSettings(char * commandLineOptionSettings, struct settings
void jobSetup(struct settings_ settings) void jobSetup(struct settings_ settings)
{ {
outputCommand(printerInitializeCommand); outputCommand(printerInitializeCommand);
if (settings.drawerKick == 2){
outputCommand(drawerKickCommand);
}
} }
void pageSetup(struct settings_ settings, cups_page_header_t header) void pageSetup(struct settings_ settings, cups_page_header_t header)
@ -353,7 +356,7 @@ void endJob(struct settings_ settings)
{ {
outputCommand(pageCutCommand); outputCommand(pageCutCommand);
} }
if (settings.drawerKick) if (settings.drawerKick == 1)
{ {
outputCommand(drawerKickCommand); outputCommand(drawerKickCommand);
} }