Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constructor for NtpClock::setup() missing #26

Closed
Heideachim opened this issue Sep 25, 2019 · 2 comments
Closed

Constructor for NtpClock::setup() missing #26

Heideachim opened this issue Sep 25, 2019 · 2 comments

Comments

@Heideachim
Copy link

Heideachim commented Sep 25, 2019

In v. 0.8.1 there is no constructor for ace_time::clock::NtpClock::setup(void). As mentioned in the documentation, this should be the constructor to use when there is already an existing WLAN connection.
There is only a constructor for NtpClock::setup(const char* ssid, const char* password).
Otherwise, this library is a wonderful thing! Thanks!

The code to add to NtpClock.h would be:

   void setup(void) {
      mUdp.begin(mLocalPort);

    #if ACE_TIME_NTP_CLOCK_DEBUG == 1
      #if defined(ESP8266)
        SERIAL_PORT_MONITOR.print(F("Local port: "));
        SERIAL_PORT_MONITOR.println(mUdp.localPort());
      #endif
    #endif

      mIsSetUp = true;
    }
@bxparks
Copy link
Owner

bxparks commented Sep 27, 2019

Hi, Is this problem on the master branch or the develop branch? I have not merged #24 into master, have not created a new release, because I'm on vacation with just a cell phone with only sporadic internet connection.

@bxparks
Copy link
Owner

bxparks commented Oct 1, 2019

I'm going to close this because this code is in the develop branch through #24. The new signature for setup() is:

    void setup(const char* ssid = nullptr, const char* password = nullptr,
        uint16_t connectTimeoutMillis = kConnectTimeoutMillis) {

which supports calling it with no arguments setup().
This will be included in the next release, which I'll probably push out today.

@bxparks bxparks closed this as completed Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants