61
USB Infrared Toy / Bug in winlirc
395 // put back into sampling mode
396 //
397 temp[0] = 's';
398 serial.Write(temp,1);
399 Sleep(50);
These three lines should not be there. The IR TOY is already in irS mode so the 's' does not need to be sent. If it did then winlirc would then have to read the response "SO1" from the serial port. It does not do this. If it did then it would fail with the older firmware, if it does not then the "S" becomes the first "send packet size" token.
In any case if it were required and actually did re-enter the irS mode then the new settings that have just been sent to the IR TOY would be clobbered and the defaults restored.
I have managed to recompile the IR TOY DLL and it *seems" to me to be working but to recompile I had to change the #include "afxres.h" to windows.h and add another define for something that was missing (I think this is a VS++ 2010 problem but I am not sure...). I would rather have someone who really knows what they are doing fix this and recompile just in case there is a problem with what I did that still lurks unseen.