feat:增加小票打印机接口以及获取状态接口
This commit is contained in:
@@ -515,7 +515,7 @@ public class TestFunction {
|
||||
TestUtils.showMessageOnUiThread("Write failed");
|
||||
}
|
||||
|
||||
void Test_Port_Read(Pointer h) {
|
||||
public void Test_Port_Read(Pointer h) {
|
||||
// send this cmd to query printer status
|
||||
byte cmd[] = {0x10, 0x04, 0x01};
|
||||
AutoReplyPrint.INSTANCE.CP_Port_SkipAvailable(h);
|
||||
@@ -562,7 +562,7 @@ public class TestFunction {
|
||||
TestUtils.showMessageOnUiThread("valid " + valid);
|
||||
}
|
||||
|
||||
void Test_Printer_GetPrinterInfo(Pointer h) {
|
||||
public void Test_Printer_GetPrinterInfo(Pointer h) {
|
||||
String firmware_version = AutoReplyPrint.CP_Printer_GetPrinterFirmwareVersion_Helper.GetPrinterFirmwareVersion(h) + "\r\n";
|
||||
IntByReference width_mm = new IntByReference();
|
||||
IntByReference height_mm = new IntByReference();
|
||||
@@ -587,6 +587,7 @@ public class TestFunction {
|
||||
String str_printer_info_status = simpleDateFormat.format(dt_printer_status) + String.format(" Printer Info Status: 0x%04X\r\n", printer_info_status.getValue() & 0xffff);
|
||||
String str_printer_received = simpleDateFormat.format(dt_printer_received) + String.format(" Printer Received Byte Count: %d\r\n", printer_received_byte_count.getValue());
|
||||
String str_printer_printed = simpleDateFormat.format(dt_printer_printed) + String.format(" Printer Printed Page ID: %d\r\n", printer_printed_page_id.getValue());
|
||||
|
||||
TestUtils.showMessageOnUiThread(firmware_version + str_printer_resolution + str_printer_error_status + str_printer_info_status + str_printer_received + str_printer_printed);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user