refactor: collapse command_ams_refresh_rfid and command_ams_refresh_rfid2

This commit is contained in:
Ian Chua
2026-09-23 18:30:05 +08:00
parent 1615390182
commit a2a9b2ce94
10 changed files with 26 additions and 32 deletions
+2 -2
View File
@@ -4734,11 +4734,11 @@ void StatusPanel::on_ams_refresh_rfid(wxCommandEvent &event)
try {
if (!use_new_command) {
int tray_index = atoi(curr_ams_id.c_str()) * 4 + atoi(slot_it->second->id.c_str());
obj->command_ams_refresh_rfid(std::to_string(tray_index));
obj->command_ams_refresh_rfid(-1, tray_index);
}
if (use_new_command) {
obj->command_ams_refresh_rfid2(stoi(curr_ams_id), stoi(curr_can_id));
obj->command_ams_refresh_rfid(stoi(curr_ams_id), stoi(curr_can_id));
}
} catch (...) {