Skip to content

Commit 1e5b7d1

Browse files
authored
Merge pull request #4972 from tonhuisman/bugfix/VCC-variable-not-recognized
[Bugfix] `%vcc%` variable isn't recognized
2 parents 30e793c + 8120a74 commit 1e5b7d1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/src/Helpers/SystemVariables.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,8 @@ SystemVariables::Enum SystemVariables::startIndex_beginWith(char beginchar)
481481
case 'r': return Enum::S_CR;
482482
case 's': return Enum::SPACE;
483483
case 'u': return Enum::UNIT_sysvar;
484-
case 'v': return Enum::VARIABLE;
484+
// case 'v': return Enum::VARIABLE; // Can not be the first 'v' variable, as the name is only 1 character long
485+
case 'v': return Enum::VCC;
485486
case 'w': return Enum::WI_CH;
486487
}
487488

@@ -596,8 +597,8 @@ const __FlashStringHelper * SystemVariables::toFlashString(SystemVariables::Enum
596597
case Enum::UNIXTIME: return F("unixtime");
597598
case Enum::UPTIME: return F("uptime");
598599
case Enum::UPTIME_MS: return F("uptime_ms");
599-
case Enum::VARIABLE: return F("v");
600600
case Enum::VCC: return F("vcc");
601+
case Enum::VARIABLE: return F("v"); // Can not be the first 'v' variable, as the name is only 1 character long
601602
case Enum::WI_CH: return F("wi_ch");
602603

603604
case Enum::UNKNOWN: break;

src/src/Helpers/SystemVariables.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ class SystemVariables {
113113
UNIXTIME,
114114
UPTIME,
115115
UPTIME_MS,
116-
VARIABLE,
117116
VCC,
117+
VARIABLE, // Can not be the first 'v' variable, as the name is only 1 character long
118118
WI_CH,
119119

120120

0 commit comments

Comments
 (0)