Syslink packet for commander
Posted: Mon Aug 19, 2019 6:00 pm
Hello,
I'm trying to create a syslink packet that can be sent through the link to make the motors ramp up (like through the commander in the python lib). As I understand, this would be sent in the NRF firmware with syslinkSend() and needs to have a type, length and data. Because it's not a radio or bootloader command, the existing code seems to tell me that the type should be SYSLINK_RADIO_RAW. The data that I've got in the packet is a copy of the data in the packet that is being sent for send_setpoint() commands in the python lib, and the length is the length of the data. Somehow, though, there seems to be a problem and I'm wondering if it's the way that I've got the packet filled. I haven't been able to find anything on this elsewhere but hopefully someone has an idea of where I might be going wrong. The code that I've written to fill the packet is:
static struct syslinkPacket slDebug;
slDebug.type = SYSLINK_RADIO_RAW;
char dataDebug[SYSLINK_MTU] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x00};
slDebug.length = 14;
memcpy(slDebug.data, dataDebug, slDebug.length);
and then the packet is being sent with syslinkSend(&slDebug);
Thanks for your ideas!
I'm trying to create a syslink packet that can be sent through the link to make the motors ramp up (like through the commander in the python lib). As I understand, this would be sent in the NRF firmware with syslinkSend() and needs to have a type, length and data. Because it's not a radio or bootloader command, the existing code seems to tell me that the type should be SYSLINK_RADIO_RAW. The data that I've got in the packet is a copy of the data in the packet that is being sent for send_setpoint() commands in the python lib, and the length is the length of the data. Somehow, though, there seems to be a problem and I'm wondering if it's the way that I've got the packet filled. I haven't been able to find anything on this elsewhere but hopefully someone has an idea of where I might be going wrong. The code that I've written to fill the packet is:
static struct syslinkPacket slDebug;
slDebug.type = SYSLINK_RADIO_RAW;
char dataDebug[SYSLINK_MTU] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x00};
slDebug.length = 14;
memcpy(slDebug.data, dataDebug, slDebug.length);
and then the packet is being sent with syslinkSend(&slDebug);
Thanks for your ideas!