Can someone explain to me what is the purpose of self = self in this code?
// Keep the reference to the interface :
private var guidedItfRef: Ref<GuidedPilotingItf>?
private var goUp: Bool
...
guidedItfRef = provider.getPilotingItf(PilotingItfs.guided) { [weak self] guidedItf in
if let guidedItf = guidedItf, let self = self, guidedItf.currentDirective == nil {
self.goUp = !self.goUp
guidedItf.moveToRelativePosition(forwardComponent: 0, rightComponent: 0,
downwardComponent: self.goUp ? 2.0 : -3.0 , headingRotation: 0)
}
}