fix error
This commit is contained in:
		
							parent
							
								
									32af5548e6
								
							
						
					
					
						commit
						593acf9204
					
				| @ -1,8 +1,8 @@ | ||||
| const bleno = require('bleno') | ||||
| const config = require('./config.json') | ||||
| const escpos = require('escpos') | ||||
| const device = escpos.Serial(config.printer.serial) | ||||
| const printer = escpos.Printer(device) | ||||
| const device = new escpos.Serial(config.printer.serial) | ||||
| const printer = new escpos.Printer(device) | ||||
| let isOpen = false | ||||
| 
 | ||||
| device.open(()=>{ | ||||
| @ -59,4 +59,8 @@ function printString(str){ | ||||
|   printer.cut(true, 8) | ||||
| } | ||||
| 
 | ||||
| process.on('SIGINT', ()=>{ | ||||
| 	device.close() | ||||
| }) | ||||
| 
 | ||||
| module.exports = DataCharacteristic | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user