iNav 7.1.2, struggling to set servos via MSP commands #10514
Unanswered
LeBirlante
asked this question in
Support
Replies: 1 comment 1 reply
-
I am not sure you are doing the correct thing. Moving the servos, via servo command is only done during setup. It is not a way to control the craft. Either way, you are likely sending the wrong payload, or miscaulating the crc of the msp message. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm developing a MSP implementation in order to be used on a companion computer talking to an H7-43 Wing fc with iNav 7.1.2 flashed.
In general, servos work pretty well as expected, I am able to change their midpoints (i.e., "move" them) both from iNav configurator and from CLI (via the "servo" command).
However, I'm having a hard time trying to change the servos via MSP commands. I can read all 16 servos' values correctly via a 0x78 (MSP_SERVO_CONF). However, I cannot get the FC to acknowledge neither a 0xD4 (MSP_SERVO_SET_CONF) nor a 0x2201 (MSP_INAV_SET_SERVO_CONF). In both cases I receive absolutely nothing (not even an error message) and of course servos will remain unchanged.
From /src/main/fc/fc,msp [line 2224] I've been able to find out the expected payload structure which iNav is expecting for those two MSP comands (dataSize = 15 for 0xd4, and 8 for 0x2201), being the first uint8 the number of servo you're changing the values for.
But the thing is, I cannot get something as simple and straightforward as the CLI command "servo 5 1500 2500 1600 100" to work via MSP with something like (byte message edited for clarity):
24,58,3c // msp header and direction
0 // flag
d4,0 // command code
f,0 // payload size = 15 , will be -> u8 u16 u16 u16 u8 u8 u8 u8 u32
5, f4, 1, ab, 9, 40, 6, 64, 0, 0, ff, 0, 0, 0, 0 // payload ---> 5d 500d 2475d 1600d 100d 0 0 255d 0 0 0 0
df // msp crc byte
What's somewhat confusing to me is that the FC won't even return a MSP error message, something with direction byte set to "!" for example. It will simply silently fail. Is there something I'm missing here?
thanks for your time,
Beta Was this translation helpful? Give feedback.
All reactions