private void tDisplay_Tick(object sender, EventArgs e) { lCount.Text = mCount.ToString(); lDataLength.Text = mData.Length.ToString(); lMesssage.Text = mMessage; switch (mDSMessage.GetStatus()) { case (DSStatus.STATUS_AUTO): lStatus.Text = "Auto"; break; case (DSStatus.STATUS_DISA): lStatus.Text = "Disa"; break; case (DSStatus.STATUS_TELE): lStatus.Text = "Tele"; break; case (DSStatus.STATUS_TEST): lStatus.Text = "Test"; break; } lTime.Text = mDSMessage.GetTime().ToString(); lSequence.Text = mDSMessage.GetSequence().ToString(); }
private void tDisplay_Tick(object sender, EventArgs e) { lCount.Text = mCount.ToString(); byte[] theData = mCurStatusMessage.GetSendData(); switch (mStatus) { case (DSStatus.STATUS_AUTO): lStatus.Text = "Auto"; break; case (DSStatus.STATUS_TELE): lStatus.Text = "Tele"; break; case (DSStatus.STATUS_TEST): lStatus.Text = "Test"; break; default: lStatus.Text = "Dis"; break; } lTime.Text = mCurStatusMessage.GetTime().ToString(); lSequence.Text = mCurStatusMessage.GetSequence().ToString(); lLength.Text = theData.Length.ToString(); switch (mRCMessage.GetStatus()) { case (RCStatus.STATUS_GOOD): lRCStatus.Text = "Good"; break; case (RCStatus.STATUS_FAIL): lRCStatus.Text = "Fail"; break; } lRCTime.Text = mRCMessage.GetTime().ToString(); lRCSequence.Text = mRCMessage.GetSequence().ToString(); if (mCurStatusMessage.GetSequence() != mRCMessage.GetSequence()) { lRCSequence.BackColor = Color.LightCoral; } else { lRCSequence.BackColor = Color.LightGreen; } theData = mController.GetData(); UInt32 buttondata = Controller_Message.GetU32FrombyteArray(theData, Controller_Message.BUTTONS_BYTE_LOC); lControl.Text = buttondata.ToString(); lMessage.Text = mMessage; State theState = mGamepad.GetState(); mLeftX = (Int16)(theState.Gamepad.LeftThumbX); mLeftY = (Int16)(theState.Gamepad.LeftThumbY); mRightX = (Int16)(theState.Gamepad.RightThumbX); mRightY = (Int16)(theState.Gamepad.RightThumbY); mButtons = TranslateButtons((Int16)theState.Gamepad.Buttons); lControl.Text = mButtons.ToString() + " " + mLeftX.ToString() + " " + mLeftY.ToString();; }