Exemple #1
0
    public ChronopicAutoDetect(ChronopicType type, Config.AutodetectPortEnum configAutoDetect)
    {
        /*
         * Try to detect a normal 4MHz Chronopic on a 20MHz encoder fails
         * but encoder can be used normally
         * In the other hand, try to detect an encoder on a 4MHz Chronopic fails
         * but encoder cannot be used until 'reset' or disconnect cable (and can be problems with Chronojump GUI)
         *
         * So the solution is:
         * if we are searching encoder, on every port first check if 4MHz connection can be stablished, if it's Found, then normal Chronopic is found
         * if is not Fount, then search for the encoder.
         *
         * The only problem is in normal Chronopics with old firmware (without the 'J' read/write
         * they will not work after trying to be recognised as an encoder, until reset or disconnect cable
         *
         */
        this.searched         = type;
        this.configAutoDetect = configAutoDetect;

        if (configAutoDetect == Config.AutodetectPortEnum.INACTIVE)
        {
            return;

            Detected = "";
        }

        //no matter if we are searching for 4MHz or 20MHz (encoder)
        //first see if 4MHz is connected
        ChronopicAuto caNormal = new ChronopicAutoCheck();

        caNormal.IsEncoder = false;            //for the bauds.

        autoDetect(caNormal);
    }
Exemple #2
0
    //called from gui/chronojump.cs
    //done here because sending the SP is problematic on windows
    public string CheckAuto(out bool isChronopicAuto)
    {
        ChronopicAuto ca = new ChronopicAutoCheck();

        string str = ca.Read(sp);

        isChronopicAuto = ca.IsChronopicAuto;

        return(str);
    }
    public bool StoredCanCaptureContacts;     //store a boolean in order to read info faster

    //<-----ConnectContactsReal END -----


    //called from gui/chronojump.cs
    //done here because sending the SP is problematic on windows
    public string CheckAuto(out bool isChronopicAuto)
    {
        ChronopicAuto ca = new ChronopicAutoCheck();

        string str = "";

        if (cpDoing == 1)
        {
            str = ca.Read(sp);
        }
        else
        {
            str = ca.Read(sp2);
        }

        isChronopicAuto = ca.IsChronopicAuto;

        return(str);
    }
Exemple #4
0
    //<-----ConnectContactsReal END -----
    //called from gui/chronojump.cs
    //done here because sending the SP is problematic on windows
    public string CheckAuto(out bool isChronopicAuto)
    {
        ChronopicAuto ca = new ChronopicAutoCheck();

        string str = "";
            if(cpDoing == 1)
            str = ca.Read(sp);
        else
            str = ca.Read(sp2);

        isChronopicAuto = ca.IsChronopicAuto;

        return str;
    }
Exemple #5
0
 private void on_button_auto_check_auto_clicked(object o, EventArgs args)
 {
     ChronopicAuto ca = new ChronopicAutoCheck();
     label_auto_check.Text = ca.Read(sp);
 }
Exemple #6
0
    private void on_button_auto_check_auto_clicked(object o, EventArgs args)
    {
        ChronopicAuto ca = new ChronopicAutoCheck();

        label_auto_check.Text = ca.Read(sp);
    }