05-28-2020, 09:23 AM
Nice curve!
I see in the code that you played a bit with the analysis sleep time, presumably to increase the speed of the experiment. There is a snag if you want to pursue this: the code tries to detect the first instance of the analysis in order to know that data should not be saved (since the measurement is made for the frequency that was calculated in the previous analysis run). Unfortunately detecting the first run is not that easy because Android and iOs handle it differently (there is a thread on that topic somewhere in the forum). In the end, I had to use a combination of factors, one of which being the elapsed time. Changing the sleep time will certainly have side effect on the detection of the first run...
One way would be to have two different programs, one for iOs and one for Android, and there you could play with the sleep time more easily.
the other way would be to find a better first run determination, one that does not use time, but still works on iOs and Android. I would be happy to learn about it!
Cheers,
Fred
I see in the code that you played a bit with the analysis sleep time, presumably to increase the speed of the experiment. There is a snag if you want to pursue this: the code tries to detect the first instance of the analysis in order to know that data should not be saved (since the measurement is made for the frequency that was calculated in the previous analysis run). Unfortunately detecting the first run is not that easy because Android and iOs handle it differently (there is a thread on that topic somewhere in the forum). In the end, I had to use a combination of factors, one of which being the elapsed time. Changing the sleep time will certainly have side effect on the detection of the first run...
One way would be to have two different programs, one for iOs and one for Android, and there you could play with the sleep time more easily.
the other way would be to find a better first run determination, one that does not use time, but still works on iOs and Android. I would be happy to learn about it!
Cheers,
Fred