Browse Source

update

master
zwsd 3 years ago
parent
commit
90645dd337
  1. 13
      APP/main.c
  2. 3
      APP/this_device.h

13
APP/main.c

@ -136,6 +136,7 @@ static void mf_process_timer_key(key_t *key) {
if (this_device.time_led_num > 4) {
this_device.time_led_num = this_device.time_led_num - 4;
}
this_device.time_led_start_time = systicket_get_now_ms();
}
return;
@ -172,7 +173,15 @@ void device_level_process() {
}
}
//
void device_time_process() {}
void device_time_process() {
printf("led_num = %d,", this_device.time_led_num);
if (this_device.time_led_num > 0) {
if (systicket_haspassedms(this_device.time_led_start_time) > 5000) {
this_device.time_led_start_time = systicket_get_now_ms();
this_device.time_led_num = this_device.time_led_num - 1;
}
}
}
void hcis_shcedule_process() {
if (!this_device.power) {
@ -207,6 +216,8 @@ void configuration_shcedule() {
time_set_led_state(this_device.time_led_num, led_state);
led_state = !led_state;
}
} else {
time_set_led_state(this_device.time_led_num, true);
}
}

3
APP/this_device.h

@ -22,5 +22,6 @@ typedef struct {
uint32_t configuration_start_time;
uint8_t time_led_num;
uint32_t time_led_start_time;
} ThisDevice_t;
Loading…
Cancel
Save