Implement sound module to handle audio alerts
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
idf_component_register(
|
||||
SRCS "main.c"
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES console_wrapper display settings time wifi
|
||||
REQUIRES console_wrapper display settings sound time wifi
|
||||
)
|
||||
|
||||
@@ -16,6 +16,17 @@ menu "Bedside clock settings"
|
||||
string "Default SNTP server domain"
|
||||
default "pool.ntp.org"
|
||||
endmenu
|
||||
menu "Alert sound options"
|
||||
config ALERT_FREQ
|
||||
int "Frequency (in Hz) of the alert sound"
|
||||
default 300
|
||||
config ALERT_AMPLITUDE
|
||||
int "Amplitude (0 to 255) of the alert sound"
|
||||
default 180
|
||||
config ALERT_TOGGLE_PERIOD_MS
|
||||
int "Toggle period of alert sound in milliseconds"
|
||||
default 300
|
||||
endmenu
|
||||
config WIFI_MAX_RETRIES
|
||||
int "Maximum number of times to retry connecting to WiFi network"
|
||||
default 10
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "console.h"
|
||||
#include "display.h"
|
||||
#include "settings.h"
|
||||
#include "sound.h"
|
||||
#include "time_manager.h"
|
||||
#include "wifi.h"
|
||||
|
||||
@@ -16,4 +17,5 @@ void app_main(void)
|
||||
display_init();
|
||||
wifi_init();
|
||||
time_manager_init();
|
||||
sound_init();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user