Anders Søborg

Forum Replies Created

Viewing 15 posts - 46 through 60 (of 411 total)
  • Author
    Posts
  • in reply to: Cannot change Xamarin Active Runtime #5328
    Author Image
    Anders Søborg
    Keymaster

    Hi there

    I tried this at work using Xamarin Studio 5.7.2 and a Windows 7 64 bit version. And there was no problem. So why you are having this issue I can not say. But I found this solution that indirectly talks about your problem – and the solution seems to be that you should

    specify the default runtime in the MonoDevelop global options: Preferences->.NET Runtimes

    Anyway compiling with 3.5 might give you some problems such as the what you have just experienced yourself. The reason that you all of a sudden can not compile the default program that comes with plugin is due to the fact that default parameters are a feature that was introduced in C# 4.0. Why you are able to get the plugin to work when selecting setting the target frame work to 3.5 I can not explain. I hope that you find a way through.

    /Anders

    in reply to: Cannot change Xamarin Active Runtime #5323
    Author Image
    Anders Søborg
    Keymaster

    Hi there

    Try to create a “Hello world” console program/project (not a MonoBrick project). Are you able to switch then…

    /Anders

    in reply to: Cannot change Xamarin Active Runtime #5320
    Author Image
    Anders Søborg
    Keymaster

    Hi there

    Did you install the mono runtime?

    /Anders

    in reply to: Sonar Sensor with C++ Library (NXT) #5314
    Author Image
    Anders Søborg
    Keymaster

    Hi there.

    Try to call init on the sensor once it has been constructed. Another thing to try would be to run the code without the Tunnel. Are you able to do that?

    /Anders

    in reply to: No Ultrasonic sensor class in library #5313
    Author Image
    Anders Søborg
    Keymaster

    Hi there

    In the source code the ultrasonic sensor is internal. This means that the you can not access the class if you use the DLL. This is a bug that has already been fixed as seen here. But the new source have not been compiled and released. So there are two ways that you can solve the problem. Use the library that comes with the the test project or compile the DLL yourself use the Github“>Github source. Hope this answers your question.

    /Anders

    in reply to: Battery indicator #5312
    Author Image
    Anders Søborg
    Keymaster

    Hi there

    Do you have any idea of example values for low battery level and just charged?

    No sorry – you will have to try.

    in reply to: Stop motor at mechanical end position? #5311
    Author Image
    Anders Søborg
    Keymaster

    Hi

    That is great.

    But it seems like the motor won’t run the second time more than a very short moment. The waiting time between the two directions seem to solve this.

    Since the program programs execute so fast the while loop will be skipped since in reality your motor is not moving.

    /Anders

    in reply to: Battery indicator #5304
    Author Image
    Anders Søborg
    Keymaster

    Hi there

    No the current is returned in mA and the voltage in mV

    /Anders

    in reply to: Stop motor at mechanical end position? #5303
    Author Image
    Anders Søborg
    Keymaster

    Hi there
    Thanks for using monobrick firmware.

    How does GetSpeed() work?

    It simply returns the current speed.

    GetTachoCount()

    Returns the position in degrees.

    Writing a function like the one you describe depends on what approach you use. If you have some feedback that tells you when to stop simply move the motor until this requirement is meet. But just from your description it is hard to tell how to write the code. If you need input try possting the code you have.

    /Anders

    in reply to: benchmark test: HaWe brickbench – for C# / Mono? #5299
    Author Image
    Anders Søborg
    Keymaster

    Hi Helmut

    AOT is precompiled,
    and instead it would be like JIT for leJOS ?

    Correct.

    so if it was precompiled – there shoudn’t be any remarkable runtime differences – correct ?

    Actually it is not as simple as that.

    Not AOT compiled

    If it is not AOT compiled then you would see a high performance penalty the first time you run the test, this is actually also the case in my tests. The 2nd time you run the test the code was been JIT compiled and it will execute as fast as possible. This is also what you can see from the results.

    AOT compiled
    If the code has been AOT compiled there is no need for JIT compiling the code and you will not get a performance penalty on the first run. However since it is pre-compiled it is not optimized in any way (compared to JIT compile), so that is why the second AOT run is slightly slower than the second run of the Non AOT run.

    So the conclusion is that if you can live with a performance penalty the first time some code is executed then don’t bother AOT compiling the code otherwise AOT compile the code.

    would you say this is correct ?

    The table seems to be correct – but did you use AOT or JIT

    /Anders

    in reply to: benchmark test: HaWe brickbench – for C# / Mono? #5297
    Author Image
    Anders Søborg
    Keymaster

    Hi there

    AOT is described here.

    what is the common way ?

    Hmmm hard to tell. Pick the one that rates best 🙂

    /Anders

    in reply to: benchmark test: HaWe brickbench – for C# / Mono? #5294
    Author Image
    Anders Søborg
    Keymaster

    Hi and here is the image from the fifth run without AOT…

    Attachments:
    You must be logged in to view attached files.
    in reply to: benchmark test: HaWe brickbench – for C# / Mono? #5289
    Author Image
    Anders Søborg
    Keymaster

    Hi again

    I did a run without AOT compiling the program. As expected the first run is slow while the remaining runs are very fast. See attached images

    Attachments:
    You must be logged in to view attached files.
    in reply to: benchmark test: HaWe brickbench – for C# / Mono? #5286
    Author Image
    Anders Søborg
    Keymaster

    Hi and here is the image from the fifth run…

    /Anders

    Attachments:
    You must be logged in to view attached files.
    in reply to: benchmark test: HaWe brickbench – for C# / Mono? #5281
    Author Image
    Anders Søborg
    Keymaster

    Hi

    I simply AOT compiled the program. But I think that the image that I showed in my last post was from the second run. Here are images from four runs.

    Attachments:
    You must be logged in to view attached files.
Viewing 15 posts - 46 through 60 (of 411 total)
Posted in

Make a donation