Skip to content

Commit 62ad701

Browse files
committed
Output only on actual keypress
1 parent d6b85f4 commit 62ad701

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/external_fts_through_rtde.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,14 @@ void ftInputTui()
114114
std::cout << instructions << std::endl;
115115
char ch = getChar();
116116

117+
if (ch == '\0')
118+
{
119+
continue;
120+
}
117121
std::cout << "<'" << ch << "' pressed>" << std::endl;
118122

119123
switch (ch)
120124
{
121-
case '\0':
122-
{
123-
// No input
124-
continue;
125-
}
126125
case 'x':
127126
{
128127
local_ft_vec[0] += 10;

0 commit comments

Comments
 (0)