Search:

Type: Posts; User: Ad_robot

Search: Search took 0.01 seconds.

  1. Replies
    19
    Views
    16,912

    Thanks for your help guys. Unfortunately I...

    Thanks for your help guys. Unfortunately I couldn't get my_getch() working today (some issues with termios.h on the remote platform) which was a shame as it is a nice solution. I'm not back at work...
  2. Replies
    19
    Views
    16,912

    Thanks anduril, that example certainly works,...

    Thanks anduril, that example certainly works, though curses seems to make the rest of my program behave quite strangely. As I mentioned this is a modification to a large, exisiting bit of code.

    I...
  3. Replies
    19
    Views
    16,912

    tabstop, Unfortunately the other system...

    tabstop,

    Unfortunately the other system doesn't have a keyboard, mouse or display, it's an embedded platform connected to some sensors and actuators.

    The strange thing is that getchar() does...
  4. Replies
    19
    Views
    16,912

    Aargh, but getchar() detects keys fine! So it's...

    Aargh, but getchar() detects keys fine! So it's not the remote interface...
  5. Replies
    19
    Views
    16,912

    Btw, I just checked and ERR is '-1'. I put...

    Btw, I just checked and ERR is '-1'.

    I put this in my while loop


    But even if I hold down a key and make usleep very small, getch = '-1'. Interesting... it seems that my keystrokes aren't...
  6. Replies
    19
    Views
    16,912

    Thanks for the suggestions. tabstop I've made...

    Thanks for the suggestions.

    tabstop I've made the chr an integer but I still get the same response.

    Sipher I've reduced usleep to 50 and also taken it out completely but the same response...
  7. Replies
    19
    Views
    16,912

    Hi, I used ERR as this seemed to have been...

    Hi,

    I used ERR as this seemed to have been used in the code I've been using as an example. I believed that the statement would return ERR if nothing had been pressed. Is this not a good choice?
    ...
  8. Replies
    19
    Views
    16,912

    Hi, The while loop keeps printing '. ' so it...

    Hi,

    The while loop keeps printing '. ' so it isn't blocking. I assume that means no-delay is true (though I haven't set this explicitly I believe that it is the default).

    If i press enter I...
  9. Replies
    19
    Views
    16,912

    while getch question

    Hi,

    I'm trying to write a while loop that is able to recognise and act on keyboard presses without pausing to wait for an input (unlike getchar()).

    At the moment I'm just trying to detect any...
Results 1 to 9 of 9