Gotcha, yep. Was looking at core/board_detect.cpp ie
static const std::map<std::string,BelaHw> belaHwMap = {
{"NoHardware", BelaHw_NoHw},
{"Bela", BelaHw_Bela},
{"BelaMini", BelaHw_BelaMini},
{"Salt", BelaHw_Salt},
{"CtagFace", BelaHw_CtagFace},
{"CtagBeast", BelaHw_CtagBeast},
{"CtagFaceBela", BelaHw_CtagFaceBela},
{"CtagBeastBela", BelaHw_CtagBeastBela},
{"BelaMiniMultiAudio", BelaHw_BelaMiniMultiAudio},
{"BelaMiniMultiTdm", BelaHw_BelaMiniMultiTdm},
{"BelaMultiTdm", BelaHw_BelaMultiTdm},
{"BelaMiniMultiI2s", BelaHw_BelaMiniMultiI2s},
{"Batch", BelaHw_Batch},
};
and got to thinking, well, PEPPER isn't necessarily a "cape" in the Beaglebone sense, if it is a front panel that exposes I/O in a particular physical format, largely passively, such that you can't really know you're "wearing" a PEPPER.
I set an environment variable in my (root's) shell profile and can peek for it; that is already done for executables started from a shell. I just suppress it when the Bela is un-PEPPERed. It's pretty easy for other PEPPER people to add that. Pure Data may be where my choice fails, then your approach is the way.