# Don't warn about undefined variables
CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=n

# Empirical value to prevent a firmware crash due to stack overflow.
CONFIG_MAIN_TASK_STACK_SIZE=8192

# Enable address reuse for sockets in TIME_WAIT
# see https://github.com/nodemcu/nodemcu-firmware/pull/1838
CONFIG_LWIP_SO_REUSE=y

# Decrease the duration of sockets in TIME_WAIT
# see https://github.com/nodemcu/nodemcu-firmware/issues/1836
CONFIG_TCP_MSL=5000

# Allow writing to dangerous regions to avoid boot loops when creating filesystem
# Symptom:
#   Mounting flash filesystem...
#   No filesystem partition found, attempting to create it...
#   abort() was called at PC 0x400ecddd on core 0
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED=y

# Enable panic handler for task wdt to reset the firmware upon wdt timeout
CONFIG_TASK_WDT_PANIC=y

# Disable advanced features by default
CONFIG_MQTT_TRANSPORT_SSL=n
CONFIG_MQTT_TRANSPORT_WEBSOCKET=n
CONFIG_MQTT_USE_CUSTOM_CONFIG=n

# Disable esp-idf's bluetooth component by default.
# The bthci module is also disabled and will enable bt when selected
CONFIG_BT_ENABLED=n