Closed SMP33 closed 3 years ago
It's good to fix my problem. Thanks.
Shouldn't this acquire the lock before setting current_setpoint.data? That was the point of the previous PR (#34)that accidentally introduced this error. It should be:
std::lock_guard<std::mutex> lock(current_setpoint.mutex);
current_setpoint.data = setpoint;
If you want me to put out a PR, I can but it may be easier to just update this one since it isn't merged yet.
Shouldn't this acquire the lock before setting current_setpoint.data? That was the point of the previous PR (#34)that accidentally introduced this error. It should be:
std::lock_guard<std::mutex> lock(current_setpoint.mutex); current_setpoint.data = setpoint;
If you want me to put out a PR, I can but it may be easier to just update this one since it isn't merged yet.
I'm wildly sorry. I fixed the compilation error and completely forgot about the mutex. I have now added the line
std :: lock_guard
Fix error in autopilot_interface.cpp:226
Change to:
current_setpoint.data = setpoint;
Commit has been tested with
make px4_sitl jmavsim
./mavlink_control -u 127.0.0.1