|
8 | 8 | Private m_StepSize, m_Temperature As Double |
9 | 9 | Private m_TempCompTrueOK, m_TempCompFalseOK As Boolean ' Variable to confirm that TempComp can be successfully set to True |
10 | 10 | Private m_AbsolutePositionOK As Boolean = False ' Variable to confirm that absolute position can be read OK |
| 11 | + Private m_CanReadIsMoving As Boolean = False ' Variable to confirm that IsMoving can be read OK |
| 12 | + Private m_CanReadTemperature As Boolean = False ' Variable to confirm that Temperature can be read OK |
11 | 13 |
|
12 | 14 | Private Const GOOD_MOVE_TOLERANCE As Integer = 2 ' ± Position tolerance within which a move will be considered to be OK |
13 | 15 | Private Const OUT_OF_RANGE_INCREMENT As Integer = 10 ' For absolute focusers, the position delta, below 0 or above maximum steps, to test that the focuser will not move to the specified position |
|
239 | 241 | 'IsMoving - Required |
240 | 242 | Try |
241 | 243 | LogCallToDriver("IsMoving", "About to get IsMoving property") |
| 244 | + m_CanReadIsMoving = False |
242 | 245 | m_IsMoving = m_Focuser.IsMoving |
243 | 246 | If Not m_IsMoving Then |
244 | 247 | LogMsg("IsMoving", MessageLevel.msgOK, m_IsMoving.ToString) |
| 248 | + m_CanReadIsMoving = True |
245 | 249 | Else |
246 | 250 | LogMsg("IsMoving", MessageLevel.msgError, "IsMoving is True at start of tests and it should be false") |
247 | 251 | End If |
|
373 | 377 |
|
374 | 378 | 'Temperature - Optional |
375 | 379 | Try |
| 380 | + m_CanReadTemperature = False |
376 | 381 | LogCallToDriver("Temperature", "About to get Temperature property") |
377 | 382 | m_Temperature = m_Focuser.Temperature |
378 | 383 | Select Case m_Temperature |
|
382 | 387 | LogMsg("Temperature", MessageLevel.msgWarning, "Temperature > 50.0, - possibly an issue, actual value: " & m_Temperature.ToString) |
383 | 388 | Case Else |
384 | 389 | LogMsg("Temperature", MessageLevel.msgOK, m_Temperature.ToString) |
| 390 | + m_CanReadTemperature = True |
385 | 391 | End Select |
386 | 392 | Catch ex As Exception |
387 | 393 | HandleException("Temperature", MemberType.Property, Required.Optional, ex, "") |
|
637 | 643 |
|
638 | 644 | Overrides Sub CheckPerformance() |
639 | 645 | 'Position |
640 | | - If True Then |
| 646 | + If m_AbsolutePositionOK Then |
641 | 647 | FocuserPerformanceTest(FocuserPropertyMethod.Position, "Position") |
642 | 648 | Else |
643 | 649 | LogMsg("Position", MessageLevel.msgInfo, "Skipping test as property is not supported") |
644 | 650 | End If |
645 | 651 |
|
646 | 652 | 'IsMoving |
647 | | - If True Then |
| 653 | + If m_CanReadIsMoving Then |
648 | 654 | FocuserPerformanceTest(FocuserPropertyMethod.IsMoving, "IsMoving") |
649 | 655 | Else |
650 | 656 | LogMsg("IsMoving", MessageLevel.msgInfo, "Skipping test as property is not supported") |
651 | 657 | End If |
652 | 658 |
|
653 | | - 'IsMoving |
654 | | - If True Then |
| 659 | + 'Temperature |
| 660 | + If m_CanReadTemperature Then |
655 | 661 | FocuserPerformanceTest(FocuserPropertyMethod.Temperature, "Temperature") |
656 | 662 | Else |
657 | 663 | LogMsg("Temperature", MessageLevel.msgInfo, "Skipping test as property is not supported") |
|
0 commit comments