You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use "Silicon Labs CP210x USB to UART Bridge (COM6)".
/////////////////////////////////////////////////////////////////////////////////////////////////////////
step1. connect Serialport - success
In pixhawk2.1, the default information is displayed. (GPS, etc.)
/////////////////////////////////////////////////////////////////////////////////////////////////////////
public MavLinkSerialPortTransport mavLinkSerialPortTransport = null;
public Ardupilot()
{
mavLinkSerialPortTransport = new MavLinkSerialPortTransport();
mavLinkSerialPortTransport.SerialPortName = SerialPortName;
mavLinkSerialPortTransport.BaudRate = BaudRate;
mavLinkSerialPortTransport.OnPacketReceived += new PacketReceivedDelegate(recvPacket);
mavLinkSerialPortTransport.Initialize();
}
private void recvPacket(object sender, MavLinkNet.MavLinkPacket packet)
{
Console.WriteLine(packet.Message.MessageId);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////
step2. Test Sending Message - sucess
But the delegate does not respond. 😭
/////////////////////////////////////////////////////////////////////////////////////////////////////////
public void MissionCount()
{
UasMissionCount uasMissionCount = new UasMissionCount()
{
MissionType = MavMissionType.Mission,
TargetComponent = 1,
TargetSystem = 1,
};
mavLinkSerialPortTransport.SendMessage(uasMissionCount);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////
I sent a lot of other messages, but not all of them answered.
The text was updated successfully, but these errors were encountered:
I don't have a pixhawk to test the protocol, but some autopilots need a specific sequence of messages to get a response. Try to find information on the specific protocol you are using, or ultimately, write a small proxy with mavlink.net to intercept all the messages and see how ground station or other software talks to the autopilot.
Thank you for answering.
I would like to know if I use fewer methods to connect using serialport.
For applications that are to be used as other devices, is this method correct?
I don't use UDP Connect.
I use "Silicon Labs CP210x USB to UART Bridge (COM6)".
/////////////////////////////////////////////////////////////////////////////////////////////////////////
step1. connect Serialport - success
In pixhawk2.1, the default information is displayed. (GPS, etc.)
/////////////////////////////////////////////////////////////////////////////////////////////////////////
public MavLinkSerialPortTransport mavLinkSerialPortTransport = null;
public Ardupilot()
{
mavLinkSerialPortTransport = new MavLinkSerialPortTransport();
mavLinkSerialPortTransport.SerialPortName = SerialPortName;
mavLinkSerialPortTransport.BaudRate = BaudRate;
mavLinkSerialPortTransport.OnPacketReceived += new PacketReceivedDelegate(recvPacket);
mavLinkSerialPortTransport.Initialize();
}
private void recvPacket(object sender, MavLinkNet.MavLinkPacket packet)
{
Console.WriteLine(packet.Message.MessageId);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////
step2. Test Sending Message - sucess
But the delegate does not respond. 😭
/////////////////////////////////////////////////////////////////////////////////////////////////////////
public void MissionCount()
{
UasMissionCount uasMissionCount = new UasMissionCount()
{
MissionType = MavMissionType.Mission,
TargetComponent = 1,
TargetSystem = 1,
};
mavLinkSerialPortTransport.SendMessage(uasMissionCount);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////
I sent a lot of other messages, but not all of them answered.
The text was updated successfully, but these errors were encountered: