is there any slick way to control the menuConfig selections programmatically?
Probably not in the way you are thinking. The contents of the sdkconfig file are macro definitions, anywhere they appear in the code, they are replaced with that value that macro represents. What this means is once the code is running, those macro definitions don't even exist anymore, just their values.
example
Code: Select all
#include "freertos/FreeRTOS.h"
#define TAG "main"
....
ESP_LOGI(TAG, "app_main running");
After the preprocessing step runs, the code that is actually compiled looks like
Code: Select all
#include "freertos/FreeRTOS.h"
....
ESP_LOGI("main" "app_main running");
There is one way to change the values, but as it can only happen once, before the code starts running, it's not super useful, unless you're making the changes based on other sdkconfig values.
Code: Select all
#ifdef TAG
#undef TAG
#define TAG "main2"
#endif