Exemple #1
0
 def updateCallsignFilter(self):
     sel = selection.selectedCallsign()
     if sel != None:
         self.last_selected_callsign = sel
         self.historyWith_radioButton.setText('History with ' + sel)
     if self.historyWith_radioButton.isChecked():
         self.filter_model.setCallsignFilter(self.last_selected_callsign)
     else:  # user wants to filter on live status (accept all callsigns)
         self.filter_model.setCallsignFilter(None)
Exemple #2
0
def transfer_selected_or_instruct(next_atc_callsign):
    '''
	CAUTION: Should not be called as teacher
	'''
    assert settings.session_manager.session_type != SessionType.TEACHER
    selected_callsign = selection.selectedCallsign()
    data_auth_transferred = False
    if settings.CPDLC_authority_transfers and selected_callsign != None and env.cpdlc.isConnected(
            selected_callsign):
        try:
            settings.session_manager.transferCpdlcAuthority(
                selected_callsign, next_atc_callsign)
            data_auth_transferred = True
        except CpdlcAuthorityTransferFailed:
            pass
    if data_auth_transferred:
        QMessageBox.information(settings.session_manager.gui, 'CPDLC transfer', \
          'Data authority transferred to %s' % next_atc_callsign)
    else:  # Hand over through regular instruction, possibly through data link
        instr = env.ATCs.handoverInstructionTo(next_atc_callsign)
        send_instruction(some(selected_callsign, ''), instr,
                         settings.CPDLC_suggest_handover_instructions)
Exemple #3
0
	def updateDestOnNewSelection(self):
		if settings.session_manager.session_type != SessionType.TEACHER:
			self.dest_edit.setText(some(selection.selectedCallsign(), ''))
	def updateSuggestionFromSelection(self):
		cs = selection.selectedCallsign()
		if cs != None:
			self.callsign_suggestion = cs
Exemple #5
0
 def suggestChatDestFromNewSelection(self):
     cs = selection.selectedCallsign()
     if cs != None:
         self.dest_combo.setEditText(cs)
Exemple #6
0
 def instructAircraftByCallsign(self, callsign, instr):
     sugg = instr.suggestTextChatInstruction(
         selection.acft if callsign ==
         selection.selectedCallsign() else None)
     signals.chatInstructionSuggestion.emit(callsign, sugg, False)
Exemple #7
0
def instruct_selected_with_taxi(instr):
    send_instruction(some(selection.selectedCallsign(), ''), instr, False)
Exemple #8
0
def instruct_selected_with_vector(instr):
    send_instruction(some(selection.selectedCallsign(), ''), instr,
                     settings.CPDLC_suggest_vector_instructions)