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)