def OnInit(self):

        try:
            if internal.state.SHARED_INIT_STATE is internal.consts.INIT_INCOMPLETE:
                # Run shared init functions
                internal.sharedInit()

            # Set the device into Extended Mode
            internal.extendedMode.setVal(True, force=True)

            # Process inControl preferences | Say it's external since we want the settings to be applied regardless
            if config.START_IN_INCONTROL_KNOBS == False:
                internal.extendedMode.setVal(False,
                                             eventconsts.INCONTROL_KNOBS,
                                             from_internal=False)
            if config.START_IN_INCONTROL_FADERS == False:
                internal.extendedMode.setVal(False,
                                             eventconsts.INCONTROL_FADERS,
                                             from_internal=False)
            if config.START_IN_INCONTROL_PADS == False:
                internal.extendedMode.setVal(False,
                                             eventconsts.INCONTROL_PADS,
                                             from_internal=False)

        except Exception as e:
            internal.errors.triggerError(e)

        print('Initialisation complete')
        print(internal.getLineBreak())
        print(internal.getLineBreak())
        print("")
        print("")
 def OnDeInit(self):
     try:
         # Return the device into Basic Mode
         internal.extendedMode.setVal(False)
         print('Deinitialisation complete')
         print(internal.getLineBreak())
         print(internal.getLineBreak())
         print("")
         print("")
     except Exception as e:
         internal.errors.triggerError(e)
Exemple #3
0
    def OnInit(self):

        try:
            if internal.state.SHARED_INIT_STATE is internal.consts.INIT_INCOMPLETE:
                # Run shared init functions
                internal.sharedInit()
        except Exception as e:
            internal.errors.triggerError(e)

        print('Initialisation complete')
        print(internal.getLineBreak())
        print(internal.getLineBreak())
        print("")
        print("")