Skip to content

Commit

Permalink
Merge pull request #6 from bbr111/dev
Browse files Browse the repository at this point in the history
fix error - handle module 5
  • Loading branch information
bbr111 authored Nov 22, 2024
2 parents d40919d + 7455225 commit 1bfec84
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bydhvs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,12 +671,7 @@ async def state10_send_request8(self) -> None:
async def state11_send_request9(self) -> None:
"""Handle additional cells for more than 128 cells (e.g., 5 modules)"""
# State 11: Send request 9 - Switch to second pass
if self.current_tower == 0:
await self.send_request(self.my_requests['start_measure_box_1'])
elif self.current_tower == 1:
await self.send_request(self.my_requests['start_measure_box_2'])
elif self.current_tower == 2:
await self.send_request(self.my_requests['start_measure_box_3'])
await self.send_request(self.my_requests['switch_pass'])
data = await self.receive_response()
if data and self.check_packet(data):
self.my_state = 12
Expand All @@ -686,7 +681,12 @@ async def state11_send_request9(self) -> None:

async def state12_send_request10(self) -> None:
"""State 12: Send request 10 - Start measurement"""
await self.send_request(self.my_requests['start_measurement'])
if self.current_tower == 0:
await self.send_request(self.my_requests['start_measure_box_1'])
elif self.current_tower == 1:
await self.send_request(self.my_requests['start_measure_box_2'])
elif self.current_tower == 2:
await self.send_request(self.my_requests['start_measure_box_3'])
data = await self.receive_response()
if data and self.check_packet(data):
# Wait time as per original code (e.g., 3 seconds)
Expand Down

0 comments on commit 1bfec84

Please sign in to comment.