def on_startStopButton_mouseClick(self, event):
     if not self.on_runName_loseFocus():
         return False
     try:
         isCorrectFilename(self.filename)
     except:
         dialog.alertDialog(self, "The filename is not correct".format(self.filename), "Check you filename")
         return
     if not self._testSerialDevice(self.serialAr, " AR DEVICE"):
         return False
     if not self._testSerialDevice(self.serialArduino, " ARDUINO DEVICE"):
         return False
     if not self._testSerialDevice(self.serialImu, " IMU DEVICE"):
         return False
     if self.components.startStopButton.checked:
         # ------- dialog.alertDialog(self,'Startng RUN','Check you run name')
         # ------------------------------------ self._setRunMeta(self.runName)
         self.components.startStopButton.label = STARTBUTTON_STOP
         self.components.startStopButton.backgroundColor = STARTBUTTON_BACKGROUNDCOLOR_STOP
         self.running = True
     elif self.running:
         # ------ dialog.alertDialog(self,'Stopping RUN','Check you run name')
         self.running = False
         self.components.startStopButton.label = STARTBUTTON_WAIT
         self.components.startStopButton.enabled = False
 def on_startStopButton_mouseClick(self,event):  
     if not self.on_runName_loseFocus():
         return False
     try:
         isCorrectFilename(self.filename);
     except:
         dialog.alertDialog(self,"The filename is not correct".\
             format(self.filename),'Check you filename')
         return
     if not self._testSerialDevice(self.serialAr,' AR DEVICE'):
         return False
     if not self._testSerialDevice(self.serialArduino,' ARDUINO DEVICE'):
         return False
     if not self._testSerialDevice(self.serialImu,' IMU DEVICE'):
         return False
     if self.components.startStopButton.checked:
         #------- dialog.alertDialog(self,'Startng RUN','Check you run name')
         #------------------------------------ self._setRunMeta(self.runName)
         self.components.startStopButton.label = STARTBUTTON_STOP
         self.components.startStopButton.backgroundColor = STARTBUTTON_BACKGROUNDCOLOR_STOP
         self.running = True;
     elif self.running:
         #------ dialog.alertDialog(self,'Stopping RUN','Check you run name')
         self.running = False;
         self.components.startStopButton.label = STARTBUTTON_WAIT
         self.components.startStopButton.enabled = False;
 def on_filename_closeField(self, event=None):
     self.filename = self.components.filename.getLineText(0)
     try:
         isCorrectFilename(self.filename);
     except OutFileMustBeh5Extention:
         dialog.alertDialog(self,"The filename ({0}) must be specified with an '.h5' extension.".\
             format(self.filename),'Check you filename')
         return
     except OutFileMustBeAbsolutePath:
         dialog.alertDialog(self,"The filename ({0}) must be an absolute path.".\
             format(self.filename),'Check you filename')
         return
     self.title = os.path.split(self.filename)[-1] + ' - ' + self.startTitle
     self.statusBar.text = self.filename
     self._updateRunList()  
 def on_filename_closeField(self, event=None):
     self.filename = self.components.filename.getLineText(0)
     try:
         isCorrectFilename(self.filename)
     except OutFileMustBeh5Extention:
         dialog.alertDialog(
             self,
             "The filename ({0}) must be specified with an '.h5' extension.".format(self.filename),
             "Check you filename",
         )
         return
     except OutFileMustBeAbsolutePath:
         dialog.alertDialog(
             self, "The filename ({0}) must be an absolute path.".format(self.filename), "Check you filename"
         )
         return
     self.title = os.path.split(self.filename)[-1] + " - " + self.startTitle
     self.statusBar.text = self.filename
     self._updateRunList()
Пример #5
0
        help="Defaults to small marker.")
    options, arguments = parser.parse_args()
    if options.verbose:
        setLogger(logging.DEBUG)
        print "\n\n-------------------------------\n"
        print "VERBOSE MODE."
        print "\n\n-------------------------------\n"
        logging.debug('Enabled DEBUG MODE')
        DEBUG=True
    if(options.outfile==None):
        print "\n\n-------------------------------\n"
        print "Specify the out file (--outfile filename)"
        print "\n\n-------------------------------\n"
        exit()
    try:
        isCorrectFilename(options.outfile);
    except OutFileMustBeh5Extention:
        print "\n\n-------------------------------\n"
        print "The Outfile ({0}) must be specified have an '.h5' extension.".\
            format(options.outfile)
        print "\n\n-------------------------------\n"
        exit()
    except OutFileMustBeAbsolutePath:
        print "\n\n-------------------------------\n"
        print "The Outfile ({0}) must be specified as an absolute path.".\
            format(options.outfile)
        print "\n\n-------------------------------\n"
        exit()

    if(options.runname==None):
        print "\n\n-------------------------------\n"