img5 = font.render(text5, True, pygame.color.THECOLORS['red']) rect5 = img5.get_rect() pygame.draw.rect(img5, pygame.color.THECOLORS['blue'], rect5, 1) img100 = font.render("Error code : {}".format(tm.state.errors), True, pygame.color.THECOLORS['red']) rect100 = img100.get_rect() pygame.draw.rect(img100, pygame.color.THECOLORS['blue'], rect100, 1) img101 = font.render( "State : {}, Mode : {}".format(tm.state.state, tm.state.mode), True, pygame.color.THECOLORS['red']) rect101 = img101.get_rect() pygame.draw.rect(img101, pygame.color.THECOLORS['blue'], rect101, 1) ecran.fill(pygame.color.THECOLORS['black']) ecran.blit(img1, (20, 20)) ecran.blit(img2, (20, 60)) ecran.blit(img3, (20, 100)) ecran.blit(img4, (20, 140)) ecran.blit(img5, (20, 180)) ecran.blit(img100, (20, 220)) ecran.blit(img101, (20, 260)) pygame.display.update() time.sleep(dt) print("ARRET") tm.estop() time.sleep(1)
img100 = font.render( "Error code : {}||{}".format(tm1.state.errors, tm2.state.errors), True, pygame.color.THECOLORS['red']) rect100 = img100.get_rect() pygame.draw.rect(img100, pygame.color.THECOLORS['blue'], rect100, 1) img101 = font.render( "State : {}||{}, Mode : {}||{}".format(tm1.state.state, tm2.state.state, tm1.state.mode, tm2.state.mode), True, pygame.color.THECOLORS['red']) rect101 = img101.get_rect() pygame.draw.rect(img101, pygame.color.THECOLORS['blue'], rect101, 1) ecran.fill(pygame.color.THECOLORS['black']) ecran.blit(img1, (20, 20)) ecran.blit(img2, (20, 60)) ecran.blit(img3, (20, 100)) ecran.blit(img4, (20, 140)) ecran.blit(img5, (20, 180)) ecran.blit(img100, (20, 220)) ecran.blit(img101, (20, 260)) pygame.display.update() time.sleep(dt) print("ARRET") tm1.estop() tm2.estop() time.sleep(1)