Revision fc7a174f
examples/yarp_icub/src/icub_faceinterface.cpp | ||
---|---|---|
90 | 90 |
|
91 | 91 |
for(int i=0; i<4; i++){ |
92 | 92 |
//strange, if we use one output port only the first command is executed?! flushing issues? |
93 |
string emotion_port_out = "/emotionwriter" + to_string(i); |
|
93 |
string emotion_port_out = "/emotionwriter" + to_string((unsigned long long)i);
|
|
94 | 94 |
if (!emotion_port[i].open(emotion_port_out.c_str())){ |
95 | 95 |
printf("> ERROR: failed to open to %s\n",emotion_port_out.c_str()); |
96 | 96 |
exit(EXIT_FAILURE); |
... | ... | |
150 | 150 |
|
151 | 151 |
if (emotion_port[port_id].getOutputCount()>0){ |
152 | 152 |
double angle = target_angle[id]; |
153 |
unsigned int icub_val = 0;
|
|
153 |
int icub_val = 0; |
|
154 | 154 |
|
155 | 155 |
//swap rotation direction: |
156 | 156 |
if (id==iCubJointInterface::ICUB_ID_EYES_LEFT_BROW) angle = -angle; |
... | ... | |
178 | 178 |
|
179 | 179 |
string cmd_s; |
180 | 180 |
if (id==iCubJointInterface::ICUB_ID_EYES_LEFT_BROW){ |
181 |
cmd_s = "L0" + to_string(icub_val); |
|
181 |
cmd_s = "L0" + to_string((unsigned long long)icub_val);
|
|
182 | 182 |
}else{ |
183 |
cmd_s = "R0" + to_string(icub_val); |
|
183 |
cmd_s = "R0" + to_string((unsigned long long)icub_val);
|
|
184 | 184 |
} |
185 | 185 |
|
186 | 186 |
printf("> SETTING EYEBROW %d (%f -> %s)\n",id,angle,cmd_s.c_str()); |
Also available in: Unified diff