From b31180ee5242b8e7bd8a6b1b9984ec317f9d7bb3 Mon Sep 17 00:00:00 2001 From: Phil Mitchell Date: Tue, 27 Jun 2023 08:34:10 +1000 Subject: [PATCH] Fix wrong names being written to radio YAML file for pots & sliders. --- radio/src/storage/yaml/yaml_datastructs_funcs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/src/storage/yaml/yaml_datastructs_funcs.cpp b/radio/src/storage/yaml/yaml_datastructs_funcs.cpp index 73d752099..2a753514c 100644 --- a/radio/src/storage/yaml/yaml_datastructs_funcs.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_funcs.cpp @@ -609,7 +609,7 @@ static bool _write_analog_name(uint8_t type, void* user, uint8_t* data, auto tw = reinterpret_cast(user); uint16_t idx = tw->getElmts(1); - const char* name = analogGetCustomLabel(ADC_INPUT_MAIN, idx); + const char* name = analogGetCustomLabel(type, idx); if (!wf(opaque, "\"", 1)) return false; if (!wf(opaque, name, strlen(name))) return false; return wf(opaque, "\"", 1);