mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-03-27 10:40:45 +00:00
Moved configuration object to main file and load the config before start. Fixed issue where partiy is switched for Kamstrup half way when in debug mode
This commit is contained in:
@@ -3,15 +3,16 @@
|
||||
Stream* HanConfigAp::debugger;
|
||||
|
||||
bool HanConfigAp::hasConfig() {
|
||||
return config.hasConfig();
|
||||
return config->hasConfig();
|
||||
}
|
||||
|
||||
void HanConfigAp::setup(int accessPointButtonPin, Stream* debugger)
|
||||
void HanConfigAp::setup(int accessPointButtonPin, configuration* config, Stream* debugger)
|
||||
{
|
||||
this->debugger = debugger;
|
||||
this->config = config;
|
||||
|
||||
// Test if we're missing configuration
|
||||
if (!config.hasConfig())
|
||||
if (!config->hasConfig())
|
||||
{
|
||||
print("No config. We're booting as AP. Look for SSID ");
|
||||
println(this->AP_SSID);
|
||||
@@ -20,8 +21,7 @@ void HanConfigAp::setup(int accessPointButtonPin, Stream* debugger)
|
||||
else
|
||||
{
|
||||
// Load the configuration
|
||||
config.load();
|
||||
if (this->debugger) config.print(this->debugger);
|
||||
if (this->debugger) config->print(this->debugger);
|
||||
|
||||
if (accessPointButtonPin != INVALID_BUTTON_PIN)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user