diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_funcs.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_funcs.cpp index 8e62f8285..df913e9c2 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_funcs.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_funcs.cpp @@ -138,8 +138,19 @@ static uint8_t select_mod_type(uint8_t* data, uint32_t bitoffs) static uint8_t select_custom_fn(uint8_t* data, uint32_t bitoffs) { - // always use 'all' - //TODO + data += bitoffs >> 3UL; + data -= offsetof(CustomFunctionData, all); + + auto cf = reinterpret_cast(data); + switch(cf->func) { + case FUNC_PLAY_TRACK: + case FUNC_BACKGND_MUSIC: + case FUNC_PLAY_SCRIPT: + // play: 0 + return 0; + } + + // all: 1 return 1; }