14 #include "../../include/kobuki_driver/command.hpp"
60 current_data.gp_out = (current_data.gp_out & 0xfcff) | value;
65 current_data.gp_out = (current_data.gp_out & 0xf3ff) | value;
68 outgoing.
data = current_data;
86 uint16_t values = 0x0000;
87 uint16_t clear_mask = 0xfff0;
88 for (
unsigned int i = 0; i < 4; ++i ) {
89 if ( digital_output.mask[i] ) {
90 if ( digital_output.values[i] ) {
94 clear_mask |= ( 1 << i );
97 current_data.gp_out = (current_data.gp_out & clear_mask) | values;
99 outgoing.
data = current_data;
117 uint16_t values = 0x0000;
118 uint16_t clear_mask = 0xff0f;
119 for (
unsigned int i = 0; i < 4; ++i ) {
120 if ( digital_output.mask[i] ) {
121 if ( digital_output.values[i] ) {
122 values |= ( 1 << (i+4) );
125 clear_mask |= ( 1 << (i+4) );
128 current_data.gp_out = (current_data.gp_out & clear_mask) | values;
130 outgoing.
data = current_data;
177 const unsigned int &i_gain,
const unsigned int &d_gain)
213 unsigned char cmd =
static_cast<unsigned char>(
data.
command);