diff --git a/py-scripts/real_application_tests/real_browser/lf_interop_real_browser_test.py b/py-scripts/real_application_tests/real_browser/lf_interop_real_browser_test.py index abd23963c..759dff083 100644 --- a/py-scripts/real_application_tests/real_browser/lf_interop_real_browser_test.py +++ b/py-scripts/real_application_tests/real_browser/lf_interop_real_browser_test.py @@ -1507,7 +1507,8 @@ def monitor_wrapper(): for row in rows: if not row.get("device_name"): continue - row["from_coordinate"] = self.prev_coordinate + # Store the coordinate before robot movement starts. + row["from_coordinate"] = self.start_coordinate row["to_coordinate"] = self.current_cord self.write_bandsteering_row(row) @@ -1533,10 +1534,12 @@ def monitor_wrapper(): # CSV FOR WEBUI GRAPHS self.write_live_webui_csv(rows) - self.prev_coordinate = self.current_cord time.sleep(1) return True + # Save current coordinate before robot movement starts. + self.start_coordinate = self.prev_coordinate + # time.sleep(10) result = self.robo_obj.move_to_coordinate( coord=coordinate, @@ -1551,6 +1554,9 @@ def monitor_wrapper(): moved = False stopped = True + # Update previous coordinate after each movement attempt. + self.prev_coordinate = self.current_cord + if stopped: break if not moved: @@ -3301,15 +3307,14 @@ def add_bandsteering_bssid_section(self, report): report.build_table_title() if not transitions: - first_row = df.iloc[0] last_row = df.iloc[-1] transitions.append({ - "BSSID": first_row.get("bssid", "NA"), + "BSSID": last_row.get("bssid", "NA"), "Timestamp": last_row.get("timestamp", "NA"), - "From Coordinate": first_row.get("from_coordinate", "NA"), + "From Coordinate": last_row.get("from_coordinate", "NA"), "To Coordinate": last_row.get("to_coordinate", "NA"), - "Channel": first_row.get("channel", "NA") + "Channel": last_row.get("channel", "NA") }) transition_df = pd.DataFrame(transitions)