MDot 4.0.1 library compilation warning in mDotEvent.h

Home Forums mDot/xDot MDot 4.0.1 library compilation warning in mDotEvent.h

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31230
    Ajay K
    Participant

    I see this warning when compiling in mDotEvent.h in mdot 4.0.1 library and was wondering if this needs to be fixed as the read_ms() is deprecated in mbed os 6.1.0 or is it okay to ignore this warning?

    [Warning] mDotEvent.h@279,64: ‘int mbed::TimerBase::read_ms() const’ is deprecated: Use the Chrono-based elapsed_time method. If integer milliseconds are needed, you can use duration_cast<milliseconds>(elapsed_time()).count() [since mbed-os-6.0.0] [-Wdeprecated-declarations]

    Thanks,
    Ajay

    #31231
    Jason Reiss
    Keymaster

    It is a warning that this may not be supported in a future release but still appears to work as is.

    #31232
    Ajay K
    Participant

    Thanks Jason for taking the time to respond, however i see it says read_ms is deprecated since mbed-os 6.0.0 and the version that is being used mdot library is mbed os 6.1.0 and when I look at mdotevent.h, all the lines of code above that warning seems to have been updated to use the chrono based elapsed_time, except for this line of code where the warning is generated. Is this intentional or something that was missed?

    Thanks,
    Ajay

    #31233
    Ajay K
    Participant

    Hey Jason,

    I think like you say it works as is currently and you don’t foresee any issues right based on my earlier comments? I just don’t want to deploy this in production and later find out we run into issues.

    Thanks,
    Ajay

    #31234
    Jason Reiss
    Keymaster

    How about this, the read_ms function will return milliseconds time until it is removed from the mbed-os API. At that point this code will not compile. That is why it is marked deprecated.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.