Forum Replies Created
-
AuthorPosts
-
Anders SøborgKeymaster
Anders SøborgKeymasterHi there
No that is not possible. Use the Monobrick communication library to write custom applications.
/Anders
Anders SøborgKeymasterPlease describe in more details what you have done. Otherwise it is impossible to help.
/Anders
Anders SøborgKeymasterOn the mac download the DMG file…. is this what you have done?
Anders SøborgKeymasterHi Hasan
Could you be a little more specific on what it is that you are trying to do and what doesn’t work?
/Anders
Anders SøborgKeymasterHi there
I will look into this…. in the meantime simply ignore the waitone on the waithandle like shown below.
motorWaitHandle = motorA.SpeedProfile(-50, 100, 700, 100,true); //motorWaitHandle.WaitOne(); System.Threading.Thread.Sleep(1000); motorA.Brake();
/Anders
Anders SøborgKeymasterHi there
This problem has already been reported and fixed. However it has not been officially released. But you can download a precompiled DLL of the master branch from my ftp server. An officially will be created once I get the time to do some more testing (which should be some time this coming week).
/Anders
January 3, 2015 at 20:20 in reply to: Conversion of ReadSensorColorEx(IN_1,colorval,raw,norm,scaled) C function in F# #5176
Anders SøborgKeymasterHave a look at the color sensor example as well as the official documentation. Like I Max wrote is it F# you are looking for?
/Anders
Anders SøborgKeymasterHi again
Concerning the time latency in your example. What does it show? That sometimes it takes 134ms but most of the time it takes more that two seconds?
Also could you please post the code for the both the model and module
/Anders
Anders SøborgKeymasterSweeeeet – what about the startup time -:)
/Anders
Anders SøborgKeymasterHi again
Why do you have a return value in the post handler code? Return values should only be used for GET
/Anders
Anders SøborgKeymasterHi Jacek
The starting time is the next thing that I don’t like.
Yes this is a killer – and also one of the reasons why this has not been officially released yet!
Since I don’t have all your code it is hard to tell where the bottleneck is located – have you tried to time the execution? Just for information whenever Nancy handles a new request the “Module” that handles the request is created/constructed – if you are not aware of this it might give you some unexpected behaviour.
/Anders
Anders SøborgKeymasterHi Again
Sorry if I was not clear enough on the poll thing. In your main program which looks like this:
static class Program { static void Main(string[] args) { var terminateProgram = new ManualResetEvent(false); var cubeSolver = new CubeSolver(); var buts = new ButtonEvents(); buts.EscapePressed += () => terminateProgram.Set(); Task.Factory.StartNew(cubeSolver.Run); terminateProgram.WaitOne(); cubeSolver.Stop(); //var solution = Search.solution(Tools.randomCube(), 26, false); } }
you create a ButtonEvents() so you can terminate the program. This will create a thread that polls for changes very 50 ms – so if your program uses a lot of threads your program might end up spending time switching threads instead of doing actual calculations. Anyway you can have a look at what the ButtonEvent class does here, but when you described what you program is actually doing it does not sound like this is really an issue -:)
/Anders
Anders SøborgKeymasterHi Jacek
Did you AOT compile your program? If not I think you will see a big improvement in speed if you do. Also I noticed that in your main loop you are using a button listener. This will poll for button changes every 50 ms which will load the CPU unnecessary. In the next release it will be possible to set this interval when creating the button listener so you might consider adding this.
/Anders
Anders SøborgKeymasterHi Jacek
Often the delay between ajax post and the handler reaction takes 1-2sec
Are you sure about that – my experience is that the first time you make a request/post it takes some time (since everything must be JIT compiled) but from then on it runs very smooth… we are looking into AOT compiling the Nancy DLL’s but until this is working you will just have to live with the fact that the first time something is executed it takes a while.
/Anders
-
AuthorPosts
Follow