瀏覽代碼

添加律动修改

liuhao 2 年之前
父節點
當前提交
f8f1d0c06f

+ 16 - 3
YC1166_SDK_SmartLight_Prj/cm0/Librarier/sc_user/u_effect_rhythm.c

@@ -1,6 +1,7 @@
 #include "user_driver.h"
 #include "u_effect_rhythm.h"
 #include "u_main.h"
+#include "u_pwm_drive.h"
 
 
 RhythmPara_t 		g_normal_rhythm 	= {0x00};	//全彩律动
@@ -162,14 +163,17 @@ void driver_rhythm_timer_cd(void)//
 				 //U_UART_PRINTF("MODE_JUMP_BRIGHT\n");
 				g_normal_rhythm.speed = 27 - speed * 5;    //律动速度
 				//U_UART_PRINTF("f3_sd = %d\n", g_normal_rhythm.speed);
+				light_rhythm_mode_jump_timer_cb(&g_normal_rhythm);	
 			}
 			else
 			{
+//				g_normal_rhythm.bright = LIGHT_BRIGHT_MIN;
 				g_normal_rhythm.bright = LIGHT_BRIGHT_MIN;
 				g_normal_rhythm.speed  = 0;
 				//U_UART_PRINTF("MODE_JUMP_MIN_BRIGHT\n");
+				light_set_color(0);
 			}
-			light_rhythm_mode_jump_timer_cb(&g_normal_rhythm);	
+			
 		}
 		break;
 		case RHYTHM_MODE_GRADUAL_7://渐变律动模式
@@ -206,8 +210,13 @@ void driver_rhythm_timer_cd(void)//
 				g_normal_rhythm.speed = 27 - speed * 5;
 				g_normal_rhythm.music_start = 1;
 				//U_UART_PRINTF("f7_sd = %d\n", g_normal_rhythm.speed);
+				light_rhythm_mode_fade_timer_cb(&g_normal_rhythm);
 			}
-			light_rhythm_mode_fade_timer_cb(&g_normal_rhythm);
+			else
+			{
+			  light_set_color(0);
+			}
+			
 		}
 		break;
 		case RHYTHM_MODE_FADE_3:
@@ -219,8 +228,12 @@ void driver_rhythm_timer_cd(void)//
 				g_normal_rhythm.music_start = 1;	
 				g_normal_rhythm.speed = 15;
 				//U_UART_PRINTF("f3_sd = %d\n", g_normal_rhythm.speed);
+				light_rhythm_mode_fade_timer_cb(&g_normal_rhythm);
+			}else
+			{
+			  light_set_color(0);
 			}
-			light_rhythm_mode_fade_timer_cb(&g_normal_rhythm);
+			
 		}
 		break;
 	}	

+ 7 - 7
YC1166_SDK_SmartLight_Prj/cm0/Librarier/user/user_driver.h

@@ -5,13 +5,13 @@
 #include "system.h"
 
 #define firmware_version "YC1166_V1.0.7"						//	固件版本号
-#define firmware_is_mic		0 												//是否支持mic
+#define firmware_is_mic		1 												//是否支持mic
 #define userset_mac_en		0													//是否设置mac地址 量产时一定关闭  否则批量烧录时设置不了mac地址
 
 /*双面板大板io*/
-//#define PWM_CHANCE_B  	(25)
-//#define PWM_CHANCE_R  	(24)
-//#define PWM_CHANCE_G    (0)
+#define PWM_CHANCE_B  	(25)
+#define PWM_CHANCE_R  	(24)
+#define PWM_CHANCE_G    (0)
 
 //试产单面板
 //#define PWM_CHANCE_B  	(24)
@@ -19,9 +19,9 @@
 //#define PWM_CHANCE_G    (0)
 
 /*迷你小板io*/
-#define PWM_CHANCE_B  	(24)
-#define PWM_CHANCE_R  	(25)
-#define PWM_CHANCE_G    (0)
+//#define PWM_CHANCE_B  	(24)
+//#define PWM_CHANCE_R  	(25)
+//#define PWM_CHANCE_G    (0)
 
 #define BLE_SEND_HANDLE 0x001e 
 #define NEC_ENABLE 1

文件差異過大導致無法顯示
+ 115 - 115
YC1166_SDK_SmartLight_Prj/cm0/ModuleDemo/SmartLight_Prj/Prj/MDK/Objects/output/flash.dat


文件差異過大導致無法顯示
+ 143 - 143
YC1166_SDK_SmartLight_Prj/cm0/ModuleDemo/SmartLight_Prj/Prj/MDK/Objects/output/out.rom


+ 1 - 2
YC1166_SDK_SmartLight_Prj/cm0/ModuleDemo/SmartLight_Prj/Prj/MDK/Objects/output/user_download.bat

@@ -9,10 +9,9 @@ e k&e p
 e pu
 e fr 0 10
 e fe 10
-e fp D12112_BLE_YC1166_V1.0.7_20220104_dat_release_mic_CB2F.dat
+e fp D22102_BLE_YC1166_V1.0.7_20220302_dat_release_nomic_4815.dat
 e fr 0 20
 e ku
 e k
 echo downloadOK
 timeout /T 3 /NOBREAK
-

文件差異過大導致無法顯示
+ 6 - 7
YC1166_SDK_SmartLight_Prj/cm0/ModuleDemo/SmartLight_Prj/Prj/MDK/yc11xx.uvguix.liuhao


部分文件因文件數量過多而無法顯示