Beispiel #1
0
 def action_when_go_to_REAL_TIME_GRAPH(self, frame: GraphFrame):
     import platform
     if platform.system() != 'Windows':
         from hardware import Hardware
         Hardware.getInstance().activateSelectorVmax()
         Hardware.getInstance().deactivateSelectorMachine()
     self.animationForGraphFrameFunction = frame.startAnimation()
     frame.setDuration(ChromaAnalyse.getInstance().getDuration())
     RootView.getInstance().unbind(
         "<<" +
         self.controller.convertBrocheToBrocheName(Broche.BUTTON_OK) + ">>")
     return frame
Beispiel #2
0
 def action_when_quit_REAL_TIME_GRAPH(self):
     import platform
     if platform.system() != 'Windows':
         from hardware import Hardware
         Hardware.getInstance().deactivateSelectorVmax()
         #TODO: verify if usb key is inserted
         ChromaAnalyse.getInstance().saveDataToUsbKey()
         RootView.getInstance().getFrame().saveImageOfGraphWithName(
             ChromaAnalyse.getInstance().getKeyPath() +
             ChromaAnalyse.getInstance().getNameOfFile())
     self.animationForGraphFrameFunction = None
     popup = Popup()
     #bind to quit popup
     RootView.getInstance().bind(
         "<<" +
         self.controller.convertBrocheToBrocheName(Broche.BUTTON_OK) + ">>",
         popup.quit)
     RootView.getInstance().bind(
         "<<" +
         self.controller.convertBrocheToBrocheName(Broche.BUTTON_STOP) +
         ">>", popup.quit)
     #display popup
     title = "Matériel d'enregistrement"
     message = "Les données ont bien été enregistrées sur la clé USB\n:)"
     popup.popupInformation(title=title, message=message)
     popup.destroy()
     #unbind stop an ok to quit
     RootView.getInstance().unbind(
         "<<" +
         self.controller.convertBrocheToBrocheName(Broche.BUTTON_OK) + ">>")
     RootView.getInstance().unbind(
         "<<" +
         self.controller.convertBrocheToBrocheName(Broche.BUTTON_STOP) +
         ">>")
     #bind ok,stop to next an previous page
     RootView.getInstance().bind(
         "<<" +
         self.controller.convertBrocheToBrocheName(Broche.BUTTON_OK) + ">>",
         self.controller.goToNextPage)
     RootView.getInstance().bind(
         "<<" +
         self.controller.convertBrocheToBrocheName(Broche.BUTTON_STOP) +
         ">>", self.controller.goToPreviousPage)
     ChromaAnalyse.getInstance().reset()
Beispiel #3
0
 def action_when_go_to_HOME(self, frame: HomeFrame):
     import platform
     if platform.system() != 'Windows':
         from hardware import Hardware
         Hardware.getInstance().activateSelectorMachine()
     return frame