Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

114 lines
2.5 KiB

  1. module CFillMouseHoleLedNotification
  2. use COperationScenariosVariables
  3. implicit none
  4. contains
  5. subroutine Evaluate_FillMouseHoleLed()
  6. implicit none
  7. ! if (DriveType == TopDrive_DriveType) then
  8. !#ifdef OST
  9. ! print*, 'Evaluate_FillMouseHoleLed=TopDrive'
  10. !#endif
  11. ! endif
  12. !
  13. !
  14. !
  15. !
  16. !
  17. !
  18. !
  19. !
  20. ! if (DriveType == Kelly_DriveType) then
  21. !#ifdef OST
  22. ! print*, 'Evaluate_FillMouseHoleLed=Kelly'
  23. !#endif
  24. ! endif
  25. end subroutine
  26. ! subroutine Subscribe_FillMouseHoleLed()
  27. ! use CDrillingConsoleVariables
  28. ! implicit none
  29. ! call OnFillMouseHolePress%Add(ButtonPress_FillMouseHole)
  30. ! end subroutine
  31. subroutine ButtonPress_FillMouseHole()
  32. implicit none
  33. if (DriveType == TopDrive_DriveType) then
  34. #ifdef OST
  35. print*, 'Evaluate_FillMouseHoleLed=TopDrive'
  36. #endif
  37. !TOPDRIVE-CODE=71
  38. if (Get_FillMouseHoleLed()) then
  39. call Set_FillMouseHoleLed(.false.)
  40. call Set_MouseHole(MOUSE_HOLE_NEUTRAL)
  41. return
  42. end if
  43. !TOPDRIVE-CODE=72
  44. if (Get_TdsElevatorModes() /= TDS_ELEVATOR_CONNECTION_STRING .and.&
  45. Get_FillMouseHoleLed() == .false.) then
  46. call Set_FillMouseHoleLed(.true.)
  47. return
  48. end if
  49. endif
  50. if (DriveType == Kelly_DriveType) then
  51. #ifdef OST
  52. print*, 'Evaluate_FillMouseHoleLed=Kelly'
  53. #endif
  54. !OPERATION-CODE=81
  55. if (Get_FillMouseHoleLed()) then
  56. call Set_FillMouseHoleLed(.false.)
  57. call Set_MouseHole(MOUSE_HOLE_EMPTY)
  58. return
  59. end if
  60. !OPERATION-CODE=82
  61. if (Get_KellyConnection() /= KELLY_CONNECTION_SINGLE .and.&
  62. Get_ElevatorConnection() /= ELEVATOR_CONNECTION_SINGLE .and.&
  63. Get_FillMouseHoleLed() == .false.) then
  64. call Set_FillMouseHoleLed(.true.)
  65. call Set_MouseHole(MOUSE_HOLE_FILL)
  66. return
  67. end if
  68. endif
  69. end subroutine
  70. end module CFillMouseHoleLedNotification