@@ -56,30 +56,30 @@ def steps_TC_AVSUM_2_3(self) -> list[TestStep]:
5656 TestStep (1 , "Commissioning, already done" , is_commissioning = True ),
5757 TestStep (2 , "Read and verify MPTZPosition attribute." ),
5858 TestStep (3 , "Send an MPTZRelativeMove command with no fields. Verify failure response" ),
59- TestStep (4 , "If Pan is supported, read and verify the PanMin attribute. If not skip to step 14 " ),
59+ TestStep (4 , "If Pan is supported, read and verify the PanMin attribute. If not skip to step 12 " ),
6060 TestStep (5 , "Read and verify the PanMax attribute." ),
6161 TestStep (6 , "Create a valid value for a Pan, calculate the relative distance from the current Pan." ),
6262 TestStep (7 , "Set via MPTZRelativeMove command the relative Pan. Verify success response." ),
63- TestStep (8 , "Read MPTZPosition. Verify the Pan value is that set in Step 6 ." ),
63+ TestStep (8 , "Read MPTZPosition. Verify the Pan value is that set in Step 7. Verify the Tilt and Zoom are unchanged ." ),
6464 TestStep (9 , "Create an invalid value for a relative Pan that would exceed PanMax." ),
6565 TestStep (10 , "Set via MPTZSetRelativeMove command the invalid relative Pan. Verify success response." ),
6666 TestStep (11 , "Read MPTZPosition. Verify the Pan value is set to PanMax." ),
67- TestStep (12 , "If Tilt is supported, read and verify the TiltMin attribute. If not skip to step 22 " ),
67+ TestStep (12 , "If Tilt is supported, read and verify the TiltMin attribute. If not skip to step 20 " ),
6868 TestStep (13 , "Read and verify the TiltMax attribute." ),
6969 TestStep (14 , "Create a valid value for a Tilt, calculate the relative distance from the current Tilt." ),
7070 TestStep (15 , "Set via MPTZRelativeMove command the relative Tilt. Verify success response." ),
71- TestStep (16 , "Read MPTZPosition. Verify the Tilt value is that set in Step 17 ." ),
71+ TestStep (16 , "Read MPTZPosition. Verify the Tilt value is that set in Step 15. Verify that Pan and Zoom are unchanged ." ),
7272 TestStep (17 , "Create an invalid value for a relative Tilt that would exceed TiltMax." ),
7373 TestStep (18 , "Set via MPTZSetRelativeMove command the relative Tilt. Verify success response." ),
7474 TestStep (19 , "Read MPTZPosition. Verify the Tilt value is set to TiltMax." ),
7575 TestStep (20 , "If Zoom is supported, read and verify the ZoomMax attribute." ),
7676 TestStep (21 , "Create a valid value for a Zoom, calculate the relative distance from the current Zoom." ),
7777 TestStep (22 , "Set via MPTZRelativeMove command the relative Zoom. Verify success response." ),
78- TestStep (23 , "Read MPTZPosition. Verify the Zoom value is that set in Step 24. " ),
78+ TestStep (23 , "Read MPTZPosition. Verify the Zoom value is that set in Step 22. Verify the Pan and Tilt are unchanged " ),
7979 TestStep (24 , "Create an invalid value for a relative Zoom that would exceed ZoomMax." ),
8080 TestStep (25 , "Set via MPTZSetRelativeMove command the relative Zoom. Verify success response." ),
8181 TestStep (26 , "Read MPTZPosition. Verify the Zoom value is set to ZoomMax." ),
82- TestStep (27 , "If PIXIT.CANBEMADEBUSY is set, place the DUT into a state where it cannot accept a command. Else end the test cse ." ),
82+ TestStep (27 , "If PIXIT.CANBEMADEBUSY is set, place the DUT into a state where it cannot accept a command. Else end the test case ." ),
8383 TestStep (28 , "Send an MPTZRelativeMove Command with any previously set relative value. Verify busy failure response." ),
8484 ]
8585 return steps
@@ -112,9 +112,9 @@ async def test_TC_AVSUM_2_3(self):
112112 asserts .assert_in (attributes .MPTZPosition .attribute_id , attribute_list ,
113113 "MPTZPosition attribute is mandatory for command support." )
114114 mptzposition_dut = await self .read_avsum_attribute_expect_success (endpoint , attributes .MPTZPosition )
115- initialPan = mptzposition_dut .pan
116- initialTilt = mptzposition_dut .tilt
117- initialZoom = mptzposition_dut .zoom
115+ currentPan = mptzposition_dut .pan
116+ currentTilt = mptzposition_dut .tilt
117+ currentZoom = mptzposition_dut .zoom
118118
119119 self .step (3 )
120120 await self .send_null_mptz_relative_move_command (endpoint , expected_status = Status .InvalidCommand )
@@ -140,11 +140,11 @@ async def test_TC_AVSUM_2_3(self):
140140 # Create new Value for Pan
141141 while True :
142142 newPan = random .randint (pan_min_dut + 1 , pan_max_dut )
143- if newPan != initialPan :
143+ if newPan != currentPan :
144144 break
145145
146146 # Calulate the difference, this is the relative move
147- relativePan = abs (initialPan - newPan ) if (initialPan < newPan ) else - abs (newPan - initialPan )
147+ relativePan = abs (currentPan - newPan ) if (currentPan < newPan ) else - abs (newPan - currentPan )
148148
149149 self .step (7 )
150150 # Invoke the command with the new Pan value
@@ -154,6 +154,9 @@ async def test_TC_AVSUM_2_3(self):
154154 # Read the attribute back and make sure it was set
155155 newpan_mptzposition_dut = await self .read_avsum_attribute_expect_success (endpoint , attributes .MPTZPosition )
156156 asserts .assert_equal (newpan_mptzposition_dut .pan , newPan , "Received Pan does not match set Pan" )
157+ asserts .assert_equal (newpan_mptzposition_dut .tilt , currentTilt , "Tilt unexpectedly changed when only changing Pan" )
158+ asserts .assert_equal (newpan_mptzposition_dut .zoom , currentZoom , "Zoom unexpectedly changed when only changing Pan" )
159+ currentPan = newPan
157160
158161 self .step (9 )
159162 # Create an out of range value for Pan, verify it's clipped to PanMax
@@ -165,6 +168,8 @@ async def test_TC_AVSUM_2_3(self):
165168 self .step (11 )
166169 newpan_mptzposition_dut = await self .read_avsum_attribute_expect_success (endpoint , attributes .MPTZPosition )
167170 asserts .assert_equal (newpan_mptzposition_dut .pan , pan_max_dut , "Received Pan does not match PanMax" )
171+ currentPan = pan_max_dut
172+
168173 else :
169174 self .skip_step (4 )
170175 self .skip_step (5 )
@@ -194,10 +199,10 @@ async def test_TC_AVSUM_2_3(self):
194199 # Create new Value for Tilt
195200 while True :
196201 newTilt = random .randint (tilt_min_dut + 1 , tilt_max_dut )
197- if newTilt != initialTilt :
202+ if newTilt != currentTilt :
198203 break
199204
200- relativeTilt = abs (initialTilt - newTilt ) if (initialTilt < newTilt ) else - abs (newTilt - initialTilt )
205+ relativeTilt = abs (currentTilt - newTilt ) if (currentTilt < newTilt ) else - abs (newTilt - currentTilt )
201206
202207 self .step (15 )
203208 # Invoke the command with the new Tilt value
@@ -207,6 +212,9 @@ async def test_TC_AVSUM_2_3(self):
207212 # Read the attribute back and make sure it was set
208213 newtilt_mptzposition_dut = await self .read_avsum_attribute_expect_success (endpoint , attributes .MPTZPosition )
209214 asserts .assert_equal (newtilt_mptzposition_dut .tilt , newTilt , "Received Tilt does not match set Tilt" )
215+ asserts .assert_equal (newtilt_mptzposition_dut .pan , currentPan , "Pan unexpectedly changed when only changing Tilt" )
216+ asserts .assert_equal (newtilt_mptzposition_dut .zoom , currentZoom , "Zoom unexpectedly changed when only changing Tilt" )
217+ currentTilt = newTilt
210218
211219 self .step (17 )
212220 # Create an out of range value for Tilt, verify it's clipped to TiltMax
@@ -218,6 +226,8 @@ async def test_TC_AVSUM_2_3(self):
218226 self .step (19 )
219227 newtilt_mptzposition_dut = await self .read_avsum_attribute_expect_success (endpoint , attributes .MPTZPosition )
220228 asserts .assert_equal (newtilt_mptzposition_dut .tilt , tilt_max_dut , "Received Tilt does not match TiltMax" )
229+ currentTilt = tilt_max_dut
230+
221231 else :
222232 self .skip_step (12 )
223233 self .skip_step (13 )
@@ -240,10 +250,10 @@ async def test_TC_AVSUM_2_3(self):
240250 # Create new Value for Zoom
241251 while True :
242252 newZoom = random .randint (2 , zoom_max_dut )
243- if newZoom != initialZoom :
253+ if newZoom != currentZoom :
244254 break
245255
246- relativeZoom = abs (initialZoom - newZoom ) if (initialZoom < newZoom ) else - abs (newZoom - initialZoom )
256+ relativeZoom = abs (currentZoom - newZoom ) if (currentZoom < newZoom ) else - abs (newZoom - currentZoom )
247257
248258 self .step (22 )
249259 # Invoke the command with the new Zoom value
@@ -253,6 +263,8 @@ async def test_TC_AVSUM_2_3(self):
253263 # Read the attribute back and make sure it was set
254264 newzoom_mptzposition_dut = await self .read_avsum_attribute_expect_success (endpoint , attributes .MPTZPosition )
255265 asserts .assert_equal (newzoom_mptzposition_dut .zoom , newZoom , "Received Zoom does not match set Zoom" )
266+ asserts .assert_equal (newzoom_mptzposition_dut .pan , currentPan , "Pan unexpectedly changed when only changing Zoom" )
267+ asserts .assert_equal (newzoom_mptzposition_dut .tilt , currentTilt , "Tilt unexpectedly changed when only changing Zoom" )
256268
257269 self .step (24 )
258270 # Create an out of range value for Zoom, verify it's clipped to ZoomMax
0 commit comments