Beispiel #1
0
        //Reset all the byte arrays from modules
        public void ResetAllModuleCommValues()
        {
            relayRateData[rdHeaderHi]             = 127; // PGN - 32762
            relayRateData[rdHeaderLo]             = 250;
            relayRateData[rdSectionControlByteHi] = 0;
            relayRateData[rdSectionControlByteLo] = 0;
            relayRateData[rdRateSetPointLeftHi]   = 0;
            relayRateData[rdRateSetPointLeftLo]   = 0;
            relayRateData[rdRateSetPointRightHi]  = 0;
            relayRateData[rdRateSetPointRightLo]  = 0;
            relayRateData[rdSpeedXFour]           = 0;
            relayRateData[rdTramLine]             = 0;

            mf.RateRelayOutToPort(relayRateData, numRelayRateDataItems);

            autoSteerData[sdHeaderHi]     = 127; // PGN - 32766
            autoSteerData[sdHeaderLo]     = 254;
            autoSteerData[sdRelayLo]      = 0;
            autoSteerData[sdSpeed]        = 0;
            autoSteerData[sdDistanceHi]   = 125; // PGN - 32020
            autoSteerData[sdDistanceLo]   = 20;
            autoSteerData[sdSteerAngleHi] = 125; // PGN - 32020
            autoSteerData[sdSteerAngleLo] = 20;
            autoSteerData[sdYouTurnByte]  = 0;
            mf.AutoSteerDataOutToPort();

            relayRateSettings[rsHeaderHi] = 127; // PGN - 32760
            relayRateSettings[rsHeaderLo] = 248;
            relayRateSettings[rsDualAccumulatedVolumeHi] = (byte)(Properties.Settings.Default.setRate_DualAccumulatedVolume >> 8);
            relayRateSettings[rsDualAccumulatedVolumeLo] = (byte)(Properties.Settings.Default.setRate_DualAccumulatedVolume);
            relayRateSettings[rsFlowCalFactorLeftHi]     = (byte)(Properties.Settings.Default.setRate_FlowmeterCalNumberLeft >> 8);
            relayRateSettings[rsFlowCalFactorLeftLo]     = (byte)(Properties.Settings.Default.setRate_FlowmeterCalNumberLeft);
            relayRateSettings[rsFlowCalFactorRightHi]    = (byte)(Properties.Settings.Default.setRate_FlowmeterCalNumberRight >> 8);
            relayRateSettings[rsFlowCalFactorRightLo]    = (byte)(Properties.Settings.Default.setRate_FlowmeterCalNumberRight);
            mf.RateRelayOutToPort(relayRateSettings, numRelayRateSettingsItems);

            autoSteerSettings[ssHeaderHi]        = 127;// PGN - 32764 as header
            autoSteerSettings[ssHeaderLo]        = 252;
            autoSteerSettings[ssKp]              = Properties.Settings.Default.setAS_Kp;
            autoSteerSettings[ssKi]              = Properties.Settings.Default.setAS_Ki;
            autoSteerSettings[ssKd]              = Properties.Settings.Default.setAS_Kd;
            autoSteerSettings[ssKo]              = Properties.Settings.Default.setAS_Ko;
            autoSteerSettings[ssSteerOffset]     = Properties.Settings.Default.setAS_steerAngleOffset;
            autoSteerSettings[ssMinPWM]          = Properties.Settings.Default.setAS_minSteerPWM;
            autoSteerSettings[ssMaxIntegral]     = Properties.Settings.Default.setAS_maxIntegral;
            autoSteerSettings[ssCountsPerDegree] = Properties.Settings.Default.setAS_countsPerDegree;
            mf.AutoSteerSettingsOutToPort();

            machineControlData[cnHeaderHi]     = 127; // PGN - 32758
            machineControlData[cnHeaderLo]     = 246;
            machineControlData[cnPedalControl] = 0;
            machineControlData[cnSpeed]        = 0;
            machineControlData[cnRelayLo]      = 0;
            machineControlData[cnYouTurn]      = 0;
            machineControlData[6] = 0;
            machineControlData[7] = 0;
            machineControlData[8] = 0;
        }
Beispiel #2
0
        //Reset all the byte arrays from modules
        public void ResetAllModuleCommValues()
        {
            relayRateData[rdHeaderHi]           = 127; // PGN - 32762
            relayRateData[rdHeaderLo]           = 250;
            relayRateData[rdSectionControlByte] = 0;
            relayRateData[rdRateSetPointHi]     = 0;
            relayRateData[rdRateSetPointLo]     = 0;
            relayRateData[rdSpeedXFour]         = 0;
            relayRateData[rdYouTurnControlByte] = 0;
            mf.RateRelayOutToPort(relayRateData, numRelayRateDataItems);

            autoSteerData[sdHeaderHi]     = 127; // PGN - 32766
            autoSteerData[sdHeaderLo]     = (254);
            autoSteerData[sdRelay]        = 0;
            autoSteerData[sdSpeed]        = (0);
            autoSteerData[sdDistanceHi]   = (125); // PGN - 32020
            autoSteerData[sdDistanceLo]   = 20;
            autoSteerData[sdSteerAngleHi] = (125); // PGN - 32020
            autoSteerData[sdSteerAngleLo] = 20;
            mf.AutoSteerDataOutToPort();

            autoSteerSettings[ssHeaderHi]        = 127;// PGN - 32764 as header
            autoSteerSettings[ssHeaderLo]        = 252;
            autoSteerSettings[ssKp]              = Properties.Settings.Default.setAS_Kp;
            autoSteerSettings[ssKi]              = Properties.Settings.Default.setAS_Ki;
            autoSteerSettings[ssKd]              = Properties.Settings.Default.setAS_Kd;
            autoSteerSettings[ssKo]              = Properties.Settings.Default.setAS_Ko;
            autoSteerSettings[ssSteerOffset]     = Properties.Settings.Default.setAS_steerAngleOffset;
            autoSteerSettings[ssMinPWM]          = Properties.Settings.Default.setAS_minSteerPWM;
            autoSteerSettings[ssMaxIntegral]     = Properties.Settings.Default.setAS_maxIntegral;
            autoSteerSettings[ssCountsPerDegree] = Properties.Settings.Default.setAS_countsPerDegree;
            mf.AutoSteerSettingsOutToPort();
        }