Add compile option for blue light when connected

This commit is contained in:
Finlay Davidson 2023-02-20 11:30:10 +01:00
parent 0b58ae6cb2
commit e5d98d072f
2 changed files with 29 additions and 0 deletions

View file

@ -173,6 +173,7 @@ int app_status_indication_set(APP_STATUS_INDICATION_T status) {
app_pwl_start(APP_PWL_ID_1);
break;
case APP_STATUS_INDICATION_CONNECTED:
#ifdef DISABLE_CONNECTED_BLUE_LIGHT
cfg0.part[0].level = 0;
cfg0.part[0].time = (500);
cfg0.parttotal = 1;
@ -183,6 +184,27 @@ int app_status_indication_set(APP_STATUS_INDICATION_T status) {
app_pwl_start(APP_PWL_ID_0);
app_pwl_setup(APP_PWL_ID_1, &cfg0);
app_pwl_start(APP_PWL_ID_1);
#else
cfg0.part[0].level = 1;
cfg0.part[0].time = (500);
cfg0.part[1].level = 0;
cfg0.part[1].time = (3000);
cfg0.parttotal = 2;
cfg0.startlevel = 1;
cfg0.periodic = true;
cfg1.part[0].level = 0;
cfg1.part[0].time = (500);
cfg1.part[1].level = 0;
cfg1.part[1].time = (3000);
cfg1.parttotal = 2;
cfg1.startlevel = 0;
cfg1.periodic = true;
app_pwl_setup(APP_PWL_ID_0, &cfg0);
app_pwl_start(APP_PWL_ID_0);
app_pwl_setup(APP_PWL_ID_1, &cfg1);
app_pwl_start(APP_PWL_ID_1);
#endif
break;
case APP_STATUS_INDICATION_CHARGING:
cfg1.part[0].level = 1;

View file

@ -87,6 +87,9 @@ export VOICE_DETECTOR_EN ?= 0
# 1 to use 8K sample rate for VAD, 0 to use 16K sample rate for VAD
VAD_USE_8K_SAMPLE_RATE ?= 0
# 1 to enable the blue flashing light when connected, 0 to disable
CONNECTED_BLUE_LIGHT ?= 0
# -------------------------------------------
# Root Option Dependencies
# -------------------------------------------
@ -190,6 +193,10 @@ export BT_APP ?= 1
FULL_APP_PROJECT ?= 1
endif
ifeq ($(strip $(CONNECTED_BLUE_LIGHT)),0)
KBUILD_CPPFLAGS += -DDISABLE_CONNECTED_BLUE_LIGHT
endif
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# OTA features
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^