This commit is contained in:
13038267101 2023-05-25 09:09:52 +08:00
parent 00ecac52b3
commit fe6eef8a59
1 changed files with 2 additions and 0 deletions

View File

@ -231,6 +231,7 @@ std::string hg_scanner_239::control_fetch(int addr, int val, int size)
} }
std::string hg_scanner_239::get_fpga(void) std::string hg_scanner_239::get_fpga(void)
{ {
std::lock_guard<std::mutex> lock(io_lock_);
int val = 0, int val = 0,
ret = read_register(setting3399::SR_GET_MBVERSION_LENGHT, &val); ret = read_register(setting3399::SR_GET_MBVERSION_LENGHT, &val);
std::string fpga(""); std::string fpga("");
@ -247,6 +248,7 @@ std::string hg_scanner_239::get_fpga(void)
} }
int hg_scanner_239::get_scan_mode(bool &type) int hg_scanner_239::get_scan_mode(bool &type)
{ {
std::lock_guard<std::mutex> lock(io_lock_);
int val = 0, int val = 0,
ret = read_register(setting3399::SR_OS, &val); //val == 1计数模式 ret = read_register(setting3399::SR_OS, &val); //val == 1计数模式
type =val == 1 ? false : true; type =val == 1 ? false : true;