Cleanflight 2.0.5 Tricopter? Tail servo doesn't work

Montiey

Master Tinkerer
I updated cleanlflight on my NAZE32 board to the latest stable version (2.0.5). Previously, everything worked. Of course, the tail servo just had to break.

Current config:
1 - motor
2 - motor
3 - motor
4 - n/a
5 - n/a
6 - servo (but does not receive any signal from NAZE)

It seems that there is no output for a servo on the latest versions of Cleanflight. I had to re-order my ESC wires to get them all to work, and in the process found that neither ports 4, 5, nor 6 work.

I went into the Servos tab, and tried to select ch4 (spektrum "rudder" channel) for servo 6, the only port with an independent hardware clock, and found that you cannot save settings in this tab anymore. Has anyone else with a tricopter seen anything similar on v2.0.0 or higher?

P.S. Please ask if you want wiring photos, dumps, etc.
 

makattack

Winter is coming
Moderator
Mentor
Did you update your configuration with a resource mapping for the servo? I had to do that with my Betaflight 3.x SPF3 based tricopter. The resource map will depend on your FC and which output pin you want, but you can figure that out based on the following:

https://github.com/betaflight/betaflight/wiki/Betaflight-resource-remapping
https://github.com/cleanflight/cleanflight/blob/master/src/main/target/NAZE/target.c

According to the naze32 / cf codebase, PB9 is the output for OUT6.

So your command might be something like

Code:
resource servo 1 pb9
 

Montiey

Master Tinkerer
EDIT:
# resource motor 1 none
Freed

# resource servo 1 pb9
Parse error

I'm not too experienced with CF's CLI, but what would a Parse Error entail?

~~~

I'll try that. I didn't do anything special with the update. Just a full chip erase, and then a full dump of my config back in. I browsed the GUI looking for settings that didn't carry over.

From the old version:
# version
# Cleanflight/NAZE 1.13.0 Jun 6 2016 / 00:03:48 (a77bc76)
# dump master
 
Last edited:

Montiey

Master Tinkerer
Hold on hold on…
There's a command for this.

The servo works now. The Servos tab is still blank and unusable, but the full functionality of the servo seems to be there. I'll continue testing this, though. FF is in a couple of days and I need this baby up and running!

P.S. The above would have worked as good as setting the mix, I think, but it's "SERVO", not "servo".


# mixer list
Available: TRI QUADP QUADX BI GIMBAL Y6 HEX6 FLYING_WING Y4 HEX6X OCTOX8 OCTOFLATP OCTOFLATX AIRPLANE HELI_120_CCPM HELI_90_DEG VTAIL4 HEX6H PPM_TO_SERVO DUALCOPTER SINGLECOPTER ATAIL4 CUSTOM CUSTOMAIRPLANE CUSTOMTRI QUADX1234

# mixer tri
Mixer: TRI

#

# resource
resource BEEPER 1 A12
resource MOTOR 1 A08
resource MOTOR 2 A11
resource MOTOR 3 B06
resource MOTOR 4 B07
resource MOTOR 5 B08
resource SERVO 1 B09
resource PPM 1 A00
resource PWM 1 A00
resource PWM 2 A01
resource PWM 3 A02
resource PWM 4 A03
resource PWM 5 A06
resource PWM 6 A07
resource PWM 7 B00
resource PWM 8 B01
resource LED_STRIP 1 A06
resource SERIAL_TX 11 A07
resource SERIAL_TX 12 B01
resource SERIAL_RX 11 A06
resource SERIAL_RX 12 B00

#

See https://github.com/cleanflight/cleanflight/blob/master/docs/Mixer.md
 
Last edited:

makattack

Winter is coming
Moderator
Mentor
Ah, sorry. I was going by memory, which isn't very good. Forgot the command was case sensitive, and that you don't actually use the same symbol in the code for the output pin in the syntax. What I get for being lazy. Glad you figured it out! I had also assumed you had the mixer set to tri already, but I guess that's another area where I'm lazy and make assumptions. I don't recall having to do anything special to get the servo tabs to work. Does it have an option at the bottom for "Live Mode?"
 

Montiey

Master Tinkerer
I don't recall having to do anything special to get the servo tabs to work. Does it have an option at the bottom for "Live Mode?"

Well, they still don't. Nothing in that tab is saved, and I don't think the live mode switch works even if you keep it open. By default, the servo responds to rudder input while disarmed. Maybe this setting was in the dump that I carried over from 1.13.0.
I just realized that I haven't checked my servo direction yet. I can't forget that! If it needs to be reversed I'll have another command to find.