start remove while

This commit is contained in:
luoliangyi 2023-04-28 16:19:59 +08:00
parent 9eee1374c4
commit ac8ff76687
2 changed files with 15 additions and 15 deletions

View File

@ -1323,7 +1323,7 @@ void hg_scanner_239::thread_handle_usb_read(void)
int hg_scanner_239::start(void)
{
StopWatch sw;
/*StopWatch sw;
while (is_read_int)
{
if (sw.elapsed_s() > 10)
@ -1332,7 +1332,7 @@ int hg_scanner_239::start(void)
}
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
VLOG_MINI_1(LOG_LEVEL_WARNING, "device status is(%s)\n", STATU_DESC_SCANNER_ERR_DEVICE_DEVS_BOOTING);
}
}*/
bool handled = false;
int ret = try_third_app_handle_start(handled),
val = 0;

View File

@ -299,17 +299,17 @@ int hg_scanner_300::start(void)
// VLOG_MINI_1(LOG_LEVEL_WARNING, "device status is(%s)\n", STATU_DESC_SCANNER_ERR_DEVICE_DEVS_BOOTING);
// return SCANNER_ERR_DEVICE_DEVS_BOOTING;
//}
StopWatch sw;
while (is_read_int)
{
if (sw.elapsed_s() > 10)
{
break;
}
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
VLOG_MINI_1(LOG_LEVEL_WARNING, "device status is(%s)\n", STATU_DESC_SCANNER_ERR_DEVICE_DEVS_BOOTING);
}
discard_all_images();
//StopWatch sw;
// while (is_read_int)
//{
// if (sw.elapsed_s() > 10)
//{
// break;
//}
//std::this_thread::sleep_for(std::chrono::milliseconds(1000));
//VLOG_MINI_1(LOG_LEVEL_WARNING, "device status is(%s)\n", STATU_DESC_SCANNER_ERR_DEVICE_DEVS_BOOTING);
//}
//discard_all_images();
final_imgs_.clear();
bool handled = false;
int ret = try_third_app_handle_start(handled),