From fbf3377dddadddb66a1183e68ef36713f792920f Mon Sep 17 00:00:00 2001 From: 13038267101 Date: Fri, 17 Mar 2023 22:32:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=B8=E5=8F=98=E5=80=BC=E4=B8=BAfloat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/base/test_base.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/base/test_base.cpp b/code/base/test_base.cpp index ec24a81..fd4f82c 100644 --- a/code/base/test_base.cpp +++ b/code/base/test_base.cpp @@ -1026,7 +1026,7 @@ public: } //先默认设置1 float distortion = 1.0; - int setdistortion = *(int*)&distortion; + int setdistortion = distortion; ret = helper_->io_control(IO_CTRL_CODE_SET_DISTORTION_CHECK_VAL, &setdistortion, &len); @@ -1111,8 +1111,8 @@ public: helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void *)L"已退出畸变值设置", false); return -1; } - int setdistortion = *(int*)&distortion; - int getdistortion = 0; + float setdistortion = distortion; + float getdistortion = 0; ret = helper_->io_control(IO_CTRL_CODE_SET_DISTORTION_CHECK_VAL, &setdistortion, &len); if (ret != SCANNER_ERR_OK)