Added support (?) for cash drawer kick. I have no way to test this.

This commit is contained in:
Steve Hawley 2016-07-17 12:40:05 -04:00
parent 500fe6846e
commit fb5dc23dab
2 changed files with 18 additions and 1 deletions

View file

@ -203,6 +203,14 @@
*CloseUI: *DocCutType
*CloseGroup: CutGroup
*OpenGroup CashDrawerGroup/Cash Drawer Options
*OpenUI *CashDrawerType/1. Cash Drawer Options: PickOne
*DefaultCashDrawerType: 0DoNothing
*CashDrawerType 0DoNothing/Do Nothing: ""
*CashDrawerType 1OpenDrawer/Open After Document: ""
*CloseUI: *CashDrawerType
*CloseGroup: CashDrawerGroup
*OpenGroup: DoublingGroup/Pixel Doubling
*CloseGroup: DoublingGroup

View file

@ -130,6 +130,7 @@ struct settings_
int bytesPerScanLine;
int bytesPerScanLineStd;
int doubleMode;
int drawerKick;
};
struct command
@ -144,6 +145,9 @@ static const struct command printerInitializeCommand =
static const struct command pageCutCommand =
{4, (char[4]){29,'V','A',20}};
static const struct command drawerKickCommand =
{5, (char[5]){27,112,48,55,121}};
inline void debugPrintSettings(struct settings_ * settings)
{
@ -317,6 +321,7 @@ inline void initializeSettings(char * commandLineOptionSettings, struct settings
settings->bytesPerScanLine = 80;
settings->bytesPerScanLineStd = 80;
settings->doubleMode = getOptionChoiceIndex("PixelDoublingType", ppd);
settings->drawerKick = getOptionChoiceIndex("CashDrawerType", ppd);
getPageWidthPageHeight(ppd, settings);
@ -348,6 +353,10 @@ void endJob(struct settings_ settings)
{
outputCommand(pageCutCommand);
}
if (settings.drawerKick)
{
outputCommand(drawerKickCommand);
}
}
#define GET_LIB_FN_OR_EXIT_FAILURE(fn_ptr,lib,fn_name) \