Skip to content

Commit c6461f2

Browse files
Copilotcziter15
andauthored
fix: remove variable shadowing and fix misleading comment in ksConstants.cpp (#73)
* Initial plan * fix: remove redundant variable and fix misleading comment in ksConstants.cpp Co-authored-by: cziter15 <[email protected]> * fix: use local variable to avoid duplicate function calls Co-authored-by: cziter15 <[email protected]> * fix: use static variable directly instead of local variable Co-authored-by: cziter15 <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: cziter15 <[email protected]>
1 parent 86b228e commit c6461f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ksf/ksConstants.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace ksf
3333
const char SSID_PARAM_NAME[] PROGMEM {"ssid"}; // Param name from progmem - ssid
3434
const char PASSWORD_PARAM_NAME[] PROGMEM {"password"}; // Param name from progmem - password
3535

36-
static EOTAType::Type otaBootType{EOTAType::NO_OTA}; // Will be true if this launch is just after OTA flash.
36+
static EOTAType::Type otaBootType{EOTAType::NO_OTA}; // Stores the OTA boot type if this launch is just after OTA flash.
3737
static uint32_t uptime_low32, uptime_high32; // Variables for assembling 64-bit version of millis.
3838

3939
void initializeFramework()
@@ -193,7 +193,6 @@ namespace ksf
193193

194194
const std::string getResetReason()
195195
{
196-
auto otaBootType{getOtaBootType()};
197196
#if defined(ESP32)
198197
switch (esp_reset_reason())
199198
{

0 commit comments

Comments
 (0)