Exemplo n.º 1
0
def main():

    controler = Controler()
    controler.start()
Exemplo n.º 2
0
def main():
	
	controler = Controler()
	controler.start()
Exemplo n.º 3
0
    def seuilChange(self):
        Hmin, Hmax, Smin, Smax, Vmin, Vmax = self.lireHSV()
        self.chgtSeuils.emit(Hmin, Hmax, Smin, Smax, Vmin, Vmax)

    # Affichage de l'image seuillée sur l'écran
    def majImageCouleur(self, img):
        height, width, channel = img.shape
        bytesPerLine = 3 * width
        mQImage = QImage(img, width, height, bytesPerLine,
                         QImage.Format_RGB888)
        pix = QPixmap.fromImage(mQImage)
        self.zoneImage.setPixmap(pix)

    def closeEvent(self, evnt):
        self.controler.finEpreuve()
        QApplication.instance().quit()
        sys.exit()
        print('fin close')


####################################################################################################################
if __name__ == "__main__":
    import sys
    app = QApplication(sys.argv)
    webcam = WebcamProcessing()
    controler = Controler(webcam)
    w = IhmTracking(webcam, controler)
    controler.start()  # Lance la séquence de toutes les épreuves
    w.show()
    sys.exit(app.exec_())
Exemplo n.º 4
0
import conf
import sys
from fatlease import Acceptor
from fatlease import Proposer
from fatlease import Dispatcher
from fatlease import LeaseManager
from fatlease import LeaseAdmin

from controler import Controler


if __name__  == '__main__':

    conf.parse_cmdline(sys.argv[1:])

    delegate = Dispatcher()
    acceptor = Acceptor(delegate)
    proposer = Proposer(delegate)
    #60 == lease expire time
    lease_manager = LeaseManager(proposer, acceptor, conf.lease_timeout)
    admin = LeaseAdmin(1234 + conf.myself.sid,lease_manager)


    control = Controler()
    control.set_admin(admin)
    control.add_event_thread(delegate)
    control.add_event_thread(acceptor)
    #control.add_event_thread(p)

    control.start()