Dangerous Prototypes

Dangerous Prototypes => USB Infrared Toy => Topic started by: achandel on March 06, 2015, 06:38:19 am

Title: Compiling Rec/Play
Post by: achandel on March 06, 2015, 06:38:19 am
How do we compile the IRToy.exe ?

..USBIRToy_SourcesoftwareIRToyRecPlay[this program]

In main.h , there is a sleep(2000) which I would like to remove.

#ifdef _WIN32
    Sleep(2000);    // windows: Sleep for 2000 milliseconds <----- would like to remove this
    #else
    sleep(2);    // linux: sleep for 2 secs
    #endif

    serial_close(fd);
    FREE(param_port);
    FREE(param_speed);
    FREE(param_fname);
    FREE(param_buffin);
    printf("n Thank you for playing with the IR Toy! Utility version: %s. n", IRTOY_VERSION);

    return 0;
Title: Re: Compiling Rec/Play
Post by: achandel on March 06, 2015, 07:08:50 am
Nevermind, I found the method to play a sequence queue without any handshakes which speeds things up perfectly.

irtoy.exe -d COM2 -h -p -q -a 0 -f filename
Title: Re: Compiling Rec/Play
Post by: jamz on March 06, 2015, 10:31:57 am
if you still want to compile it, You can download code::blocks from www.codeblocks.org (http://www.codeblocks.org). Its free IDE/compiler in one.
Title: Re: Compiling Rec/Play
Post by: achandel on March 06, 2015, 09:54:14 pm
Thanks, will do.

Also ignore the above, it's important to -a 500 because -a 0 causes issues and you have to unplug / replug.

irtoy.exe -d COM2 -h -p -q -a 500 -f filename


- filename contains a sequence of files without any params (bin file per line).
- also -h only works "glitch free" if you record short ir button presses.  If you make a long recording, with a long press, -h crashes.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00912047880session_write_close ( )...(null):0
20.00942179456ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00942180232Database_MySQL->query( ).../DatabaseHandler.php:119
40.05232318952Database_MySQL->error( ).../Db-mysql.class.php:273