def insertFunction ( self, insertIndex ): newFHeader = MAVFSettingsAPI.functionBlockHeaderSub("NULL", "NULL", "CLEAR", "Do nothing") newFSettings = [] newfunc = MAVFSettingsAPI.functionSub(newFHeader, newFSettings) self.MAVFSettings.functions.function.insert(insertIndex, newfunc) self.m_call_callbacks(callback_type.REGISTERS_CHANGED, insertIndex)
def addFunction ( self ): newFHeader = MAVFSettingsAPI.functionBlockHeaderSub("NULL", "NULL", "CLEAR", "Do nothing") newFSettings = [] newfunc = MAVFSettingsAPI.functionSub(newFHeader, newFSettings) self.MAVFSettings.functions.function.append(newfunc) self.m_call_callbacks(callback_type.REGISTERS_CHANGED, 0)