ENH: add more retry to subscribe

Change-Id: If68249408446aace4a83e4b5beeb0643dce8cb87
(cherry picked from commit 8b0f16d3de8ef6816bf5eb068e007d202f9710c9)
This commit is contained in:
Stone Li 2025-01-07 11:58:18 +08:00 committed by Noisyfox
parent 0318b2579e
commit 3a7703fc67
3 changed files with 3 additions and 2 deletions

View file

@ -2981,7 +2981,7 @@ void MachineObject::reset_update_time()
{
BOOST_LOG_TRIVIAL(trace) << "reset reset_update_time, dev_id =" << dev_id;
last_update_time = std::chrono::system_clock::now();
subscribe_counter = 3;
subscribe_counter = SUBSCRIBE_RETRY_COUNT;
}
void MachineObject::reset()

View file

@ -58,6 +58,7 @@
#define START_SEQ_ID 20000
#define END_SEQ_ID 30000
#define SUBSCRIBE_RETRY_COUNT 5
inline int correct_filament_temperature(int filament_temp)
{

View file

@ -2187,7 +2187,7 @@ void GUI_App::on_start_subscribe_again(std::string dev_id)
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": dev_id=" << obj->dev_id;
}
});
start_subscribe_timer->Start(4000, wxTIMER_ONE_SHOT);
start_subscribe_timer->Start(5000, wxTIMER_ONE_SHOT);
}
std::string GUI_App::get_local_models_path()