Skip to content

Warnings when compiling library for Portenta H7 #123

Open
@ghiathkamel

Description

@ghiathkamel

It looks like the Servo library is not compatible with Arduino Portenta H7 board yet.

I got these errors when compiling the code:

\Arduino\libraries\Servo\src\mbed\Servo.cpp: In member function 'void ServoImpl::start(uint32_t)':
\Arduino\libraries\Servo\src\mbed\Servo.cpp:31:66: warning: 'void mbed::TickerBase::attach(F&&, float) [with F = mbed::Callback<void()>]' is deprecated: Pass a chrono duration, not a float second count. For example use `10ms` rather than `0.01f`. [since mbed-os-6.0.0] [-Wdeprecated-declarations]
       ticker.attach(mbed::callback(this, &ServoImpl::call), 0.02f);
mbed_portenta\4.0.10\cores\arduino/mbed/drivers/include/drivers/Ticker.h:92:10: note: declared here
     void attach(F &&func, float t)
          ^~~~~~
Arduino\libraries\Servo\src\mbed\Servo.cpp: In member function 'void ServoImpl::call()':
Arduino\libraries\Servo\src\mbed\Servo.cpp:35:80: warning: 'void mbed::TickerBase::attach(F&&, float) [with F = mbed::Callback<void()>]' is deprecated: Pass a chrono duration, not a float second count. For example use `10ms` rather than `0.01f`. [since mbed-os-6.0.0] [-Wdeprecated-declarations]
         timeout.attach(mbed::callback(this, &ServoImpl::toggle), duration / 1e6);
                                                                                ^
In file included from packages\arduino\hardware\mbed_portenta\4.0.10\cores\arduino/mbed/mbed.h:84:0,
                packages\arduino\hardware\mbed_portenta\4.0.10\cores\arduino/mbed.h:8,
                Arduino\libraries\Servo\src\mbed\Servo.cpp:5:
packages\arduino\hardware\mbed_portenta\4.0.10\cores\arduino/mbed/drivers/include/drivers/Ticker.h:92:10: note: declared here
     void attach(F &&func, float t)

Additional context

Forum topic for discussion and support: https://forum.arduino.cc/t/the-servo-library-not-fully-compatible-with-arduino-h7-yet-how-can-i-fix-this-issues/1220513

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions