
Mid level control code
Dependencies: ros_lib_kinetic
Diff: HLComms.cpp
- Revision:
- 33:9877ca32e43c
- Parent:
- 32:8c59c536a2a6
- Child:
- 36:4459be8296e9
--- a/HLComms.cpp Fri Mar 08 12:44:29 2019 +0000 +++ b/HLComms.cpp Wed Mar 13 11:59:58 2019 +0000 @@ -97,6 +97,11 @@ _protected_input.speeds_mmps[1] = min( max(_protected_input.speeds_mmps[1],0.0) , (double)MAX_SPEED_MMPS ); _protected_input.speeds_mmps[2] = (double)demands_array.data[11]; _protected_input.speeds_mmps[2] = min( max(_protected_input.speeds_mmps[2],0.0) , (double)MAX_SPEED_MMPS ); + _protected_input.utitilies_bool[0] = fabs(demands_array.data[12]) > numeric_limits<float>::epsilon(); + _protected_input.utitilies_bool[1] = fabs(demands_array.data[13]) > numeric_limits<float>::epsilon(); + _protected_input.utitilies_bool[2] = fabs(demands_array.data[14]) > numeric_limits<float>::epsilon(); + _protected_input.utitilies_bool[3] = fabs(demands_array.data[15]) > numeric_limits<float>::epsilon(); + recv_mutex.unlock(); _input = _protected_input; newData.release();