I've written C code that communicates UAVObjects with a Revolution board over serial. I'm trying to send control stick values to the board without using DSM, SRXL, PWM, etc. by just sending formatted UAVObjects via the UAVTalk protocol over the serial USBTelemetry connection. I know the read / write code works as I can read 45 different objects that actively poll from the hardware, as well as successfully perform a handshake using the GCSTelemetryStats and FlightTelemetryStats objects.
However, I've tried setting the Roll, Pitch, Yaw, Thrust values on the UAVObjects RateDesired, ActuatorDesired, StabilizationDesired, ManualControlCommand, but the values I set on the objects seem to be ignored, because none of the objects that are sent back reflect the changed values. Is it possible to send control stick values in this way and have the hardware reflect them as if they were sent from a controller using DSM, PWM, etc? I'm sending messages like this:
void VXTelemetrySetControlState(VXTelemetryRef this, VXControlState controlState) {
VXLockAcquire(this->sensorLock);
this->controlState = controlState;
VXLockRelinquish(this->sensorLock);
VXTelemetryRaiseSensorChanged(this, VXTelemetrySensorValueControlState);
StabilizationDesiredData stabilizationDesiredData;
stabilizationDesiredData.Roll = controlState.roll * 180.0;
stabilizationDesiredData.Pitch = controlState.pitch * 180.0;
stabilizationDesiredData.Yaw = controlState.yaw * 180.0;
stabilizationDesiredData.Thrust = controlState.altitude * 100.0;
stabilizationDesiredData.StabilizationMode.Roll = STABILIZATIONDESIRED_STABILIZATIONMODE_ATTITUDE;
stabilizationDesiredData.StabilizationMode.Pitch = STABILIZATIONDESIRED_STABILIZATIONMODE_ATTITUDE;
stabilizationDesiredData.StabilizationMode.Yaw = STABILIZATIONDESIRED_STABILIZATIONMODE_AXISLOCK;
stabilizationDesiredData.StabilizationMode.Pitch = STABILIZATIONDESIRED_STABILIZATIONMODE_MANUAL;
VXTelemetryEnqueueWriteObjectMessage(this, MESSAGE_OBJ, STABILIZATIONDESIRED_OBJID, 0, &stabilizationDesiredData);
}