Trying to send commands over MSP

Hi all, I appreciate any help you have on this.
I am attempting to send raw RC commands over MSP to a flight controller running betaflight. I am using this library, GitHub - fdivitto/MSP: Arduino MSP (MultiWii Serial Protocol) library. There is only one example given which details how to receive the rc channel values. I have gotten this to work fine and been able to print them to the serial monitor. However I would like to send raw RC commands over MSP to the flight controller. Within the .h file for the library is this struct
image

Below is my code.
#include <MSP.h>

MSP msp;

void setup()
{
  Serial.begin(115200);
  msp.begin(Serial);
}

void loop()
{
  msp_set_raw_rc_t rc;
  rc.channel[0] = 1300;
  msp.command(MSP_SET_RAW_RC, &rc, sizeof(rc));
  
Serial.println(rc.channel[0]);

  
}

This code does not seem to work however. It does not change the RC values of the FC. Am I using the function right? Is there something I am missing? Thanks in advance for any help and sorry if I am not being clear in any way about what my issue is.

Within the .cpp file is the function I am trying to use.

image

You are asking in the Arduino-forum. I have no idea what "betaflight" is

You should provide a link to a website that explains what "betaflight" is within half a screen.

You should give an overview of what you want to do in the end with this flight controller
And you should explain what kind of device is sending these commands
best regards Stefan

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.