Use existing function to generate switch name in YAML switch warning field

This commit is contained in:
Raphael Coeffic
2021-12-17 11:02:51 +01:00
parent 665b9ee4d1
commit 710677a1f7
4 changed files with 46 additions and 18 deletions
@@ -539,7 +539,7 @@ bool w_swtchWarn(const YamlNode* node, uint32_t val, yaml_writer_func wf, void*
// state == 1 -> UP
// state == 2 -> MIDDLE
// state == 3 -> DOWN
char swtchWarn[2] = {(char)('A' + i), 0};
char swtchWarn[2] = {getRawSwitchFromIdx(i), 0};
switch (state) {
case 0: