in reply to Re^4: Win32 Serial Under Windows 7
in thread Win32 Serial Under Windows 7
OK, then if you're never seeing the is_serial_data_ready print statements, then I'm assuming that you see only one "loop" statement printed on the screen until you press a key. If that's the case, then your "my $con_key = ReadKey(-1);" is blocking. You'll need to dig deeper into the use of Win32::Console and/or Term::ReadKey stuff to find out how to do a non-blocking read.
If you get a continuous stream of "loop", then the $con_key value is defined even when there's no keypress ready. This is causing the first branch of the if statement to fire. You'd need to change the test to let the elsif condition activate and get into the is_serial_data_ready part of the code.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Win32 Serial Under Windows 7
by PilotinControl (Pilgrim) on Apr 04, 2018 at 18:44 UTC | |
|
Re^6: Win32 Serial Under Windows 7
by PilotinControl (Pilgrim) on Apr 06, 2018 at 17:38 UTC | |
by pryrt (Abbot) on Apr 06, 2018 at 18:00 UTC | |
by PilotinControl (Pilgrim) on Apr 06, 2018 at 18:21 UTC | |
by pryrt (Abbot) on Apr 06, 2018 at 18:38 UTC | |
by PilotinControl (Pilgrim) on Apr 06, 2018 at 18:45 UTC | |
|