status_b0 is False if (status_b1 is True): CORRECAO_NIVEL_1 = True while (CORRECAO_NIVEL_1 is True): a0, a1, _, _, b0, b1, _, _ = sensor.fototransistores() motor.movimento_direita(var.velCorrecaoN1, ctr_vel_motor_dir, ctr_vel_motor_esq) if (((b0 >= var.CONST_B0) and (b1 >= var.CONST_B1)) or (a0 <= var.CONST_A0) or (a1 <= var.CONST_A1)): CORRECAO_NIVEL_1 = False status_b1 is False gerencia.correcao_motor_esq(var.velVisao, ctr_vel_motor_dir, ctr_vel_motor_esq) CORRECAO_MOTOR_ESQ_VISAO = False if (CORRECAO_MOTOR_ESQ_VISAO is True or ((a0 <= var.CONST_A0 or a1 <= var.CONST_A1))): CORRECAO_MOTOR_ESQ_VISAO = True # ------------------------------------------------------------------------------ # -------------- Manter robô parado caso não atenda as condições --------------- else: #print("O Sistema apresentou uma anomalia! Aguardando...") motor.parar_movimento(ctr_vel_motor_dir, ctr_vel_motor_esq) # ------------------------------------------------------------------------------- # -------------------------- Apresentacao Telas --------------------------------- #interface.apresenta_tela("Imagem Original", imagem, 580, 10) #interface.apresenta_tela("Sinalizacoes da Direita", imagem_sinalizacao_dir, 1080, 10)