diff --git a/project/example/ble/ble_peripheral/app/src/RF433.h b/project/example/ble/ble_peripheral/app/src/RF433.h index 53ae641..fb08b34 100644 --- a/project/example/ble/ble_peripheral/app/src/RF433.h +++ b/project/example/ble/ble_peripheral/app/src/RF433.h @@ -175,6 +175,7 @@ extern unsigned char receive_data_cnt; extern uint8_t res_data; extern uint8_t choose_mode_falsg; extern uint8_t choose_mode_bh; //模式变化 +extern uint8_t color_ring_active; diff --git a/project/example/ble/ble_peripheral/app/src/Rf433.c b/project/example/ble/ble_peripheral/app/src/Rf433.c index f0a74ac..9584508 100644 --- a/project/example/ble/ble_peripheral/app/src/Rf433.c +++ b/project/example/ble/ble_peripheral/app/src/Rf433.c @@ -39,6 +39,7 @@ uint8_t match_success=0; uint8_t choose_mode_falsg=0; uint8_t choose_mode_bh=0; //模式变化 +uint8_t color_ring_active=0; //色环调色状态,首次按模式键先回到暖光 void Delay_50us(unsigned int n) { @@ -595,6 +596,17 @@ const uint8_t ARR_temperature[255][2]={ void _433_fun(){ // uart_printf("ggg=%d\r\n",(int)res_data); + if(deviceStatus==POWERON && color_ring_active && + (res_data==Mode_add || res_data==Mode_dow || res_data==F_Mode_choose)){ + color_ring_active=0; + choose_mode_bh=0; + choose_mode_falsg=0; + dev_flag=0; + set_click(); + set_mode(); + mode_init(); + return; + } if(Key_TypeDef.KEY_STATE_Click==1||KEY_STATE_re==1) return; set_click(); @@ -759,6 +771,7 @@ void _433_fun(){ if (res_data >=16&& res_data <= 255){ //为了适配方形 接收到15的码值 要变成236 choose_mode_bh=1; + color_ring_active=1; if(res_data>=20&&res_data<40){ res_data=0; } diff --git a/project/example/ble/ble_peripheral/app/src/uart.c b/project/example/ble/ble_peripheral/app/src/uart.c index 0a7661a..9dab0f3 100644 --- a/project/example/ble/ble_peripheral/app/src/uart.c +++ b/project/example/ble/ble_peripheral/app/src/uart.c @@ -227,6 +227,7 @@ void scan_uart(uint8_t *arr) break; case 2: if(POWEROFF==deviceStatus)break; + color_ring_active=0; choose_mode_bh=0; choose_mode_falsg=user_rx_buf[1]-1; dev_flag=0; @@ -255,6 +256,7 @@ void scan_uart(uint8_t *arr) break; case 6: if(POWEROFF==deviceStatus)break; + color_ring_active=1; color_R_buff=user_rx_buf[1]; color_G_buff=color_R_buff; color_B_buff=user_rx_buf[2]; diff --git a/project/example/ble/ble_peripheral/mdk/output_bin/ble_peripheral.bin b/project/example/ble/ble_peripheral/mdk/output_bin/ble_peripheral.bin index 6fb0480..839f768 100644 Binary files a/project/example/ble/ble_peripheral/mdk/output_bin/ble_peripheral.bin and b/project/example/ble/ble_peripheral/mdk/output_bin/ble_peripheral.bin differ diff --git a/release/online/PWM32E(CW100%)_V1.0_XC6517_BFC6E4E0.bin b/release/online/PWM32E(CW100%)_V1.0_XC6517_BFC6E4E0.bin new file mode 100644 index 0000000..839f768 Binary files /dev/null and b/release/online/PWM32E(CW100%)_V1.0_XC6517_BFC6E4E0.bin differ diff --git a/release/ota/PWM32E(CW100%)_V1.0_XC6517_BFC6E4E0_OTA.bin b/release/ota/PWM32E(CW100%)_V1.0_XC6517_BFC6E4E0_OTA.bin new file mode 100644 index 0000000..7a09b62 Binary files /dev/null and b/release/ota/PWM32E(CW100%)_V1.0_XC6517_BFC6E4E0_OTA.bin differ