diff --git a/common/hooklib/y3.c b/common/hooklib/y3.c index d799293..61c72ad 100644 --- a/common/hooklib/y3.c +++ b/common/hooklib/y3.c @@ -357,6 +357,9 @@ CALL int* API_Connect(char* szPortName) { CALL int API_Close(int* hDevice) { dprintf("Y3: %s(%p)\n", __func__, hDevice); + + y3_dll.close(); + return 0; } @@ -381,12 +384,12 @@ CALL uint32_t API_GetFirmName(int* hDevice) { if (hDevice == Y3_COM_FIELD) { result = convert_string_to_uint(y3_config.firm_name_field); - dprintf("This Y3 device is a FIELD: %s\n", y3_config.firm_name_field); + dprintf("Y3: This device is a FIELD: %s\n", y3_config.firm_name_field); } else if (hDevice == Y3_COM_PRINT) { result = convert_string_to_uint(y3_config.firm_name_printer); - dprintf("This Y3 device is PRINTER: %s\n", y3_config.firm_name_printer); + dprintf("Y3: This device is a PRINTER: %s\n", y3_config.firm_name_printer); } else { - dprintf("This Y3 device is UNKNOWN\n"); + dprintf("Y3: This device is UNKNOWN\n"); } return result; @@ -398,12 +401,12 @@ CALL uint32_t API_GetTargetCode(int* hDevice) { if (hDevice == Y3_COM_FIELD) { result = convert_string_to_uint(y3_config.target_code_field); - dprintf("This Y3 device is FIELD: %s\n", y3_config.target_code_field); + dprintf("Y3: This device is a FIELD: %s\n", y3_config.target_code_field); } else if (hDevice == Y3_COM_PRINT) { result = convert_string_to_uint(y3_config.target_code_printer); - dprintf("This Y3 device is PRINTER: %s\n", y3_config.target_code_printer); + dprintf("Y3: This device is a PRINTER: %s\n", y3_config.target_code_printer); } else { - dprintf("This Y3 device is UNKNOWN\n"); + dprintf("Y3: This Y3 device is UNKNOWN\n"); } return result; diff --git a/common/y3io/meson.build b/common/y3io/meson.build index b370c92..3650512 100644 --- a/common/y3io/meson.build +++ b/common/y3io/meson.build @@ -5,22 +5,13 @@ y3io_lib = static_library( implicit_include_directories : false, dependencies : [ capnhook.get_variable('hook_dep'), - capnhook.get_variable('hooklib_dep') + capnhook.get_variable('hooklib_dep'), ], link_with : [ - util_lib + util_lib, ], sources : [ 'impl/dummy/y3io.c', - 'impl/websockets/y3io.c', - 'impl/websockets/3rdparty/websockets/aw-base64.h', - 'impl/websockets/3rdparty/websockets/aw-sha1.h', - 'impl/websockets/3rdparty/websockets/websocket.c', - 'impl/websockets/3rdparty/websockets/websocket.h', - 'impl/websockets/3rdparty/cjson/cJSON.c', - 'impl/websockets/3rdparty/cjson/cJSON.h', - 'impl/websockets/3rdparty/cjson/cJSON_Utils.c', - 'impl/websockets/3rdparty/cjson/cJSON_Utils.h', 'impl/y3io.h', ], )