Exemplo n.º 1
0
from alarm_time import get_time, set_alarm

new_setting = get_time()
set_alarm(new_setting[0], new_setting[1], new_setting[2])
Exemplo n.º 2
0
 def set_alarm(self, widget=None):
     self.press_before = time.time()
     alarm_time.set_alarm(int(self.alarm_hour_setting), int(self.alarm_minute_setting), True)
     self.update_alarm()
     self.update_alarm_button()
     self.cancel_set_alarm()
Exemplo n.º 3
0
     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
     press_before = time.time()
Exemplo n.º 4
0
from alarm_time import get_time, set_alarm

new_setting = get_time()
set_alarm(new_setting[0], new_setting[1], False)