调整日志,统一到设备层记录,并将路径指定为设备层组伯所在目录
This commit is contained in:
parent
12c06d5f73
commit
948063dd41
|
@ -14,4 +14,9 @@ EXPORTS
|
|||
hg_scanner_read_img_data
|
||||
hg_scanner_get_status
|
||||
hg_scanner_reset
|
||||
hg_scanner_control
|
||||
hg_scanner_control
|
||||
hg_scanner_set_sane_info
|
||||
hg_scanner_err_name
|
||||
hg_scanner_err_description
|
||||
hg_scanner_log_is_enable
|
||||
hg_scanner_log
|
|
@ -102,7 +102,7 @@
|
|||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;HGSCANNER_EXPORT;CUSTOM_USBVIEW;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;HGSCANNER_EXPORT;CUSTOM_USBVIEW;BACKEND_NAME=hgdriver;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
@ -132,7 +132,7 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "$(SolutionDir)..\..\sdk\lib\win\$
|
|||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;HGSCANNER_EXPORT;CUSTOM_USBVIEW;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;HGSCANNER_EXPORT;CUSTOM_USBVIEW;BACKEND_NAME=hgdriver;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
|
@ -251,6 +251,7 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "$(SolutionDir)..\..\sdk\lib\win\$
|
|||
<ClCompile Include="..\..\code_device\hgdriver\ImageProcess\ImageMultiOutputRed.cpp" />
|
||||
<ClCompile Include="..\..\code_device\hgdriver\ImageProcess\ImageProcess_Public.cpp" />
|
||||
<ClCompile Include="..\..\code_device\hgdriver\ImageProcess\IMulti.cpp" />
|
||||
<ClCompile Include="..\..\code_device\hgdriver\wrapper\ini_file.cpp" />
|
||||
<ClCompile Include="win_usb\usbview\devnode.c" />
|
||||
<ClCompile Include="win_usb\usbview\enum.c" />
|
||||
<ClCompile Include="win_usb\win_usb.cpp" />
|
||||
|
@ -310,6 +311,7 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "$(SolutionDir)..\..\sdk\lib\win\$
|
|||
<ClInclude Include="..\..\code_device\hgdriver\ImageProcess\imgprocdefs.h" />
|
||||
<ClInclude Include="..\..\code_device\hgdriver\ImageProcess\IMulti.h" />
|
||||
<ClInclude Include="..\..\code_device\hgdriver\ImageProcess\MatEx.h" />
|
||||
<ClInclude Include="..\..\code_device\hgdriver\wrapper\ini_file.h" />
|
||||
<ClInclude Include="..\..\sdk\hginclude\hgscanner_error.h" />
|
||||
<ClInclude Include="..\..\sdk\hginclude\hg_log.h" />
|
||||
<ClInclude Include="..\..\sdk\hginclude\huagaoxxx_warraper_ex.h" />
|
||||
|
@ -327,6 +329,9 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "$(SolutionDir)..\..\sdk\lib\win\$
|
|||
<ItemGroup>
|
||||
<None Include="device.def" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\..\code_device\hgdriver\wrapper\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
|
|
@ -177,6 +177,9 @@
|
|||
<ClCompile Include="..\..\code_device\hgdriver\ImageProcess\ImageApplySizeDetection.cpp">
|
||||
<Filter>image</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\code_device\hgdriver\wrapper\ini_file.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\sdk\hginclude\hg_log.h">
|
||||
|
@ -380,10 +383,16 @@
|
|||
<ClInclude Include="..\..\code_device\hgdriver\ImageProcess\ImageApplySizeDetection.h">
|
||||
<Filter>image</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\code_device\hgdriver\wrapper\ini_file.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="device.def">
|
||||
<Filter>源文件</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\..\code_device\hgdriver\wrapper\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -16,7 +16,7 @@
|
|||
#pragma comment(lib, "winusb.lib")
|
||||
#pragma comment(lib, "rpcrt4.lib")
|
||||
|
||||
#include "hginclude/hg_log.h"
|
||||
#include "../wrapper/hg_log.h"
|
||||
#include "scanner_manager.h" // for hg_scanner_mgr::ui_default_callback
|
||||
#include "usbview/enum.h"
|
||||
|
||||
|
@ -189,7 +189,7 @@ std::string usb_device::parent_hub_path_name(int vid, int pid, int *addr)
|
|||
}
|
||||
if (addr)
|
||||
*addr = port;
|
||||
HG_VLOG_MINI_4(LOG_LEVEL_DEBUG_INFO, "Parent hub for %04X:%04X is: %s (+%d)\r\n", vid, pid, ret.c_str(), port);
|
||||
VLOG_MINI_4(LOG_LEVEL_DEBUG_INFO, "Parent hub for %04X:%04X is: %s (+%d)\r\n", vid, pid, ret.c_str(), port);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -815,16 +815,7 @@ void scanner::load_options(void)
|
|||
|
||||
op.ind = i;
|
||||
op.desc = desc;
|
||||
if (desc->name == KNOWN_OPT_NAME_CUSTOM_GAMMA)
|
||||
{
|
||||
SANE_Int afterdo = 0;
|
||||
SANE_Int *v = new SANE_Int[3 * 256];
|
||||
|
||||
sane_invoker::invoke_sane_control_option(hdev_, i, SANE_ACTION_GET_VALUE, v, &afterdo);
|
||||
op.val.iv = 0;
|
||||
delete[] v;
|
||||
}
|
||||
else if (desc->type == SANE_Value_Type::SANE_TYPE_BOOL)
|
||||
if (desc->type == SANE_Value_Type::SANE_TYPE_BOOL)
|
||||
op.val.bv = get_boolean(i);
|
||||
else if (desc->type == SANE_Value_Type::SANE_TYPE_FIXED)
|
||||
op.val.dv = get_double(i);
|
||||
|
|
|
@ -192,9 +192,7 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "$(SolutionDir)..\..\sdk\lib\win\$
|
|||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\code_device\hgdriver\wrapper\hg_log.cpp" />
|
||||
<ClCompile Include="..\..\code_device\hgsane\cJSON.c" />
|
||||
<ClCompile Include="..\..\code_device\hgsane\ini_file.cpp" />
|
||||
<ClCompile Include="..\..\code_device\hgsane\json.cpp" />
|
||||
<ClCompile Include="..\..\code_device\hgsane\main.c" />
|
||||
<ClCompile Include="..\..\code_device\hgsane\sane_hg_mdw.cpp" />
|
||||
|
@ -202,18 +200,17 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "$(SolutionDir)..\..\sdk\lib\win\$
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\code_device\hgsane\cJSON.h" />
|
||||
<ClInclude Include="..\..\code_device\hgsane\ini_file.h" />
|
||||
<ClInclude Include="..\..\code_device\hgsane\json.h" />
|
||||
<ClInclude Include="..\..\code_device\hgsane\sane_hg_mdw.h" />
|
||||
<ClInclude Include="..\..\code_device\hgsane\sane_option.h" />
|
||||
<ClInclude Include="..\..\sdk\include\huagao\hgscanner_error.h" />
|
||||
<ClInclude Include="..\..\code_device\sdk\hginclude\hg_log.h" />
|
||||
<ClInclude Include="..\..\code_device\sdk\hginclude\huagaoxxx_warraper_ex.h" />
|
||||
<ClInclude Include="..\..\sdk\include\sane\sane.h" />
|
||||
<ClInclude Include="..\..\sdk\include\sane\sanei.h" />
|
||||
<ClInclude Include="..\..\sdk\include\sane\sanei_backend.h" />
|
||||
<ClInclude Include="..\..\sdk\include\sane\sanei_debug.h" />
|
||||
<ClInclude Include="..\..\sdk\include\sane\sane_ex.h" />
|
||||
<ClInclude Include="..\..\sdk\include\sane\sane_option_definitions.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="sane.def" />
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
<ClCompile Include="..\..\code_device\hgsane\cJSON.c">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\code_device\hgsane\ini_file.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\code_device\hgsane\json.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
|
@ -30,9 +27,6 @@
|
|||
<ClCompile Include="..\..\code_device\hgsane\sane_hg_mdw.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\code_device\hgdriver\wrapper\hg_log.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\code_device\hgsane\sane_option.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
|
@ -41,9 +35,6 @@
|
|||
<ClInclude Include="..\..\code_device\hgsane\cJSON.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\code_device\hgsane\ini_file.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\code_device\hgsane\json.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
|
@ -65,9 +56,6 @@
|
|||
<ClInclude Include="..\..\sdk\include\sane\sanei_debug.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\code_device\sdk\hginclude\hg_log.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\sdk\include\huagao\hgscanner_error.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
|
@ -77,6 +65,9 @@
|
|||
<ClInclude Include="..\..\code_device\hgsane\sane_option.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\sdk\include\sane\sane_option_definitions.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="sane.def">
|
||||
|
|
|
@ -15,5 +15,4 @@ EXPORTS
|
|||
sane_hgsane_get_select_fd
|
||||
sane_hgsane_strstatus
|
||||
sane_hgsane_init_ex
|
||||
sane_hgsane_io_control
|
||||
hg_debug_log
|
||||
sane_hgsane_io_control
|
Loading…
Reference in New Issue