Dangerous Prototypes

Dangerous Prototypes => USB Infrared Toy => Topic started by: JTR on July 18, 2011, 05:21:37 pm

Title: IR TOY2 does IRscope2 (IR Widget)
Post by: JTR on July 18, 2011, 05:21:37 pm
[attachment=0]


As you can see I have a working "IR widget" mode going with the IR TOY 2. This uses the QSE159 raw IR detector so it is only for the IR TOY 2.  The other IR widget mode "remote control" uses the IR demodulator (TSOP34838) found on both the IR TOY 1&2 however I am not sure if I will persist with adding this mode. I am open to feedback on this issue. Have your say and quickly too as I really have to move on with this.

The software app for the IR widget mode is called IRScope V2 and is available from here: http://http://www.hifi-remote.com/forums/viewtopic.php?t=11668

The IR scope software knows nothing about the IR TOY and as such the IR scope mode needs to be hard coded into the IR TOY source code. By this I mean that we cannot have it available as a menu option, it has to be ready to go when the IR scope App is run (like the sump mode and IR decoder mode currently are.) This is just not possible as there are conflicts between these modes.

For now the IRScope mode will be a separate compile. Later we may be able to store the mode in data EEPROM. Ian was talking about this idea for the IR MAN decoder mode. Maybe I could be piggy-back on top of this.

Anyway, attached is the hex file for the IR TOY 2 - IRScope (only). Please keep in mind that this is a beta and may have bugs. If you find anything please report it here.

Any other feedback will be welcome too.

Thanks...
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: ian on July 18, 2011, 05:45:08 pm
Hi JTR,

Nice demo, we'll post it up on the blog too.

This feature would be a huge evolution for the IR Toy. It's always great to work with existing
open source software.

Yes, we can store the startup mode in EEPROM like we do for the multiple-protocol decoder.

I've been running your last update in my home theater PC for weeks straight without a hitch :) Nice work.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: ian on July 21, 2011, 10:05:40 am
38 downloads and no reports? I love this, I can't wait to get it into the main release. I'm so glad someone did something with the new sensor.

It's also backed by the open source stack, and seems super stable.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: rct on September 19, 2011, 06:37:29 pm
There is an IR Scope and IR Widget User's Guide (http://http://www.hifi-remote.com/wiki/index.php?title=IR_Scope_and_IR_Widget_User%27s_Guide%20IR%20Scope%20and%20IR%20Widget%20user%20guide) on the Hifi Remote (JP1) Wiki (http://http://www.hifi-remote.com/wiki/) that will be useful to those trying IRScope for the first time.

It would be nice to see the USB IR Toy be fairly plug and play with IRScope.  Currently IRScope never sends anything out the serial port to the IR Widget.  Instead it uses raising and lowering of DTR or RTS to reset and signal what mode to use. 

I've looked through the IRScope source code.  It looks like it wouldn't be too hard to add support for additional hardware.  There are maybe 3 or 4 places in the code that would need to change.  Unfortunately you need the MS VC++ compiler to compile it since it uses MFC.  I don't have a license for it and the freely downloadable express compilers exclude MFC.

Note: Somewhat understandably, the people behind irscope/irwidget strongly request that support not be added for devices that use IR demodulators only like the original IR Toy V1 because the IR demodulators do not give accurate representations of the IR signal.  The IR Widget and IR Toy V2 can do IR pulse counting which gives a more accurate representation of the signal which is more important if you are trying to learn the signals for sending via learning remotes.

Hope This Helps,
--Rob
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: osbock on November 03, 2011, 01:20:55 am
Good work! It took me a while of staring at it to understand the numeric annotations, but I do now.
The numbers in the pulses are the pulse counts for the carrier, and the number at the beginning of each transition is the microsecond duration for that section. What confused me was that it is off from what I expected, and measured with a real scope. I assume it's some sort of undersampling error. At what frequency is it sampling?
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: osbock on November 03, 2011, 02:42:56 am
Is this what you are thinking?
 If IRScope never sends anything to the IR Widget
1. Some other program sends code to set into IR Widget mode. Mode stored in eeprom as default for power cycles
2. If you want to change it back, the IR widget mode could listen for a specific code being sent to it, and switch the default mode back?
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: rct on November 07, 2011, 05:09:35 pm
[quote author="osbock"]What confused me was that it is off from what I expected, and measured with a real scope. I assume it's some sort of undersampling error. At what frequency is it sampling?[/quote]

The IR Widget protocol sends the number of IR pulses it saw during a 100 us window.  The intent of the IR Widget (and IR Scope) counting IR pulses rather than durations is to avoid the errors that occur with IR demodulators determining when an on period has ended.  IR demodulators can add 50-75 us to the on period while waiting 'long enough' (the absence of pulses) to drop the output.

What device did you have connected to the scope to see the IR?  If it was an IR demodulator you saw the error even if you were using a 'real scope'.  If you don't have an IR detector, try using an IR LED as a photo-voltaic device.  The sending remote needs to be as close as you can get it to the IR LED.  With a remote that didn't have any plastic window, I was able to observe pulses of nearly 1 volt with just the oscilloscope and an IR LED.  Note: the red window on some remotes can block too much of the signal to generate enough voltage in the LEDs.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: rct on November 07, 2011, 05:14:39 pm
[quote author="osbock"]Is this what you are thinking?
 If IRScope never sends anything to the IR Widget
1. Some other program sends code to set into IR Widget mode. Mode stored in eeprom as default for power cycles
2. If you want to change it back, the IR widget mode could listen for a specific code being sent to it, and switch the default mode back?[/quote]

For the IR Toy to work with IRscope and any other software that uses the IRWidget without modifications, yes, I think that is the only way. 

On the other hand, the current IRwidget protocol/handshaking, using DTR/RTS, etc. is very limiting, so it might be better in the long run to see if the current maintainer of IRScope, (mathdon on the hifi-remote forum) will accept changes for supporting the iR toy that put it into the right mode and start capture by sending characters instead of using signal lines.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: osbock on November 09, 2011, 09:15:28 pm
Cool. Actually the times I was measuring was on my own device, and I hooked the scope up to one leg of the diode.
I wrote some code for the TV-B-Gone to trigger a nikon camera a while ago, and that worked fine (first time!) I decided to implement canon blind (don't have a canon dslr) and wanted to check the timing. Thank you for the explanation, it was very helpful!
To play with, I bought both the demodulator and the detector that USBIRtoy uses.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: coste on December 09, 2012, 05:34:40 pm
Hello,
I downloaded USBIRToy-irW.hex to use the IR Toy with IRScope, and everything worked fine.
see viewtopic.php?f=29&t=4838&p=47175#p47175 (http://dangerousprototypes.com/forum/viewtopic.php?f=29&t=4838&p=47175#p47175)
Thanks to JTR for his good job
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: KamalS on December 10, 2012, 05:05:47 am
[quote author="coste"]Hello,
I downloaded USBIRToy-irW.hex to use the IR Toy with IRScope, and everything worked fine.
see viewtopic.php?f=29&t=4838&p=47175#p47175 (http://dangerousprototypes.com/forum/viewtopic.php?f=29&t=4838&p=47175#p47175)
Thanks to JTR for his good job[/quote]

Does the bootloader need to exist on the PIC before this firmware can be loaded or does this hex file include the required bootloader + the IRWidget firmware?

I am assuming that this IRWidget firmware

0. Uses the Microchip USB stack driver?
1. handles the RTS and DTR lines correctly as expected by IRScope?
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: pio on December 10, 2012, 11:31:37 am
Has anyone being able to activate the bootloader via bootloader.exe after flashing with the IR Widget firmware?

The firmware is great, but you lose the ability to flash back the IR Toy unless you short PGC/PGD.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: coste on December 10, 2012, 02:46:12 pm
In my (very slight) experience:
- when I received my IR Toy : bootloader.exe was able to activate the bootloader
- after flahing USBIRToy.v22.hex : bootloader.exe was still able to activate the bootloader
- after flahing USBIRToy_irW.hex : bootloader.exe was no longer able to activate the bootloader, I had to short PGC/PGD

So the commutation between IRScope mode and other modes is possible, although somewhat laborious...
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: pio on December 17, 2012, 09:30:34 pm
I'm hoping for a fix, or better yet, to include this functionality as another mode of the IR Toy.

Isn't the infrared frequency measurement the key feature of the IR Toy v2?

I bought it with the idea of using it to identify IR protocols, and I'm glad that even if a bit awkward it is still possible to use it this way.

In the meantime, found this script (I know bleh Perl), which could be coded in another language  ...

IR Toy .bin to IRScope .ict converter script
http://http://dangerousprototypes.com/forum/viewtopic.php?t=1482
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: coste on December 18, 2012, 02:36:55 pm
Pio
I tried this script on the test.bin file produced by the IR Toy in IR sampling mode (via the command "irtoy.exe -d COM9 -r -f test", after sending 0x00 'S' to put it in IR sampling).
The script works correctly (at least I suppose) and creates a test.ict file.
But decoding this file with IRScope (via DecodeIR.dll) does not give reliable results.
For instance, with a remote using NEC1 protocol, IRScope said "protocol NECx" (meaning "can't determine if NEC1,NEC2,NECx1 or NECx2"). The device number was correctly found, but generally not the OBC numbers.
I suppose the problem is that, in IR sampling mode, the IR Toy uses the IR demodulator, which doesn't report accurately the "on" periods. So, for the time being, I think the good way to decode IR signals with the IR Toy is to flash USBIRToy_irW.hex.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: rct on December 19, 2012, 12:18:37 am
First, I'm curious as to whether you actually get different protocol decoding results using the IrWidget emulation firmware for the USB IR Toy.

I built an ATTiny based IR Widget clone using a circuit and firmware provided by the original author, http://www.compendiumarcana.com/irwidget/ (http://www.compendiumarcana.com/irwidget/).  (I didn't built the PIC version because I didn't have a programmer)

For some of remotes, I tried, I got similar results because the hand tuned protocol details that pick out the device and command numbers hadn't been added to IRdecode, the component used by IRScope to identify protocols.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: coste on December 22, 2012, 02:38:38 pm
Hello
With USBIRToy_irW.hex (IRWidget emulation firmware) flashed in the IR Toy I could decode (with IRScope, via DecodeIR.dll) correctly the codes from 9 different remotes. My test is not very comprehensive, as all my remotes use only 3 protocols : NEC1, NEC2, and Sony15. But at least for those protocols, it works. The only problem I had was with a volume control (repeat code) which was decoded as two codes (NEC2 and unknown) if I pressed the button for a long time. It was enough to press for a short time to get a correct decoding (NEC1 protocol). So AFAIK, IRScope + IR Toy is a good solution for me. My only wish would be for a simpler way to switch back the Toy to its "standard" modes.
My previous post was about using the irbin2ict.pl.txt script to convert .bin files produced by the IR Toy (in IR Sampling mode) to .ict files used by IRScope. As I said, it didnt't work, but it's probably because of inaccuracies of the IR Sampling mode, rather than the script itself.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: pio on December 26, 2012, 02:14:15 am
Tommy Tyler's Store For IR Widget
http://http://www.hifi-remote.com/forums/viewtopic.php?t=9405

Order either type of interface or an IR Widget from addresses in the U.S. for just $25 each, or from addresses outside the U.S. for $30 each. Price includes shipping and handling.

(http://http://s19.postimage.org/oy08g79cz/2_5_X_Catalog_Picture_2.jpg)
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: StephenR0 on December 28, 2012, 08:43:11 pm
You're going to need to check his new sales restrictions.  Tommy now charges an extra 50% for orders from states that voted for Obama.  Personally, I'm somewhat disappointed about the politics no matter who I voted for.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: rct on December 28, 2012, 09:27:24 pm
Interesting, given that he can't keep his politics out of his business, I'd have no problem letting people know the IRToy 2 is a much more capable device than the IR widget and clearly the better deal.

If I had a license for MS Visual C++, I'd modify IRScope to be IRToy 2 friendly (talk to it using serial data instead of trying to signal with RTS/DTR.  I've looked through the code, as I recall adding support for a new device shouldn't be that hard, there are about three or four places where the device types are coded.  The most complexity in it is from support for the microcontroller-less widget that shifts in samples at 115K baud and doesn't use the same sample buckets as the widgets with an actual controller.

Note: IRScope can't be compiled with the free MS express compiler as it relies on Microsoft libraries that are only available with the paid version of Visual C++.  I think it's Microsoft Foundation Classes. 

Note 2:  It's been a year or two since I looked at any of this.

Happy New Year all.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: coste on December 29, 2012, 12:59:48 pm
Hello
I am really happy to have ordered an IR Toy rather than an IR Widget. I live in a country (France) which recently elected a left-wing extremist (well, almost...). I would have been charged a maximum :)
Happy New Year to all.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: StephenR0 on December 29, 2012, 07:09:21 pm
I'm considering getting an IR Toy for use with IRscope2, but I don't see the USBIRToy_irW.hex file attached to the first post anymore.  Is there some reason it's not available?
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: pio on December 29, 2012, 10:16:34 pm
The IR Widget is not a substitute for the IR Toy, it just saves you the trouble of having to flash the IR Toy twice and use a jumper to do so.

But it could be the other way around if the IR Widget firmware is improved to allow the use of bootloader.exe, instead of forcing the user to use a jumper to flash the IR Toy.

Another option is to integrate the IR Widget functionality as another mode, although that could require modification of the IR Scope software.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: rct on December 29, 2012, 11:12:37 pm
[quote author="pio"]The IR Widget is not a substitute for the IR Toy, it just saves you the trouble of having to flash the IR Toy twice and use a jumper to do so.[/quote]

Considering a IR Widget from Tommy Tyler will cost $25 US (or $50 US if you live in a state Obama won), you could just get a 2nd USB IR Toy rather than buy an IR Widget.  (If you live in one of the affected states, you could get two IR toys and still have some money left over vs. an IR Widget).  Sure the IR Toy doesn't come with a nice case like the IR Widget does, but you won't have someone's politics forced on you.

[quote author="pio"]Another option is to integrate the IR Widget functionality as another mode, although that could require modification of the IR Scope software.[/quote]

I think this would be a good option if you can find an interested party who has an MS VC++ license and already has that development option set up.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: StephenR0 on December 30, 2012, 05:37:06 am
Well, let's not exaggerate.  50% more would be $37.50.  :-)

I'm interested in the IR Toy option, though.  And it would be nice if the IRscope mode were integrated into the firmware somehow.

Also, I'm not clear that we've pursued the option of having the IRscope maintainer include the modifications to use the IR Toy yet.  A way to tell the IR Toy to go into IRscope mode would have to be presented to him and that doesn't currently exist.  How hard would it be to get to that point?  Shouldn't we get that covered first?
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Qwlciguk on December 30, 2012, 04:57:16 pm
[quote author="rct"]Interesting, given that he can't keep his politics out of his business, I'd have no problem letting people know the IRToy 2 is a much more capable device than the IR widget and clearly the better deal.

If I had a license for MS Visual C++, I'd modify IRScope to be IRToy 2 friendly (talk to it using serial data instead of trying to signal with RTS/DTR.  I've looked through the code, as I recall adding support for a new device shouldn't be that hard, there are about three or four places where the device types are coded.  The most complexity in it is from support for the microcontroller-less widget that shifts in samples at 115K baud and doesn't use the same sample buckets as the widgets with an actual controller.

Note: IRScope can't be compiled with the free MS express compiler as it relies on Microsoft libraries that are only available with the paid version of Visual C++.  I think it's Microsoft Foundation Classes. 

Note 2:  It's been a year or two since I looked at any of this.

Happy New Year all.[/quote]

I took a shot at this and I was able to compile IRScope with the free Express version MS Visual C++ 2008 compiler.  It did require installing the DDK (to get MFC) also and futzing with some paths etc.  I found the info on how to do that on a website somewhere.  I'll look for the link.  That said, it was all for naught, as it compiled with some 47 warnings, mostly to do with signed/unsigned conversions etc, but if that's all that was wrong, I'd have been happy.  The resulting executable though it ran, much of the user interface was missing.  It was able to capture and display waveforms, just none of the menus, save for the help-about, were functional (greyed out) and many other things were also missing.

I did also try compiling with the full-blown "pro" version of the Visual C++ 2008 compiler to no avail.  It did the same as the express version + DDK.  Lastly, I also tried with the "pro" version of the Visual C++ 2010 compiler and still no go.  For all of the blathering they do on the JP1 forum about their software being "open" to anyone to modify, you'd think it was actually possible.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Qwlciguk on December 30, 2012, 05:07:03 pm
[quote author="StephenR0"]Well, let's not exaggerate.  50% more would be $37.50.  :-)

I'm interested in the IR Toy option, though.  And it would be nice if the IRscope mode were integrated into the firmware somehow.

Also, I'm not clear that we've pursued the option of having the IRscope maintainer include the modifications to use the IR Toy yet.  A way to tell the IR Toy to go into IRscope mode would have to be presented to him and that doesn't currently exist.  How hard would it be to get to that point?  Shouldn't we get that covered first?[/quote]

So from the IR Toy side of the fence, someone just needs to define a short key sequence that tells the IR Toy to switch to IRScope mode.  Probably should take it out of IRScope mode when closing the comm port too.  Once that is defined, preferably by someone familiar with the IR Toy's FW, then it could be presented to the current maintainer for inclusion in IRScope software, but I expect that someone would have to cough up an IR Toy for him to play with to motivate him to do this.  Did I forget to mention that he's in the UK?
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: AndThen on December 31, 2012, 12:29:25 am
Tryed to quote and it ate my post (I deserved it I knew better..)

IRScope is compiled with VC6, which is not available in an Express version. A web search for "VC6 Migration", might turn up something usefull. It used MFC version 6.0..

*Cool links to all the express versiosn would have been here*
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Qwlciguk on December 31, 2012, 06:06:42 pm
[quote author="AndThen"]Tryed to quote and it ate my post (I deserved it I knew better..)

IRScope is compiled with VC6, which is not available in an Express version. A web search for "VC6 Migration", might turn up something usefull. It used MFC version 6.0..

*Cool links to all the express versiosn would have been here*[/quote]

Hmmmm....then the current maintainer of IRScope is deliberately misleading folks by stating:

"This is the C++ source code of IRScope.exe version 2.01a. It has been prepared using MS Visual Studio 2008."

See: http://http://www.hifi-remote.com/forums/dload.php?action=file&file_id=11397

On the other hand, perhaps you're mistaken.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: AndThen on December 31, 2012, 09:55:32 pm
I maybe have an older version, as thats not the link I used. Or the files I looked at are just old and unused.

http://www.compendiumarcana.com/irwidget/ (http://www.compendiumarcana.com/irwidget/)
http://www.compendiumarcana.com/irwidget/irscope.zip (http://www.compendiumarcana.com/irwidget/irscope.zip)
....
IRScope Version 1.51

I realize I'm no help, not even setup for windows compiling currently, sorry. carry on =)
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Sleepwalker3 on January 01, 2013, 01:57:08 pm
[quote author="osbock"]Cool. Actually the times I was measuring was on my own device, and I hooked the scope up to one leg of the diode.
I wrote some code for the TV-B-Gone to trigger a nikon camera a while ago, and that worked fine (first time!) [/quote]

I'd be interested in the code if you're happy to share it, I've been thinking about making an IR trigger for a Nikon F60.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: StephenR0 on January 05, 2013, 07:16:16 am
[quote author="StephenR0"]I'm considering getting an IR Toy for use with IRscope2, but I don't see the USBIRToy_irW.hex file attached to the first post anymore.  Is there some reason it's not available?[/quote]

I'm feeling ignored.  Any answer?
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Qwlciguk on January 05, 2013, 04:55:47 pm
Seeing as how the first post that had the IR Widget mode FW attached, was edited on Dec 22 2012, it is reasonable to conclude that the poster removed the attachement.  Why this was done, I can only speculate that he doesn't want to support it.  There was at least one person that did program the IRToy with this FW recently (Dec 9), so perhaps he would be willing to re-post the FW?
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: StephenR0 on January 05, 2013, 05:18:04 pm
Actually, I have the firmware.  I was just wondering why it was withdrawn.  Is this use of the IR Toy being discouraged?
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Sleepwalker3 on January 05, 2013, 07:20:53 pm
I'm not really sure what you two are seeing, but when I look at the first posts of this thread I see the link there for the scope website, I go there and the software is there. Maybe not the .hex here, but most certainly a link to the 'scope site that works,  so either I've been celebrating NYE a bit too much, or you have!
This is the link I just copied from the first post

http://http://www.hifi-remote.com/forums/viewtopic.php?t=11668
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: StephenR0 on January 05, 2013, 08:06:09 pm
I'm referring to the firmware for the IR Toy to make it work with the IRscope software.  It used to be attached to the first post and now it isn't anymore.  If the firmware for the IR Toy isn't going to be available, There's not much reason for us to try to build IRscope and modify it.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Sleepwalker3 on January 05, 2013, 09:44:37 pm
Around here all the projects come under the 'Projects' section, so if you look up the top left of this page and click on that, then scroll down to the IRTOY (about 4th project down) http://http://dangerousprototypes.com/docs/USB_Infrared_Toy and click on that, then you'll see all the project details, including an index. That page has the downloads section for that project that usually includes all the firmware for the IR toy, upgrade instructions, PCB files, Schematics, different versions, etc. Also has a link to the SVN, in case you want to tinker with the code yourself.

The same goes for all the other projects, though some projects that have been popular might have a number of different versions and subsections.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Sleepwalker3 on January 05, 2013, 10:05:56 pm
Sorry after reading the post I think I've misunderstood what you were wanting. I'd suggest contacting JTR and asking him
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: StephenR0 on January 05, 2013, 10:40:50 pm
Sounds like good advice.  Thanks.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Sleepwalker3 on January 05, 2013, 10:47:50 pm
Sorry for my initial misunderstanding.  Ian might also be able to help if you don't get anywhere at first.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Qwlciguk on January 06, 2013, 07:31:11 am
[quote author="StephenR0"]Actually, I have the firmware.  I was just wondering why it was withdrawn.  Is this use of the IR Toy being discouraged?[/quote]

Can you post the FW somewhere so the rest of us can benefit?
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: StephenR0 on January 06, 2013, 04:48:51 pm
I don't see why not.  We still don't have source code so we can't enhance the IR Toy firmware appropriately, but apparently the firmware worked.  I did start to send JTR a message, but he doesn't have any contact information.  In any case, here it is.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Qwlciguk on January 07, 2013, 05:53:23 am
[quote author="StephenR0"]I don't see why not.  We still don't have source code so we can't enhance the IR Toy firmware appropriately, but apparently the firmware worked.  I did start to send JTR a message, but he doesn't have any contact information.  In any case, here it is.[/quote]

Thanks very much.  If we can't get the source code, I suppose we could re-port the FW from the widget.  Hate to have to repeat the work though.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: ian on January 09, 2013, 11:54:17 am
Quote
Also, I'm not clear that we've pursued the option of having the IRscope maintainer include the modifications to use the IR Toy yet. A way to tell the IR Toy to go into IRscope mode would have to be presented to him and that doesn't currently exist. How hard would it be to get to that point? Shouldn't we get that covered first?

I have had contact with them several times and it seemed they didn't really want us to infringe on their turf so I kinda left it alone. Because of command conflicts I believe it was not possible to just clone their interface, but it has been a while and I forget.

I do have JTRs irwidget source somewhere, I believe. Will try to dig it out.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Qwlciguk on January 09, 2013, 04:04:12 pm
[quote author="ian"]
Quote
Also, I'm not clear that we've pursued the option of having the IRscope maintainer include the modifications to use the IR Toy yet. A way to tell the IR Toy to go into IRscope mode would have to be presented to him and that doesn't currently exist. How hard would it be to get to that point? Shouldn't we get that covered first?

I have had contact with them several times and it seemed they didn't really want us to infringe on their turf so I kinda left it alone. Because of command conflicts I believe it was not possible to just clone their interface, but it has been a while and I forget.

I do have JTRs irwidget source somewhere, I believe. Will try to dig it out.[/quote]

It's clear that the JP1 folks idea of open source while it may conform to the letter of the law, it certainly can't be said that they cooperate with the spirit of open source.  This wouldn't be the first time someone has been asked not to tread on their turf.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: KamalS on January 12, 2013, 06:28:35 am
[quote author="ian"]
I do have JTRs irwidget source somewhere, I believe. Will try to dig it out.[/quote]

I think it's there on the googlecode SVN repo, but I seem to have lost the link to it
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Sleepwalker3 on January 12, 2013, 07:11:42 am
[quote author="KamalS"][quote author="ian"]
I do have JTRs irwidget source somewhere, I believe. Will try to dig it out.[/quote]

I think it's there on the googlecode SVN repo, but I seem to have lost the link to it[/quote]

It's likely behind the couch ;)

Is this perhaps it? http://code.google.com/p/dangerous-prot ... 873&r=1873 (http://code.google.com/p/dangerous-prototypes-open-hardware/source/browse/trunk/USB_IR_Toy/Firmware-main/irWidget.c?spec=svn1873&r=1873)
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: ian on January 14, 2013, 10:00:52 am
lol :) That looks like it.

I don't mind if people prefer we don't use their stuff, even if technically we could. Open source always has a community attached and you have to work with them if you adopt their code, so getting along and mutual consent is a must.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Sleepwalker3 on January 14, 2013, 11:03:29 am
Yep, there may be a reason he took down the code, I know from personal experience that sometimes things you planned don't happen because life throws you something from left field - we don't really know why he took it down, so I don't think people should be upset with him.  It's his code, so he can do what he pleases with it, that's my view. But in any case it is still up on the SVN and if he changed his mind and didn't want people to get it, presumably he would have deleted it from there or made it private, etc.? So I say if it's up and you want to use it, well go for it!

...maybe it just fell down the back of the couch and he didn't notice  ;)
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: KamalS on January 15, 2013, 07:47:47 am
[quote author="ian"]lol :) That looks like it.

I don't mind if people prefer we don't use their stuff, even if technically we could. Open source always has a community attached and you have to work with them if you adopt their code, so getting along and mutual consent is a must.[/quote]

Exactly Ian, I have been trying to make this very point in another thread about modifying IRScope where the original maintainer has his own reasons to not cooperate.

There are commercial solutions to the IRT that work out of the box and if using it, without tinkering with it was all we wanted to do, those would be a better choice. Hacking a project where the changes will never be merged upstream (which is what modifying IRScope would lead to) seems like wasted effort where there are other solutions around (adding the same functionality to IRT fimrware) that will not only contribute to IRToy but extend its inherent functionality.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: secany on March 03, 2013, 03:38:48 pm
Hi, is anyone still have the USBIRToy_irW.hex file ? Please reupload. Thanks.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: elborak on March 04, 2013, 11:39:00 pm
[quote author="secany"]Hi, is anyone still have the USBIRToy_irW.hex file ?[/quote]
The link posted on the last page is still working for me.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: domi on June 18, 2013, 10:30:12 am
I am new here so apoligize for my poor detailed understanding of the following.

I am actually try to decode IR protocols from various remotes, specially to understand which codes are used on a remote of Telenet (Belgian provider) digibox in order to play them back e.g. from a PC.
As the goal is ultimately using th IRT Decode mode, I am playing with all modes to better understand the behaviour and richness of the IRT for the time being.


One one hand I test the IRT through its basic commands: codes sent (TX) and responses or data Received (RX).
So everything should work through a Terminal emulator. I use Hercules 3.2.6 and Realterm 2.0.0 70 and thats already very nice.

I understand this is not the most functional approach, but clearly the basic one.

Once for a certain mode I see results from this basic approach, I step further into applications as OLS, and IRSCOPE.
So I am now stranded at the IRScope2 hoping to use their protocol decoding expertise and share mine.

But I am stuck in connecting IRT to IRSCope.

I read that there has been a special firmware USBIRToy_irW.hex which successfully linked to IRScope. However it was not distributed in the IRT V2.2 package, therefore I assume this is not the preferred way to go. Also two firmwares to flash and re-flash is not ideal.
But I also read that the IRT firmware has a mode called IR Widget mode (ascii command 'P' or 'p') although that mode is not described in the actual firmware V2.2 documentation http://dangerousprototypes.com/docs/USB ... _protocols (http://dangerousprototypes.com/docs/USB_Infrared_Toy#Modes_and_protocols)

Once in this forum there was a discussion point that switching from one application to another application on the same COM-connection would reset the IRT in its default Decode mode. This seems not to be the case. Indeed I tested the Raw IR mode (ascii command 'x') from Hercules. Closed the connection. Reopened the connection, and the IRT still was in its Raw IR mode.

Building on this I sent a 'p' through Hercules, closed the connection, and opened that same COM port with the IRScope. Unfortunately nothing happens. The IRScope does not see any input. Has this sometning to do with DTR or RTS ?

Has anybody ever successfully used the IRToy firmware (V2.2) in IR Widget mode?
Feedback greatly appreciated.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Qwlciguk on June 19, 2013, 03:00:57 am
[quote author="domi"]I am new here so apoligize for my poor detailed understanding of the following.

I am actually try to decode IR protocols from various remotes, specially to understand which codes are used on a remote of Telenet (Belgian provider) digibox in order to play them back e.g. from a PC.
As the goal is ultimately using th IRT Decode mode, I am playing with all modes to better understand the behaviour and richness of the IRT for the time being.


One one hand I test the IRT through its basic commands: codes sent (TX) and responses or data Received (RX).
So everything should work through a Terminal emulator. I use Hercules 3.2.6 and Realterm 2.0.0 70 and thats already very nice.

I understand this is not the most functional approach, but clearly the basic one.

Once for a certain mode I see results from this basic approach, I step further into applications as OLS, and IRSCOPE.
So I am now stranded at the IRScope2 hoping to use their protocol decoding expertise and share mine.

But I am stuck in connecting IRT to IRSCope.

I read that there has been a special firmware USBIRToy_irW.hex which successfully linked to IRScope. However it was not distributed in the IRT V2.2 package, therefore I assume this is not the preferred way to go. Also two firmwares to flash and re-flash is not ideal.
But I also read that the IRT firmware has a mode called IR Widget mode (ascii command 'P' or 'p') although that mode is not described in the actual firmware V2.2 documentation http://dangerousprototypes.com/docs/USB ... _protocols (http://dangerousprototypes.com/docs/USB_Infrared_Toy#Modes_and_protocols)

Once in this forum there was a discussion point that switching from one application to another application on the same COM-connection would reset the IRT in its default Decode mode. This seems not to be the case. Indeed I tested the Raw IR mode (ascii command 'x') from Hercules. Closed the connection. Reopened the connection, and the IRT still was in its Raw IR mode.

Building on this I sent a 'p' through Hercules, closed the connection, and opened that same COM port with the IRScope. Unfortunately nothing happens. The IRScope does not see any input. Has this sometning to do with DTR or RTS ?

Has anybody ever successfully used the IRToy firmware (V2.2) in IR Widget mode?
Feedback greatly appreciated.[/quote]

I had modified the IRScope software to automatically send the 'p' to switch into widget mode when it opens the connection.  That part worked ok, but when capturing an actual IR transmission, the FW would send a few dozen bytes and then wedge itself such that it no longer responded to anything aside from disconnecting the IRToy from the USB cable and reconnecting it.  I don't know what was wrong, but I wasn't keen on debugging it and no one else seemed interested at all.  So, I dropped it.  I was hoping to provide an alternative source for working widgets to the JP1 community since the primary widget supplier was somewhat unhappy.  Running the alternative "widget only" FW would work fine for the JP1 folks, but since the IRToy is not delivered with that FW or even the FW that included the 'p' switch to widget mode, it was a dealbreaker for JP1 folks that were not going to be able to fiddle with updating the FW for the IRToy. That is all not to mention, being discouraged here not to mess with the admittedly open source code for IRScope even if it was going to be backward compatible.

Also, yes the widget FW absolutely relies on IRscope sequencing of DTR and RTS to know which widget mode to use, since there are 2 different modes.  It has been many months since I was playing with this.  So, I don't remember the details, but it is not so hard to find in the IRScope source code.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: domi on June 19, 2013, 10:45:30 am
Thanks Qwlciguk.

Maybe another question. Where can I find the contents of the output in the different operation modes.

1- I imagine in Decode mode, the decoded value. But for this you already have to know the parameters needed for (Win)LIRC. For the time beeing it's too early for me as I don't know the protocol parameters. I also think, reversely,  the PC can send remote codes which are sent in IR by the IRT.

2- SUMP mode. After having sent 0x01 followed by a remote code nothing happens with hercules  (which I use to understand the data exchange). However with the OLS I get a beatiful wave form. What do I miss here?  This mode is only input to the PC.

3- Sampling mode(S). In this mode I can capture data in Hercules. I presume that I get a series of 0 and 1's of the waveform samples at 10 kHz. This mode is only input to the PC.

4- IRIO Raw mode (X). Controlled by the setup parameter is a more general sampling mode, but also bidirectional.

5- USB to serial (U). I have still not figured out how to use that mode. Also here nothing happens in Hercules after I dend U and get U01 back. How can we see its basic working principles through Hercules?

6- IRWidget mode(P), with two flavors: Frequency and Time. Here different viewpoints seem causing trouble yet.

What are the fundamental differences between the protocols of these modes? Which of all these modes is the most versatile to analyse IR codes ?

All this will take me a lot of time and therefore taking a good start will result in time saving later on.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Qwlciguk on June 20, 2013, 12:31:23 am
[quote author="domi"]Thanks Qwlciguk.

Maybe another question. Where can I find the contents of the output in the different operation modes.

6- IRWidget mode(P), with two flavors: Frequency and Time. Here different viewpoints seem causing trouble yet.

What are the fundamental differences between the protocols of these modes? Which of all these modes is the most versatile to analyse IR codes ?

All this will take me a lot of time and therefore taking a good start will result in time saving later on.[/quote]

I don't know much about any of the modes except the frequency protocol of the widget mode.  That, is very simple.  Once you enter frequency sub-mode of widget mode via the proper DTR/RTS sequencing, nothing will be output immediately.  It will wait until an infrared pulse is detected and accumulate the count of pulses for 100 usec.  At the end of 100 usec, it will send a single byte containing the number of pulses detected.  A new 100 usec period will then start and count the number of pulses detected and at the end of 100 usec, send the count for that period.  This will be repeated until the host computer closes the port.  It is the responsibility of the host computer to take the stream of bytes with the pulse counts and reconstruct the original signal and do the protocol analysis via decodeir.dll  The "time" mode of IR Widget is generally deprecated, as it was found to not be sufficiently accurate for the detailed analysis needed by the JP1 community.  Pretty much anything you can do with time mode, you can do better with frequency mode.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: domi on June 21, 2013, 06:17:59 pm
The firmware, as shipped with the IRT and I used until now, was V212. I had not yet realized it was an older one.
Now I updated the firmware to V222 which gives better results.
Indeed e.g. IRIO Raw mode has disappeared, but Widget mode has appeared, and I got data using that widget mode:

Set DTR and RTS, then send 'p'.

The data I get back is about 1500 bytes, which however I could not get it in IRScope yet.
Sample and SUMP modes seem also to work OK.

I investigate further.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Qwlciguk on June 22, 2013, 05:43:39 am
[quote author="domi"]The firmware, as shipped with the IRT and I used until now, was V212. I had not yet realized it was an older one.
Now I updated the firmware to V222 which gives better results.
Indeed e.g. IRIO Raw mode has disappeared, but Widget mode has appeared, and I got data using that widget mode:

Set DTR and RTS, then send 'p'.

The data I get back is about 1500 bytes, which however I could not get it in IRScope yet.
Sample and SUMP modes seem also to work OK.

I investigate further.[/quote]

The data you get back from a real widget or the IRToy running the widget only firmware, will not end.  It will continue on forever until you close the port.  The fact that you only got 1500 bytes back is consistent with what I saw.  That is, it works for a short time and then just quits when it should continue sending continuously until you close the port.

As for getting the data that you did receive into IRScope, normally IRScope software takes the raw data stream received directly from the port and processes into a different format that is then saved to a .ict format file which does not even remotely resemble the captured data stream.  It is just a text file something like this:

Code: [Select]
irscope 0
carrier_frequency 36060
sample_count 256
+2639,96
-892
+443,16
-446
+443,16
-447
+443,16
-891
+443,16
-892
+1332,48
-892
+443,16
-446
+443,16
-447
+443,16
-419
+443,16
-446
+443,16
-447
+443,16
-446
+444,16
-446
+443,16
-447
+443,16
-446
+443,16
-447
+888,32
-446
+443,16
-447
+443,16
-419
+443,16
-891
+888,32
-446
+444,16
-446
+443,16
-891
+888,32
-892
+443,16
-446
+443,16
-447
+443,16
-446
+861,32
-891
+888,32
-891
+443,16
-447
+443,16
-446
+443,16
-69363
+2667,96
-891
+444,16
-446
+443,16
-447
+443,16
-891
+443,16
-891
+1305,48
-892
+443,16
-446
+443,16
-447
+443,16
-446
+444,16
-446
+443,16
-447
+443,16
-446
+443,16
-447
+443,16
-446
+444,16
-446
+415,16
-447
+888,32
-446
+443,16
-447
+443,16
-446
+444,16
-891
+888,32
-446
+443,16
-447
+443,16
-891
+888,32
-864
+443,16
-446
+443,16
-447
+443,16
-446
+888,32
-892
+888,32
-891
+443,16
-446
+444,16
-446
+443,16
-69363
+2667,96
-891
+443,16
-447
+443,16
-419
+443,16
-891
+443,16
-891
+1333,48
-891
+444,16
-446
+443,16
-447
+443,16
-446
+443,16
-447
+443,16
-419
+443,16
-446
+443,16
-447
+443,16
-446
+444,16
-446
+443,16
-447
+888,32
-446
+443,16
-447
+443,16
-446
+443,16
-892
+888,32
-418
+443,16
-447
+443,16
-891
+888,32
-891
+444,16
-446
+443,16
-447
+443,16
-446
+888,32
-891
+888,32
-864
+443,16
-446
+444,16
-446
+443,16
-69363
+2667,96
-891
+443,16
-447
+443,16
-446
+444,16
-891
+443,16
-891
+1333,48
-891
+443,16
-419
+443,16
-447
+443,16
-446
+443,16
-447
+443,16
-446
+444,16
-446
+443,16
-447
+443,16
-446
+443,16
-447
+443,16
-446
+888,32
-447
+415,16
-447
+443,16
-446
+443,16
-892
+888,32
-446
+443,16
-447
+443,16
-891
+888,32
-891
+443,16
-447
+443,16
-419
+443,16
-446
+888,32
-891
+888,32
-892
+443,16
-446
+443,16
-447
+443,16
-47928

One of the trickiest things that IRScope software does in processing the data stream from the widget is to determine the pulse frequency.  Once it has that (assumes a constant frequency), it calculates the burst on/off times and saves the on times with pulse count for "on" bursts in the .ict file along with the "off" times on alternating lines in the .ict file.

So, you would need to replicate what the IRScope software does in creating the .ict file, in order to be able to import the data into IRScope.  If I remember correctly, you can also import Pronto format data and the JP1 learned format data via pasting into the import window in IRScope.  Both formats are documented, Pronto quite a bit better than JP1 learned format.  I am the author of one document describing the JP1 IR format.  I'll hunt up a link to it if you want to pursue this.

In any case, this is all for naught, as the integrated FW containing the widget mode is broken.  The standalone widget only FW for the IRToy works perfectly, but it's very inconvenient to have to reflash back and forth between the FWs just because you want to use the IRToy as a widget and all the other IRToy modes.  I considered just buying another IRToy so that I could have one IRToy for widget mode and another for everything else, but I already have built my own hardware based widget and don't have any need for another one.  So, my IRToy stays running IRToy standard FW.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: domi on June 27, 2013, 07:14:41 pm
I am coming back with some results.

I wrote my own program (I called it IRToyBoy) which shows the waveform in the 3 modes of the V2.2 Firmware of the IRT.
All tests were the reaction of the IRT on the same remote code sent by my IRremote commander.
The pictures are captures of my program plot of the waveform.

The Sampling mode is clean. I measured  a total code time of 23.13 ms.
[attachment=4]

The SUMP mode also shows very nice. Measures time between first pulse raising edge until last pulse falling edge is now 23.73 ms.
[attachment=3]

This is very possible as for Sampling mode I rely on the theoretical 21.33 µs count interval.

But I do not understand the output of the Widget Mode. I plot the value of each byte received. The step on the x-axis is assumed 100  µs.
First, sometimes I receive about 5600 bytes before transmission stops, sometimes only about 1500.  That behaviour already is strange.
Secondly 5600*100µs is much longer that the 22µs of one command. What is the IRT doing while nothing is being sent?
Following picture is of the same time scale of the two previous ones. I do not see any relation.

[attachment=2]

Here the value of the 25 first bytes received.
[attachment=0]

And finally, this last picture shows the full 5600 samples,  of which picture 3 represents the beginning of in more detail.
[attachment=1]

Is the Widget mode totally erroneous, of do I miss the basics thereof?
Maybe I have to compare with the firmware USBIRToy_irW.hex . Unfortunately I did not found that firmware yet.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: domi on June 27, 2013, 10:06:55 pm
To accentuate the strange output I derived pulses from the wave. These are shown in red in the following picture.
[attachment=0]
There were 5705 data bytes in total.
On top of the pulses stays the width of the pulse.

The mark widths increases regularely : 31,33,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,101,101,... to stay at 101.
The space of the pulse stays at 26.

This seems more test output of the IRToy rather than an encoded form or an IR command.
This time I used V223-test, but V222 is the same in this respect.

Can somebody give a clue ?
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Qwlciguk on June 28, 2013, 05:42:40 am
[quote author="domi"]I am coming back with some results.



Here the value of the 25 first bytes received.
[attachment=0]

And finally, this last picture shows the full 5600 samples,  of which picture 3 represents the beginning of in more detail.
[attachment=1]

Is the Widget mode totally erroneous, of do I miss the basics thereof?
Maybe I have to compare with the firmware USBIRToy_irW.hex . Unfortunately I did not found that firmware yet.[/quote]

I wouldn't say that it is totally erroneous, but you seem to be repeatedly ignore what I've been telling you about widget mode.  I'll say it again.  The standalone widget FW for the IRToy works perfectly.  The all in one FW that includes all of the modes, does not work properly in widget mode.  I'll try to describe again how the widget mode is supposed to work.

Once the port is opened to the widget, nothing will be sent immediately.  The widget waits until it detects an IR pulse from the detector.  As soon as that happens, it opens a 100 us gate time during which it counts the number of pulses received.  At the conclusion of the 100us, it sends the count of pulses detected, to the host computer as a single byte value.  Immediately following the first 100us gate interval, the widget begins counting the number of pulses detected in the following 100us interval.  The part that I forgot to tell you previously, is that it doesn't start the count over at 0, it simply continues counting from the value it had at the end of the previous 100 us period.  That is why you see an increasing value being sent in successive bytes when there are IR pulses present in a given 100 us period.  From your list of values received, you can see that during the first 100us period, there were 3 pulses detected.  Then in the next 100us period, there were 4 additional pulses detected (07 - 03).  Then the next 100us period, there were 4 more pulses detected (0b - 07) and on and on.  Eventually at entry 9, you see that the byte value being sent, stops increasing.  That is, it keeps sending the same value over and over.  This is because starting at entry number 10 thru entry 17, no IR pulses were detected.  That is, there is a gap of 800us during which there were no pulses.  Then starting at entry 18, the pulse count starts increasing again meaning that pulses are again being detected.

So, very roughly, you have a total of 31 pulses detected for the first 900 us of time, followed by 800 us of no pulses, followed by 31 pulses detected during the next 800 us.  This is very rough.  There are more subtleties here, but this is the most basic analysis.  All is for naught though, since a real widget or an IRToy running the standalone widget FW both continuously send the pulse count FOREVER as long as the host computer keeps the port open.  As you've seen and I already saw in my own tests, the IRToy FW that includes all modes, does not keep sending continuously, but rather stops for no obvious reason aside from a FW bug.

Conclusion: Widget mode in the IRToy FW including all modes, is not functional in any useful way.  If you must have widget mode working, you must use the standalone widget FW for the IRToy.  There, it works perfectly.  Unless you just want to rediscover gravity, there isn't any reason not to use the existing IRScope software.  It is very well developed and refined, though not perfect.  It has extensive capabilities to analyze the protocol via the JP1 community's IRdecode.dll software.  If you really want to re-invent the wheel, by all means go ahead and develop your own software to do all of this.
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: domi on June 28, 2013, 11:16:16 pm
Any idea where I can find the Widget FW?
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: Qwlciguk on June 29, 2013, 12:26:38 am
[quote author="domi"]Any idea where I can find the Widget FW?[/quote]

A few pages back in this very thread:

viewtopic.php?f=29&t=2554&start=30#p48238 (http://dangerousprototypes.com/forum/viewtopic.php?f=29&t=2554&start=30#p48238)
Title: Re: IR TOY2 does IRscope2 (IR Widget)
Post by: domi on July 31, 2013, 10:57:28 pm
I found in irWidget.c the reason why this mode gave erroneous output
viewtopic.php?f=29&t=2554&start=45#p53025 and viewtopic.php?f=29&t=2554&start=45#p53026

                if (SendCDC_In_ArmNext(irW.RXsamples))
                irW.RXsamples = 0;

should be replaced by

                SendCDC_In_ArmNext(irW.RXsamples);
                irW.RXsamples = 0;

There are also other minor details which could improve efficiency and functionality, as e.g.

            if (((irW.RXsamples == CDC_BUFFER_SIZE))) {
instead of
            if (((irW.RXsamples >= 30))) {

But more on these details later.