# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/OperationScenarios/Notifications/CCloseKellyCockLedNotification.f90"
module CCloseKellyCockLedNotification
    use OperationScenariosModule
    implicit none
    contains
    
    subroutine Evaluate_CloseKellyCockLed()
        implicit none
        
        
!        if (DriveType == TopDrive_DriveType) then
!#ifdef OST
!            print*, 'Evaluate_CloseKellyCockLed=TopDrive'
!#endif
!        endif
!
!
!
!
!
!
!
!
!
!
!        if (DriveType == Kelly_DriveType) then
!#ifdef OST
!            print*, 'Evaluate_CloseKellyCockLed=Kelly'
!#endif
!        endif
        
        
    end subroutine
    
! subroutine Subscribe_CloseKellyCockLed()
!     use CDrillingConsoleVariables
! use ConfigurationVariables
! use ConfigurationVariables
!     implicit none
!     call OnCloseKellyCockPress%Add(ButtonPress_CloseKellyCock)
! end subroutine
    
    subroutine ButtonPress_CloseKellyCock()
        implicit none
        
        
        if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
# 49

        endif
       
        if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
# 55

        
!OPERATION-CODE=66
            if (Get_OperationCondition() == OPERATION_DRILL .and.&
                Get_CloseKellyCockLed() == .false. .and.&
                Get_OpenKellyCockLed()) then
                call Set_OpenKellyCockLed(.false.)
                call Set_CloseKellyCockLed(.true.)
                return
            end if


        endif
        
        
        
        
        
        
    end subroutine
    
end module CCloseKellyCockLedNotification