KDMcMullan / HaMQTT

An MQTT Interface to an Amateur Radio Station
Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

Investigate storing of strings to "virtual EEPROM" #11

Open KDMcMullan opened 4 months ago

KDMcMullan commented 4 months ago

I'm not completely convinced the way I've implemented prefs.putString is correct. For example, where I have: const char* MsgCallsign = "mike 7 keelo charlee mike"; // M7KCM then later: prefs.putString("CS",MsgCallsign); which works fine, HOWEVER: MsgCallsign = prefs.getString("CS",MsgCallsign).c_str(); shouldn't work (I think), as MsgCallsign is a const. Maybe I'm confused and it's the pointer to the start of the string which is const?

UPDATE it turns out the stings component wasn't working at all: the logic calling it was flawed. The strings are now commented out until I get a chance to investigate.