Skip to content

Commit

Permalink
Call Flap Controller
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Nov 15, 2019
1 parent e8d0581 commit ca9f165
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
21 changes: 11 additions & 10 deletions src/Controllers.f90
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,16 @@ SUBROUTINE FlapControl(avrSWAP, CntrPar, LocalVar, objInst)
TYPE(ObjectInstances), INTENT(INOUT) :: objInst

! Flap control

LocalVar%Flp_Angle(1) = CntrPar%Flp_Angle * D2R
LocalVar%Flp_Angle(2) = CntrPar%Flp_Angle * D2R
LocalVar%Flp_Angle(3) = CntrPar%Flp_Angle * D2R

! Send to AVRSwap
avrSWAP(120) = LocalVar%Flp_Angle(1)
avrSWAP(121) = LocalVar%Flp_Angle(2)
avrSWAP(122) = LocalVar%Flp_Angle(3)

IF (CntrPar%Flp_Mode) THEN
LocalVar%Flp_Angle(1) = CntrPar%Flp_Angle * D2R
LocalVar%Flp_Angle(2) = CntrPar%Flp_Angle * D2R
LocalVar%Flp_Angle(3) = CntrPar%Flp_Angle * D2R
! Send to AVRSwap
avrSWAP(120) = LocalVar%Flp_Angle(1)
avrSWAP(121) = LocalVar%Flp_Angle(2)
avrSWAP(122) = LocalVar%Flp_Angle(3)
ELSE
RETURN
ENDIF
END SUBROUTINE FlapControl
END MODULE Controllers
3 changes: 2 additions & 1 deletion src/DISCON.F90
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ SUBROUTINE DISCON(avrSWAP, aviFAIL, accINFILE, avcOUTNAME, avcMSG) BIND (C, NAME
CALL VariableSpeedControl(avrSWAP, CntrPar, LocalVar, objInst)
CALL PitchControl(avrSWAP, CntrPar, LocalVar, objInst)
CALL YawRateControl(avrSWAP, CntrPar, LocalVar, objInst)

CALL FlapControl(avrSWAP, CntrPar, LocalVar, objInst)

CALL Debug(LocalVar, CntrPar, avrSWAP, RootName, SIZE(avcOUTNAME))
END IF

Expand Down

0 comments on commit ca9f165

Please sign in to comment.