JDivelog and OSTC N2 V2.0

Help
2011-09-30
2012-12-06
  • martin quensel

    martin quensel - 2011-09-30

    Having a strange problem when using my new OSTC n2 computer with the 2.0 Firmware.

    when selecting "load settings" in JDivelog to see my settings for my OSTC computer JDivelog throws and exception:

    java.lang.IllegalArgumentException: oxygenPercent is not a valid Percentage value '255'

    I checked i the OSTC gas menu and saw that the two last gases has a default of 255% Oxygen and 255% Helium…
    Wery strange. This is not a setting i can do anything about.. its the default. I can change it to a normal setting, but the default will of course always stay the same..
    This is a new OSTC with firmare from the maker… I have not tampered with it.

    Now the reason i can not load the settings, or do other stuff is because.. (the 255% is obviously wrong) but also the
    ProgrammableMix.java  on row: 42 and onwards:

    say..

    public ProgrammableMix(int oxygenPercent, int heliumPercent, int changeDepth, boolean enabled) {
            if (oxygenPercent < 9 || oxygenPercent > 100) {
                throw new IllegalArgumentException("oxygenPercent is not a valid Percentage value '"+oxygenPercent+"'");
            }
            if (heliumPercent < 0 || heliumPercent > 99) {
                throw new IllegalArgumentException("heliumPercent is not a valid Percentage value '"+heliumPercent+"'");
            }
            if (oxygenPercent + heliumPercent > 100) {
                throw new IllegalArgumentException("oxygen + helium are more than 100%");
            }

    And of course its correct.. oxygen should not be able to be set at 255%..

    But what can i do.. this is the default in the v2 of the OSTC..

     
  • Pascal Pellmont

    Pascal Pellmont - 2011-09-30

    Hi,

    Could you please post the full stacktrace of the error message?
    This helps to solve the problem more quickly…

    Thanks,
    Pascal

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks