from alarm_time import get_time, set_alarm new_setting = get_time() set_alarm(new_setting[0], new_setting[1], new_setting[2])
press_before = time.time() if n == right: alarm_time.mpc_screen(lcd) lcd_string_prev = '' before = 0 press_before = time.time() + 0.5 elif n == left: alarm_time.cur_track_screen(lcd) lcd_string_prev = '' before = 0 press_before = time.time() + 0.5 elif n == up: lcd_on = not lcd_on press_before = time.time() + 0.5 elif n == down: new_setting = alarm_time.get_time() alarm_time.set_alarm(new_setting[0], new_setting[1], new_setting[2]) fun = alarm_time.alarm_time(crontab, alarm) crontab = fun[0] alarm = fun[1] lcd_string = alarm_time.message_gen(time_date, alarm) press_before = time.time() elif n == select: alarm_time.main_menu(lcd, colour) lcd_string_prev = '' before = 0 press_before = time.time() + 0.5 elif lcd_on and time.time() - press_before > 30 and n == up: press_before = time.time() elif not lcd_on and n == up and time.time() - press_before > wait_time/4.0: lcd_on = not lcd_on