Skip to content

invalid use of non-static member function #2

Description

@HoEmpire

Problem description

I used thread to separate reading imu from spinOnce, but i met the compilation that

invalid use of non-static member function

Solution

write the code like this to initiate thread and it will work

std::thread t(&IOManager3::readIMU,this);//this line is in the IOManager3.cpp, readIMU is a member function of IOManager3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions