Make it mandatory to select a factory reset method

... in order to avoid unhappy surprises
This commit is contained in:
rbaron 2023-07-01 08:26:21 +02:00
parent 37aff683ad
commit bc3d834b20

View file

@ -66,7 +66,10 @@ int prst_zb_factory_reset_check() {
LOG_DBG("SW1 pressed. Scheduling timer"); LOG_DBG("SW1 pressed. Scheduling timer");
k_timer_start(&sw1_factory_reset_check_timer, K_SECONDS(5), K_NO_WAIT); k_timer_start(&sw1_factory_reset_check_timer, K_SECONDS(5), K_NO_WAIT);
} }
return 0;
#elif CONFIG_PRST_ZB_FACTORY_RESET_DISABLED #elif CONFIG_PRST_ZB_FACTORY_RESET_DISABLED
return 0; return 0;
#else
#error "No factory reset method selected -- explicitly select CONFIG_PRST_ZB_FACTORY_RESET_DISABLED=y to disable it"
#endif // CONFIG_PRST_ZB_FACTORY_RESET_VIA_RESET_PIN #endif // CONFIG_PRST_ZB_FACTORY_RESET_VIA_RESET_PIN
} }