#
# Copyright (c) 2018 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

menu "Application sample"

rsource "src/ui/Kconfig"
rsource "src/modules/Kconfig"
rsource "src/lwm2m/Kconfig"
rsource "src/fota_external/Kconfig"
menu "LwM2M objects"
config APP_PUSH_BUTTON
	bool "Enable button(s)"
	select UI_INPUT
	select LWM2M_IPSO_PUSH_BUTTON
	select LWM2M_APP_PUSH_BUTTON


config APP_ONOFF_SWITCH
	bool "Enable switches"
	depends on BOARD_NRF9160DK_NRF9160_NS || BOARD_NRF9161DK_NRF9161_NS
	select UI_INPUT
	select LWM2M_IPSO_ONOFF_SWITCH
	select LWM2M_APP_ONOFF_SWITCH


menuconfig APP_LIGHT_CONTROL
	bool "Enable LED(s)"
	select UI_LED
	select LWM2M_IPSO_LIGHT_CONTROL
	select LWM2M_APP_LIGHT_CONTROL

if APP_LIGHT_CONTROL
	rsource "src/ui/Kconfig.ui_led"
endif # APP_LIGHT_CONTROL


menuconfig APP_BUZZER
	bool "Enable buzzer"
	depends on BOARD_THINGY91_NRF9160_NS
	select UI_BUZZER
	select LWM2M_APP_BUZZER


menuconfig APP_LIGHT_SENSOR
	bool "Enable light sensor"
	select LIGHT_SENSOR
	select LWM2M_IPSO_APP_COLOUR_SENSOR
	select LWM2M_APP_LIGHT_SENSOR

if APP_LIGHT_SENSOR
	rsource "src/sensors/Kconfig.light_sensor"
	rsource "src/ipso/Kconfig.ipso_colour_sensor"
endif # APP_LIGHT_SENSOR


menuconfig APP_ENV_SENSOR
	bool "Enable environment sensors"
	select ENVIRONMENT_SENSOR
	help
	  Enables options for enabling temperature, pressure, humidity and gas resistance sensors.

if APP_ENV_SENSOR
rsource "src/sensors/Kconfig.env_sensor"

config APP_TEMP_SENSOR
	bool "Enable temperature sensor"
	select LWM2M_IPSO_TEMP_SENSOR
	select LWM2M_APP_TEMP_SENSOR

config APP_PRESS_SENSOR
	bool "Enable air pressure sensor"
	select LWM2M_IPSO_PRESSURE_SENSOR
	select LWM2M_APP_PRESS_SENSOR

config APP_HUMID_SENSOR
	bool "Enable humidity sensor"
	select LWM2M_IPSO_HUMIDITY_SENSOR
	select LWM2M_APP_HUMID_SENSOR

config APP_GAS_RES_SENSOR
	bool "Enable gas resistance sensor"
	select LWM2M_IPSO_GENERIC_SENSOR
	select LWM2M_APP_GAS_RES_SENSOR
endif # APP_ENV_SENSOR


menuconfig APP_ACCELEROMETER
	bool "Enable accelerometer"
	select ACCELEROMETER
	select LWM2M_IPSO_ACCELEROMETER
	select LWM2M_APP_ACCELEROMETER

if APP_ACCELEROMETER
	rsource "src/sensors/Kconfig.accelerometer"
endif # APP_ACCELEROMETER

menuconfig APP_GNSS
	bool "Enable GNSS"
	select GNSS
	select LWM2M_LOCATION_OBJ_SUPPORT

if APP_GNSS
	rsource "src/sensors/Kconfig.gnss"
endif # APP_GNSS

endmenu # LwM2M objects

config APP_LWM2M_PSK
	string "LwM2M pre-shared key for communication"
	default "000102030405060708090a0b0c0d0e0f"
	help
	  Pre Shared Key must be identical to the PSK registered with the device on the LwM2M server.
	  Use the hexadecimal representation.

config APP_ENDPOINT_PREFIX
	string "Prefix used in the endpoint name"
	default "urn:imei:"
	help
	  Sets the prefix of the endpoint name used when connecting to the LwM2M server.
menu "Device info"
config APP_MANUFACTURER
	string "Board manufacturer"
	default	"Nordic Semiconductor ASA"

config APP_DEVICE_TYPE
	string "Device type"
	default	"OMA-LWM2M Client"
endmenu

config APP_CUSTOM_VERSION
	string "Application version. Leave empty to use NCS version"

config APP_NEIGHBOUR_CELL_SCAN_INTERVAL
	int "Interval time [s] between neighbour cell scans"
	depends on LWM2M_CLIENT_UTILS_SIGNAL_MEAS_INFO_OBJ_SUPPORT
	default 600
	help
	  Low value on interval may reduce the performance of the system.

config APP_LWM2M_CONFORMANCE_TESTING
	bool "Send test payload periodically"
	help
	  Enable functionality that uses LwM2M SEND operation to deliver test payload.
	  This allows testing of SEND operation itself as well as "mute-send" resource.

module = APP
module-dep = LOG
module-str = Log level for sample
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
endmenu # Application sample


menu "Zephyr Kernel"
source "Kconfig.zephyr"
endmenu # Zephyr Kernel
