From b2fed203cab6e9a132b6c6652acb0c6e70ebb571 Mon Sep 17 00:00:00 2001 From: KUSHAL-CT Date: Thu, 21 May 2026 07:28:23 +0000 Subject: [PATCH] lf_interop_real_browser_test.py : Add fix for from and to coordinate for bandsteering VERIFIED CLI : python3 lf_interop_real_browser_test.py --mgr 192.168.207.78 --duration 1 --url https://www.google.com --device_list 1.12,1.15 --count 10 --upstream_port 192.168.204.60 --expected_passfail_value 5 --do_robo --robo_ip 127.0.0.1:5000 --coordinates 3,2,1 --rotations --duration_to_skip 1 --do_bandsteering --cycles 2 --bssids 94:A6:7E:74:26:31,94:A6:7E:74:26:22 Signed-off-by: KUSHAL-CT --- .../lf_interop_real_browser_test.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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)