Cleanflight aka Multiwii port to STM32 F10x and F30x

cosmic2112
Posts: 13
Joined: Thu Dec 05, 2013 12:58 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by cosmic2112 »

stronnag wrote:See the modes documentation on the cleanflight wiki.

On linux, you can use mwptools/switchedit that maps the slider abomination back to MW compatible tick boxes, however you have to specify that it cleanflight as another gratuitously unnecessary change makes auto-detection impossible.

Yes you can save the aux CLI settings, at least until the next non-backwards compatible change.


Hi Stronnag,

Thanks for that, Yes I am on Linux, I am trying to install that right now...

Thanks again

Cosmic

41south
Posts: 28
Joined: Tue Jun 26, 2012 11:44 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by 41south »

dominicclifton wrote:
41south wrote:Its can also take 3 or 4 goes to flash successfully - which may be another issue.


This is worrying and may be the cause of your problems, perhaps the flash is worn out on your old board? I would like someone else to confirm there is a problem with the latest code on the rev2 board.

The same board/cable/pc combo will flash BF first time every time, so that only leaves the firmware or Chrome app. There is an error message along the lines of 'expected xx received xx' where xx is a number. I'll run a flash shortly and quote the numbers.

If you can't find the issue in code I'll send you my green board :)

41south
Posts: 28
Joined: Tue Jun 26, 2012 11:44 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by 41south »

Tapatalk double post

nebbian
Posts: 67
Joined: Mon Jul 21, 2014 6:54 am

Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by nebbian »

Dominic, are you aware that there is quite a lot of anger, frustration and resentment over the forced use of sliders?

Lots of discussion on the rcgroups thread, starting here:
http://www.rcgroups.com/forums/showthre ... 74&page=19

cosmic2112
Posts: 13
Joined: Thu Dec 05, 2013 12:58 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by cosmic2112 »

nebbian wrote:Dominic, are you aware that there is quite a lot of anger, frustration and resentment over the forced use of sliders?

Lots of discussion on the rcgroups thread, starting here:
http://www.rcgroups.com/forums/showthre ... 74&page=19


Nebbian,

I think you are right, The Who said it years ago:-

"Meet the new boss
Same as the old boss"

I say theres nothing like compatibility, and , well you guessed it...

Cosmic - meeting the "Old boss"

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

New feature: Manual in-flight adjustment of RC Rate/ Expo / Pitch/Roll Rate/ Yaw Rate And P I D values!

https://www.youtube.com/watch?v=0IGjNAjPb_4



Configurator has not been updated to support this functionality yet, for now it's configured from the CLI.

Documentation for the feature is here:

https://github.com/cleanflight/cleanfli ... stments.md

You can do crazy setups with this, e.g. one 6 pos switch controls 2x 3pos switches for independantly adjusting Pitch/Roll P, I, D on one switch and Yaw P, I and D on another.

Latest binaries available now!

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

nebbian wrote:Dominic, are you aware that there is quite a lot of anger, frustration and resentment over the forced use of sliders?

Lots of discussion on the rcgroups thread, starting here:
http://www.rcgroups.com/forums/showthre ... 74&page=19


There is a balance to be found between providing backwards compatibility, fixing bugs, cleaning code and adding needed features, ideally there would be other developers helping out on the GUI. Currently there are a few developers working on the flight controller code but it seems no-one wants to work on the GUI. It's a lot for me to keep up with and my time is limited.

You can disable auto-updates of chrome apps and old configurator versions are available from github.

At some point i will use the github releases feature to keep track of releases so make going back to an easlier version easier should the case arise.

There's a saying i'm quite fond of: you have to break some eggs to bake a cake. :D This can be seen by the ease and speed in which the new adjustment range feature came together. It's unit tested and I was able to re-use lots of logic from the new channel range feature. Futhermore the de-coupling and dependancy reduction and isolation work on the codebase earlier in the year paid dividends when I came to implement this new feature.

gray100
Posts: 3
Joined: Mon Jun 23, 2014 12:11 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by gray100 »

Just wondered what I am doing wrong with getting MSP to work on the soft serial ports?

I tried :-
feature -RX_PARALLEL_PWM
feature RX_PPM
feature TELEMETRY
feature GPS
feature SOFTSERIAL
set serial_port_1_scenario = 5
set serial_port_2_scenario = 2
set serial_port_3_scenario = 4
set serial_port_4_scenario = 8

Tried changing baud-rate of msp to 19200 and 9600 Bluetooth to 19200 and 9600 and tried on port 3 and 4 and nothing, no data.

So thought ok I will run the Bluetooth at 115200 on the gps uart 2 and move gps to soft serial, but with that and frsky on the soft-serial the board seemed to lock up and get stuck in a cycle of green led on for quite some time and then off and cycles around again. I had to short the boot-loader pads to be able to re-flash out of the cycle as I could not connect back to the board.

Anyone any ideas what I am doing wrong or is it not possible to config like this, which was osd on uart1, gps on uart2 and fsky and msp only for Bluetooth on the soft serial ports.
I assuming I am doing something wrong and not understanding how this works.
If anyone got this to work or can tell me its not possible, would be grateful.
Many thanks.

nebbian
Posts: 67
Joined: Mon Jul 21, 2014 6:54 am

Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by nebbian »

dominicclifton wrote:
nebbian wrote:Dominic, are you aware that there is quite a lot of anger, frustration and resentment over the forced use of sliders?

Lots of discussion on the rcgroups thread, starting here:
http://www.rcgroups.com/forums/showthre ... 74&page=19


There is a balance to be found between providing backwards compatibility, fixing bugs, cleaning code and adding needed features, ideally there would be other developers helping out on the GUI. Currently there are a few developers working on the flight controller code but it seems no-one wants to work on the GUI. It's a lot for me to keep up with and my time is limited.

You can disable auto-updates of chrome apps and old configurator versions are available from github.

At some point i will use the github releases feature to keep track of releases so make going back to an easlier version easier should the case arise.

There's a saying i'm quite fond of: you have to break some eggs to bake a cake. :D This can be seen by the ease and speed in which the new adjustment range feature came together. It's unit tested and I was able to re-use lots of logic from the new channel range feature. Futhermore the de-coupling and dependancy reduction and isolation work on the codebase earlier in the year paid dividends when I came to implement this new feature.


Dude, did you even read that thread?

I've seen people switching back to baseflight because of the sliders. Personally I'm quite angry that I can't now set up my models without having to upgrade the firmware; firmware that in most cases is customised with bits that I'm testing exhaustively before submitting a pull request.

As a professional developer myself, I've learnt that one of the most important parts of the development lifecycle is customer feedback. I've learnt that rushing out major, non-backwards compatible changes is a recipe for alienating users.

And this is what's happening right here...

Please, please stop and think about this change. It's very unpopular. It would be in Cleanflight's best interests to provide a way to use the old gui, and be compatible with older installations of the firmware. Your users already feel that they're not being listened to, please don't reinforce that idea by breaking their systems with an update that in most cases, wasn't agreed to.

41south
Posts: 28
Joined: Tue Jun 26, 2012 11:44 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by 41south »

nebbian wrote:
dominicclifton wrote:
nebbian wrote:Dominic, are you aware that there is quite a lot of anger, frustration and resentment over the forced use of sliders?

Lots of discussion on the rcgroups thread, starting here:
http://www.rcgroups.com/forums/showthre ... 74&page=19


There is a balance to be found between providing backwards compatibility, fixing bugs, cleaning code and adding needed features, ideally there would be other developers helping out on the GUI. Currently there are a few developers working on the flight controller code but it seems no-one wants to work on the GUI. It's a lot for me to keep up with and my time is limited.

You can disable auto-updates of chrome apps and old configurator versions are available from github.

At some point i will use the github releases feature to keep track of releases so make going back to an easlier version easier should the case arise.

There's a saying i'm quite fond of: you have to break some eggs to bake a cake. :D This can be seen by the ease and speed in which the new adjustment range feature came together. It's unit tested and I was able to re-use lots of logic from the new channel range feature. Futhermore the de-coupling and dependancy reduction and isolation work on the codebase earlier in the year paid dividends when I came to implement this new feature.


Dude, did you even read that thread?

I've seen people switching back to baseflight because of the sliders. Personally I'm quite angry that I can't now set up my models without having to upgrade the firmware; firmware that in most cases is customised with bits that I'm testing exhaustively before submitting a pull request.

As a professional developer myself, I've learnt that one of the most important parts of the development lifecycle is customer feedback. I've learnt that rushing out major, non-backwards compatible changes is a recipe for alienating users.

And this is what's happening right here...

Please, please stop and think about this change. It's very unpopular. It would be in Cleanflight's best interests to provide a way to use the old gui, and be compatible with older installations of the firmware. Your users already feel that they're not being listened to, please don't reinforce that idea by breaking their systems with an update that in most cases, wasn't agreed to.

+1 and nicely put. I've lodged an issue for backward compatibility on Github

Implicit
Posts: 1
Joined: Sat Oct 25, 2014 5:26 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by Implicit »

I've just changed to Cleanflight on my Naze32 Acro, as I wanted access to the soft serial features.
I'm trying to set up a fixed wing plane with minimosd, GPS & a Spektrum Satellite.

I could get the individual parts working but when I tried to run this example, it has seemingly killed my naze:
d) RX SERIAL, GPS and TELEMETRY (when armed) MSP/CLI via softserial

GPS on UART1
RX SERIAL on UART2
TELEMETRY,MSP,CLI,GPS PASSTHROUGH on SOFTSERIAL1
feature -RX_PARALLEL_PWM
feature TELEMETRY
feature GPS
feature RX_SERIAL
feature SOFTSERIAL
set serial_port_1_scenario = 2
set serial_port_2_scenario = 3
set serial_port_3_scenario = 1
set msp_baudrate = 19200
set cli_baudrate = 19200
set gps_passthrough_baudrate = 19200
save


It wouldn't reboot, so I unplugged the USB and plugged it in again and it's been dead since.

Neither Cleanflight configurator, nor baseflight can connect and rying to re-flash the firmware gets a 'No reponse from the bootloader, programming: FAILED'
Tried using the STMicroElectronics Loader, but it can't connect either.
I had the Spektrum Satellite connected to the 3.3v,ground and pin4, nothing else.

When I plug in the Naze, the blue light will go on, green light will flash a few times and the go off.

brm
Posts: 287
Joined: Mon Jun 25, 2012 12:00 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by brm »

the old dude:
>As a professional developer myself, I've learnt that one of the most important parts of the development lifecycle is customer feedback. I've learnt that rushing out major, non-backwards compatible changes is a recipe for alienating users.
looking under the hoods and having a view on the serial protocoll pops up the issue.
the msp code is great - ready for the trash can.
you as a professional may collect some ideas how to proceed ...

cosmic2112
Posts: 13
Joined: Thu Dec 05, 2013 12:58 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by cosmic2112 »

nebbian wrote:
dominicclifton wrote:
nebbian wrote:Dominic, are you aware that there is quite a lot of anger, frustration and resentment over the forced use of sliders?

Lots of discussion on the rcgroups thread, starting here:
http://www.rcgroups.com/forums/showthre ... 74&page=19


There is a balance to be found between providing backwards compatibility, fixing bugs, cleaning code and adding needed features, ideally there would be other developers helping out on the GUI. Currently there are a few developers working on the flight controller code but it seems no-one wants to work on the GUI. It's a lot for me to keep up with and my time is limited.

You can disable auto-updates of chrome apps and old configurator versions are available from github.

At some point i will use the github releases feature to keep track of releases so make going back to an easlier version easier should the case arise.

There's a saying i'm quite fond of: you have to break some eggs to bake a cake. :D This can be seen by the ease and speed in which the new adjustment range feature came together. It's unit tested and I was able to re-use lots of logic from the new channel range feature. Futhermore the de-coupling and dependancy reduction and isolation work on the codebase earlier in the year paid dividends when I came to implement this new feature.


Dude, did you even read that thread?

I've seen people switching back to baseflight because of the sliders. Personally I'm quite angry that I can't now set up my models without having to upgrade the firmware; firmware that in most cases is customised with bits that I'm testing exhaustively before submitting a pull request.

As a professional developer myself, I've learnt that one of the most important parts of the development lifecycle is customer feedback. I've learnt that rushing out major, non-backwards compatible changes is a recipe for alienating users.

And this is what's happening right here...

Please, please stop and think about this change. It's very unpopular. It would be in Cleanflight's best interests to provide a way to use the old gui, and be compatible with older installations of the firmware. Your users already feel that they're not being listened to, please don't reinforce that idea by breaking their systems with an update that in most cases, wasn't agreed to.



Yes, I agree, Dominic has made a changes to suit a small number of users and then ignores the fact that most others do not need this feature, and in fact, puts people off.

Why won't Dominic listen to us, that makes it even worse!!

I have gone back to BF because I am disgusted with what has happened here, TC, all is forgiven...

Exidous
Posts: 9
Joined: Sat Oct 25, 2014 2:28 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by Exidous »

Seems like a LOT of overreacting. Mobs are so fickle is seems.

Does importing the check boxes into sliders not work and have to be done manually? Yes. Was the update automatic because you didn't turn off auto update? Yes.

Should Dominic be publicly flogged and denounced and people go running back to one of the biggest jerks in the development community I have ever seen? HELL NO

To forgive TC because someone added sliders/used auto update/"supposedly" ignored everyone is the more ridiculous logic I have heard in some time.

I'm sure Dominic is quite busy,instantly responding to every complaint would drive one insane. You simply cannot please everyone.

Now onto my question:

Which of these connection types is required to get all of the data from a Naze32 onto the MinimOSD?

0 UNUSED
1 MSP, CLI, TELEMETRY, GPS-PASSTHROUGH
2 GPS ONLY
3 RX SERIAL ONLY
4 TELEMETRY ONLY
5 MSP, CLI, GPS-PASSTHROUGH
6 CLI ONLY
7 GPS-PASSTHROUGH ONLY
8 MSP ONLY

Reason I ask is, I want to have GPS, BT, FrSky Telem, OSD, RSSI and Batt voltage all pass through the FC.

Current connections are:
Serial port 1 = USB/BT or FrSky Telem (armed) (Center pins and telem pin)
Serial port 2 = GPS ant (Pins 3/4)
Serial port 3 = MinimOSD (Pins 5/6?)
RSSI = Pin 2
Vbat = Vbat in pins

The CLI is the only reason I cannot get Scenario 5 onto softserial port 3.

Any ideas?

Dump with Cleanflight just in case someone asks:

Code: Select all

# dump

# version
Cleanflight/NAZE Oct 18 2014 / 17:12:31 (b03df44)
# dump master

# mixer
mixer CUSTOM
cmix 1 1.000 -0.420 1.000 0.900
cmix 2 1.000 -0.580 -1.330 0.890
cmix 3 1.000 0.420 1.000 -0.900
cmix 4 1.000 0.580 -1.330 -0.890
cmix 5 1.000 -1.000 0.000 -1.000
cmix 6 1.000 1.000 0.000 1.000
cmix 7 0 0 0 0


# feature
feature -RX_PPM
feature -VBAT
feature -INFLIGHT_ACC_CAL
feature -RX_SERIAL
feature -MOTOR_STOP
feature -SERVO_TILT
feature -SOFTSERIAL
feature -GPS
feature -FAILSAFE
feature -SONAR
feature -TELEMETRY
feature -CURRENT_METER
feature -3D
feature -RX_PARALLEL_PWM
feature -RX_MSP
feature -RSSI_ADC
feature -LED_STRIP
feature -DISPLAY
feature RX_PPM
feature VBAT
feature SOFTSERIAL
feature GPS
feature TELEMETRY


# map
map AETR1234


# led
led 0 2,2:ES:IA
led 1 2,1:E:WF
led 2 2,0:NE:IA
led 3 1,0:N:F
led 4 0,0:NW:IA
led 5 0,1:W:WF
led 6 0,2:SW:IA
led 7 1,2:S:WF
led 8 1,1:U:WF
led 9 1,1:U:WF
led 10 1,1:D:WF
led 11 1,1:D:WF
led 12 0,0::
led 13 0,0::
led 14 0,0::
led 15 0,0::
led 16 0,0::
led 17 0,0::
led 18 0,0::
led 19 0,0::
led 20 0,0::
led 21 0,0::
led 22 0,0::
led 23 0,0::
led 24 0,0::
led 25 0,0::
led 26 0,0::
led 27 0,0::
led 28 0,0::
led 29 0,0::
led 30 0,0::
led 31 0,0::


# color
color 0 0,0,0
color 1 0,255,255
color 2 0,0,255
color 3 30,0,255
color 4 60,0,255
color 5 90,0,255
color 6 120,0,255
color 7 150,0,255
color 8 180,0,255
color 9 210,0,255
color 10 240,0,255
color 11 270,0,255
color 12 300,0,255
color 13 330,0,255
color 14 0,0,0
color 15 0,0,0

set looptime = 2560
set emf_avoidance = 0
set mid_rc = 1500
set min_check = 1100
set max_check = 1900
set rssi_channel = 0
set input_filtering_mode = 0
set min_throttle = 1150
set max_throttle = 1850
set min_command = 1000
set 3d_deadband_low = 1406
set 3d_deadband_high = 1514
set 3d_neutral = 1460
set 3d_deadband_throttle = 50
set motor_pwm_rate = 400
set servo_pwm_rate = 50
set retarded_arm = 0
set disarm_kill_switch = 1
set small_angle = 25
set flaps_speed = 0
set fixedwing_althold_dir = 1
[B]set serial_port_1_scenario = 1
set serial_port_2_scenario = 2
set serial_port_3_scenario = 0
set serial_port_4_scenario = 0
set reboot_character = 82
set msp_baudrate = 115200
set cli_baudrate = 115200
set gps_baudrate = 115200
set gps_passthrough_baudrate = 115200[/B]
set gps_provider = 1
set gps_sbas_mode = 0
set gps_auto_config = 0
set serialrx_provider = 0
set telemetry_provider = 0
set telemetry_switch = 0
set frsky_inversion = 1
set frsky_default_lattitude = 0.000
set frsky_default_longitude = 0.000
set frsky_coordinates_format = 0
set frsky_unit = 0
set frsky_battery_size = 0
set vbat_scale = 110
set vbat_max_cell_voltage = 42
set vbat_min_cell_voltage = 35
set current_meter_scale = 400
set current_meter_offset = 0
set multiwii_current_meter_output = 0
set align_gyro = 0
set align_acc = 0
set align_mag = 0
set align_board_roll = 0
set align_board_pitch = 0
set align_board_yaw = 90
set max_angle_inclination = 500
set gyro_lpf = 42
set moron_threshold = 32
set gyro_cmpf_factor = 600
set gyro_cmpfm_factor = 250
set yaw_control_direction = 1
set acc_hardware = 0

# dump profile

# profile
profile 0

# aux
aux 0 0 0 1800 2100
aux 1 2 2 1400 2100
aux 2 2 3 1400 2100
aux 3 3 3 1400 2100
aux 4 4 2 1800 2100
aux 5 10 3 1800 2100
aux 6 12 1 1800 2100
aux 7 0 0 900 900
aux 8 0 0 900 900
aux 9 0 0 900 900
aux 10 0 0 900 900
aux 11 0 0 900 900
aux 12 0 0 900 900
aux 13 0 0 900 900
aux 14 0 0 900 900
aux 15 0 0 900 900
aux 16 0 0 900 900
aux 17 0 0 900 900
aux 18 0 0 900 900
aux 19 0 0 900 900
aux 20 0 0 900 900
aux 21 0 0 900 900
aux 22 0 0 900 900
aux 23 0 0 900 900
aux 24 0 0 900 900
aux 25 0 0 900 900
aux 26 0 0 900 900
aux 27 0 0 900 900
aux 28 0 0 900 900
aux 29 0 0 900 900
aux 30 0 0 900 900
aux 31 0 0 900 900
aux 32 0 0 900 900
aux 33 0 0 900 900
aux 34 0 0 900 900
aux 35 0 0 900 900
aux 36 0 0 900 900
aux 37 0 0 900 900
aux 38 0 0 900 900
aux 39 0 0 900 900

set gp

dfruehwald
Posts: 26
Joined: Wed Feb 20, 2013 1:08 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dfruehwald »

I have not used the new sliders yet but I like the concept. Some of us have radios with 6 position switches and the like and want to be able to use the full capabilities. I don't want to go back to the limited world of 3 checkboxes on aux channels. It does not seem that anyone is against someone coding a compatibility mode into the configurator. I don't see why Dominic should be forced to do it, he seemed more than willing for people to help.

I am also a professional software developer and while customer feedback is important, sometimes to advance a departure has to be made. I don't know how many times I've had a set of features be hated at first only to become loved later once people understood how to use them to their advantage. Just because your radio only has 2 or 3 position switches does not mean everyone's does.

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

Exidous wrote:Seems like a LOT of overreacting. Mobs are so fickle is seems.
I'm sure Dominic is quite busy,instantly responding to every complaint would drive one insane. You simply cannot please everyone.


well said. It's difficult trying to balance the needs of everyone.

brm wrote:Why won't Dominic listen to us, that makes it even worse!!


I don't always have time to respond to all the messages on all the threads on all the forums. If you think there's something i've not responded to then after a reasonable amount of time please draw my attention to it again.

gray100 wrote:As a professional developer myself, I've learnt that one of the most important parts of the development lifecycle is customer feedback. I've learnt that rushing out major, non-backwards compatible changes is a recipe for alienating users.


I agree with that, if I had more time to implement all the features everyone wanted and provide backwards compatibility for every scenario I would, but alas I don't have all the time in the world and sometimes there is a little bit of pain when a new non backwards compatible feature comes out. Given the current user count would you rather I spent me time fixing bugs, adding new features, cleaning code and generally making things better or spend time writing lots of additional code that provides a migration path for few users?

As things settle down and the number of users pick up more attention will be paid to issues such as migrations of data. There have already been a number of discussions on this topic in the IRC channel and it is somethng i am acutely aware of.

Exidous wrote:Which of these connection types is required to get all of the data from a Naze32 onto the MinimOSD?
Reason I ask is, I want to have GPS, BT, FrSky Telem, OSD, RSSI and Batt voltage all pass through the FC.


If you mean via softserial then see the docs!

Example C might be close to what you need.

https://github.com/cleanflight/cleanfli ... /Serial.md

Enjoy!

brm
Posts: 287
Joined: Mon Jun 25, 2012 12:00 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by brm »

brm wrote:Why won't Dominic listen to us, that makes it even worse!!

wrong quote ;-)

shufflez
Posts: 42
Joined: Sat Nov 19, 2011 5:26 pm
Location: Amsterdam, Netherlands

Post by shufflez »

@Implicit; could it be your bootloader is corrupt? When using STM Flash loader you'll have to short the sbl pins. See my thread over at OP forum for flashing CF via STM. Just use the latest binaries and connect via USB instead of the cc3d mainport in that procedure. Be advised; timing is crucial for successfully connecting to boot loader, can be quite annoying, but you'll get it eventually :)

Exidous
Posts: 9
Joined: Sat Oct 25, 2014 2:28 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by Exidous »

dominicclifton wrote:
If you mean via softserial then see the docs!

Example C might be close to what you need.

https://github.com/cleanflight/cleanfli ... /Serial.md

Enjoy!


I thought that one might be close but I have 4 serial connections I'd like to make.

Telem tx only
GPS RX/tx
BT rx/tx
Minimosd unsure if both RX/tx are needed

With option C where would I plug in the OSD if UART 1 is taken by the BT? If it's not possible I'll drop the BT if I have to.

Going to try:
UART1 Scenario 1 BT/TELEMETRY
UART2 Scenario 2 GPS
SOFTSERIAL 1 Scenario 8 OSD


Thanks

Patrick

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

hi patrick.

I understand now. It depends if you want to use them all at the same time. If you're happy with telemetry only when armed then what you posted will be fine. Remember that the msp baud rate applies to all msp ports.

Remember the maximum baud rate for softserial is (currently) 19200. It's not currently advisable to use both soft serial ports due to timer clashes, especially if receiving and transmitting. 2x soft serial ports that are transmit only at low board rates is ok. both soft serial ports have to use the same baud rate.

let us know how you get on.

XeCutor
Posts: 15
Joined: Tue Sep 23, 2014 9:06 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by XeCutor »

Which of these connection types is required to get all of the data from a Naze32 onto the MinimOSD?

You want MSP so scenario 1, 5 or 8. You cannot have 1 or 5 active on two different ports at the same time so you probably want 1+8 or 5+8. You can have MSP at the default 115200 baud rate and attach devices to soft serial using MSP and their baud rate will be limited to 19200 baud by the port. I use OSD on port1 with scenario 8, allows me to connect using USB on the rare occasion that I need it. I have bluetooth on soft serial 1 using scenario 5 which allows me to connect GUI + CLI to it at 19200 baud. This requires lowering cli_baudrate to 19200 (otherwise your serial settings will be defaulted), as I said - msp_baudrate can be left at the default.

gray100
Posts: 3
Joined: Mon Jun 23, 2014 12:11 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by gray100 »

Update to what I posted earlier in this thread, I managed after lots of fiddling getting everything connected and working using a older version of Cleanflight :D

Cleanflight/NAZE Sep 5 2014 / 22:47:35 (5b3d86e)

serial_port_1_scenario = 5 ( MSP, CLI, GPS-PASSTHROUGH)
serial_port_2_scenario = 2 ( GPS ONLY)
serial_port_3_scenario = 4 ( Frsky TELEMETRY )
serial_port_4_scenario = 8 ( MPS ONLY - bluetooth hc-06 - change baudrate on module to 9600)

msp_baudrate = 115200
cli_baudrate = 115200
gps_baudrate = 115200
gps_passthrough_baudrate = 115200
gps_provider = 1
gps_sbas_mode = 1
frsky_inversion = 1

The key for me to get it all working was using a older version of CleanFlight - Cleanflight/NAZE Sep 5 2014 / 22:47:35 (5b3d86e)

I could not get it to work with the newer builds.
I did try a earlier build before, but after seeing what a person called nunika had posted on the github issues "softserial not working" I tried going back and trying the version he said worked and low and behold it all works :D

Hopefully at some stage when Dominic gets time, this will be fixed and I can using the latest build with the neat features in.

Hopefully this will help others who had same problem as I did.

Many thanks, and love all the features being added to Cleanflight, thanks to Dominic and every one working on it.

strepto
Posts: 52
Joined: Sun Aug 11, 2013 6:22 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by strepto »

Hi all,

Apologies if this is covered elsewhere but I haven't noticed it. I was just wondering what the state of the current GPS code in Cleanflight is.

Someone I spoke to thought it had incorporated the Harakiri GPS code but I haven't seen mention of that anywhere. Is it using the original baseblight GPS code with built in return-to-ground or something smarter? Has any work been done on RTH with altitude hold/autolevel as failsafe?

Thanks for the hard work. I appreciate how much time goes into this sort of software development. And I very much like the idea of more than 3 flight modes on an aux channel - even with 3-pos switch radios it is possible to set up 6 positions easily using multiple switches and mixes, freeing up channels for other stuff.

Lastly, are there any plans to port Cleanflight to the Openpilot Revo?

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

New feature!


Cleanflight now supports in-flight switching of rate profiles.

Docs:

https://github.com/cleanflight/cleanfli ... rofiles.md

Video: (still uploading, should be there soon).



http://youtu.be/RkSec6LTzMY

Source:

https://github.com/cleanflight/cleanfli ... its/master


The binaries for this are not avilable yet, need a few people to compile and test it as there is a minor re-organization of the internal data structures and I want to be sure no problems are reported before releasing new binaries.

I've flight tested this on my CJMCU quad, rate profile selection via a 3pos switch works great!

nenno
Posts: 14
Joined: Mon Jan 31, 2011 4:59 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by nenno »

Hi...

i have a Flip32+ running with WS2812B-RGB-LEDs. The LEDs are working great. In your Video (Cleanflight - OLED Display & Configurable RGB LED Strips) on your 2nd Copter with 31 LEDs there are "chasing lights" when the Copter is disarmed.

How can I configure this? I have the same Copter-Frame with 31 LEDs.
Can you post your config?

Thanks... Nenno.

DIE_KUH
Posts: 19
Joined: Thu Feb 06, 2014 4:18 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by DIE_KUH »

Two days ago I wanted to try Autotune on one of my Minis, because I'm never completely happy with my PIDs and wanted to see what this Algorithm comes up with.

The hardware I used: eyefly Trip Frame, eyefly 1806 motors, Afro ESC 12A v3 with BLHeli, Gemfan 5030, Naze32 rev. 5, 4S 1.3 Ah nano-tech batteries.

The result? Well, I would call it a "catastrophic failure", except at least it didn't crash.

What happened: Started in angle mode, switched to roll tuning, and after the first few twitches the quad started to oscillate more and more. After maybe 10 seconds, the oscillations were really bad, but it also suddenly started to gain height, even with constant (low) throttle input. The only thing I could do was to switch Autotune off/on/off/on/off to end the tuning and reset to the previous PIDs.

Any idea what might have caused this? Maybe vibrations from the motors? I also had TPA set to 0.2, don't know if/how that affects autotune. Maybe I'll try again with a more stable quad.

Also: Is it supposed to beep the whole time, or should it only beep once when the tuning was sufficiently successful?

41south
Posts: 28
Joined: Tue Jun 26, 2012 11:44 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by 41south »

Not sure if this is a bug or not with saving Aux setup

Latest Cleanflight and Chrome configurator.

Run dump in CLI, copy paste all to a file and save.
Reset board to defaults
Restore dump file via copy/paste

No Aux setup is restored and I get this error in the CLI

# profile 0
profile 0

# 0 900 900
Unknown command, try 'help'
# aux 14 0 0 900 900

# aux 15 0 0 900 900


Here is the data from the dump file

# profile
profile 0

# aux
aux 0 1 0 1450 1550
aux 1 5 0 1950 2050
aux 2 0 0 900 900
aux 3 0 0 900 900
aux 4 0 0 900 900
aux 5 0 0 900 900
aux 6 0 0 900 900
aux 7 0 0 900 900
aux 8 0 0 900 900
aux 9 0 0 900 900
aux 10 0 0 900 900
aux 11 0 0 900 900
aux 12 0 0 900 900
aux 13 0 0 900 900
aux 14 0 0 900 900
aux 15 0 0 900 900

Everything else restores fine.

Cheers

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

That is a serial flow control issue. I experience this sometimes. It's when the hardware can't keep up with the amount of incoming serial data. Try pasting in chunks of settings at a time.

41south
Posts: 28
Joined: Tue Jun 26, 2012 11:44 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by 41south »

Thanks Dominic. I guess that raises some interesting issues regarding the copy/paste method of restoring settings.

1. It's quite possible that small yet vital settings could be missed by this overflow (something that also may not be obvious in the GUI like the Aux settings not coming back)

2. It pays to very carefully check the CLI for errors after pasting in all of your settings in case something has been missed.

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

yup, on some of my quads i have no problems, on others i get some weirdness. I always scroll up through the history to make sure everything looks ok after restoring a config using a cli.

strepto
Posts: 52
Joined: Sun Aug 11, 2013 6:22 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by strepto »

strepto wrote:Apologies if this is covered elsewhere but I haven't noticed it. I was just wondering what the state of the current GPS code in Cleanflight is.

Someone I spoke to thought it had incorporated the Harakiri GPS code but I haven't seen mention of that anywhere. Is it using the original baseblight GPS code with built in return-to-ground or something smarter? Has any work been done on RTH with altitude hold/autolevel as failsafe?

Lastly, are there any plans to port Cleanflight to the Openpilot Revo?


*cough cough*


...?

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

GPS code:
There are some important bug fixes compared to baseflight but the experience is otherwise the same.
Harakiri GPS code is being looked at and understood and then it will be ported.

F4 targets are on the radar, but not yet. I accept pull requests :)

tjeerd750
Posts: 3
Joined: Wed Apr 02, 2014 7:44 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by tjeerd750 »

After crashing and destroying my FPV Qx-9 (wooden frame) i decided to go back to rcexplorer's tricopter.

I found out that the servo tab wouldn't work (firmware too old for the gui?) so i did a firmware upgrade to the latest online version. Now i can't get the gui to connect anymore. I read somewhere this could be related to the revision 1 board I have.

The board is a Naze32 Full revision 1.

Is there a solution for this issue, other than downgrading the board?
I will try later if I can connect via BT.

How is the CC3d support going? Banggood has them on offer for $16,69

41south
Posts: 28
Joined: Tue Jun 26, 2012 11:44 pm

Post by 41south »

I had the same issue with a V2 board. Still no fix that I am aware of.

strepto
Posts: 52
Joined: Sun Aug 11, 2013 6:22 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by strepto »

dominicclifton wrote:GPS code:
There are some important bug fixes compared to baseflight but the experience is otherwise the same.
Harakiri GPS code is being looked at and understood and then it will be ported.

F4 targets are on the radar, but not yet. I accept pull requests :)


Thanks mate :)

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by wilco1967 »

dominicclifton wrote:GPS code:
There are some important bug fixes compared to baseflight but the experience is otherwise the same.
Harakiri GPS code is being looked at and understood and then it will be ported.

F4 targets are on the radar, but not yet. I accept pull requests :)


Hi,

Have a Flip32+ board since a few days.
initially, it had 'thatotherfirmwarethatshallnotbenamed' on it.

Tried Cleanflight today, but GPS hold does not seem to work. With that 'other' firmware, GPS hold works reasonable. Even went back after trying cleanflight, and it works OK(-ish) again, so it's not the hardware.

I have 8 - 10 sats, and a proper fix. Frsky telemetry shows the GPS data correctly. The number of sats remains >= 7 during flight. (T2 from Taranis logfile)

When I activate GPS PH, it always starts to move to the north, regardless which way it is pointing when activating PH.

I'm running
# version
Cleanflight/NAZE Oct 29 2014 / 11:10:08 (4521835)

Everything else seems to work perfect.... I especially like the more complete Frsky telemetry data, compared to that other firmware....

Thanks a lot, for this (otherwise) great piece of software ! :D

Wilco

madisonlee
Posts: 4
Joined: Mon Oct 20, 2014 8:47 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by madisonlee »

Hi,

What's the CLI command to disable MAG sensor please?

Thanks,
Madison

strips
Posts: 163
Joined: Thu Apr 03, 2014 1:28 pm

Sv: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by strips »

madisonlee wrote:Hi,

What's the CLI command to disable MAG sensor please?

Thanks,
Madison

Not possible in software on Naze32. You could de-solder it if you have the equipment and know how.

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Sv: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by scrat »

strips wrote:
madisonlee wrote:Hi,

What's the CLI command to disable MAG sensor please?

Thanks,
Madison

Not possible in software on Naze32. You could de-solder it if you have the equipment and know how.


acc_hardware This is used to suggest which accelerometer driver should load, or to force no accelerometer in case gyro-only flight is needed. Default (0) will attempt to auto-detect among enabled drivers. Otherwise, to force a particular device, set it to 1 for ADXL345, 2 for MPU6050 integrated accelerometer, 3 for MMA8452, 4 for BMA280, or 5 to disable accelerometer alltogether - resulting in gyro-only operation.

strips
Posts: 163
Joined: Thu Apr 03, 2014 1:28 pm

Sv: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by strips »

scrat wrote:
strips wrote:
madisonlee wrote:Hi,

What's the CLI command to disable MAG sensor please?

Thanks,
Madison

Not possible in software on Naze32. You could de-solder it if you have the equipment and know how.


acc_hardware This is used to suggest which accelerometer driver should load, or to force no accelerometer in case gyro-only flight is needed. Default (0) will attempt to auto-detect among enabled drivers. Otherwise, to force a particular device, set it to 1 for ADXL345, 2 for MPU6050 integrated accelerometer, 3 for MMA8452, 4 for BMA280, or 5 to disable accelerometer alltogether - resulting in gyro-only operation.

He was asking about magnetometer. What does that have to do with it?

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

Latest binaries are now available

Softserial fixed.
CC3D supports 4 channel parallel PWM mode.
Rate profiles.
Adjustment Range support added for in-flight tuning and rate profile switching.
Various cleanups and improvements.

41south
Posts: 28
Joined: Tue Jun 26, 2012 11:44 pm

Post by 41south »

Thanks Dom, will check that V2 board tonight and report back.

41south
Posts: 28
Joined: Tue Jun 26, 2012 11:44 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by 41south »

Still will not flash a v2 green board, results posted in Github issue.

hwurzburg
Posts: 75
Joined: Sun Jan 01, 2012 3:28 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by hwurzburg »

dominicclifton wrote:Latest binaries are now available

Softserial fixed.
CC3D supports 4 channel parallel PWM mode.
Rate profiles.
Adjustment Range support added for in-flight tuning and rate profile switching.
Various cleanups and improvements.

Dom,thanks for fixing softserial! and all the work!

with 41souths' serial port setup:
serial_port_1_scenario = 5 ( MSP, CLI, GPS-PASSTHROUGH)
serial_port_2_scenario = 2 ( GPS ONLY)
serial_port_3_scenario = 4 ( Frsky TELEMETRY )
serial_port_4_scenario = 8 ( MPS ONLY - bluetooth hc-06 - change baudrate on module to 9600)


Port1's MSP/CL/GPS_PASSTHROUGH are set by their respective set baud commands, as is port2's GPS, and FRSKY is always 9600...
1) but, is port_4 (MSP only...for OSD or radio link to phone...BT or 3dr) baud rate set by the MSP baudrate command as is port1s? and if its over the 19200 rate that softserial can handle, does the softserial port default back to some other rate?
2) can you have MSP commands flowing back to the FC from both port1 and port 4 "simultaneously"? like have it connected to USB and also have the OSD on port 4 adjust pids with MSP commands?


thanks


mrcottonmoutht
Posts: 2
Joined: Fri Nov 07, 2014 2:55 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by mrcottonmoutht »

DIE_KUH wrote:Two days ago I wanted to try Autotune on one of my Minis, because I'm never completely happy with my PIDs and wanted to see what this Algorithm comes up with.

The hardware I used: eyefly Trip Frame, eyefly 1806 motors, Afro ESC 12A v3 with BLHeli, Gemfan 5030, Naze32 rev. 5, 4S 1.3 Ah nano-tech batteries.

The result? Well, I would call it a "catastrophic failure", except at least it didn't crash.

What happened: Started in angle mode, switched to roll tuning, and after the first few twitches the quad started to oscillate more and more. After maybe 10 seconds, the oscillations were really bad, but it also suddenly started to gain height, even with constant (low) throttle input. The only thing I could do was to switch Autotune off/on/off/on/off to end the tuning and reset to the previous PIDs.

Any idea what might have caused this? Maybe vibrations from the motors? I also had TPA set to 0.2, don't know if/how that affects autotune. Maybe I'll try again with a more stable quad.

Also: Is it supposed to beep the whole time, or should it only beep once when the tuning was sufficiently successful?


I had similar issues, but lost my mini. I should not be experimenting with new firmware at night :( http://youtu.be/oWveJQ9tQS4

DIE_KUH
Posts: 19
Joined: Thu Feb 06, 2014 4:18 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by DIE_KUH »

Ouch. But autotuning at night... Audacious. ;)
Seems like the autotune algorithm is not very robust

Exidous
Posts: 9
Joined: Sat Oct 25, 2014 2:28 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by Exidous »

I do not believe you can receive via msp on two ports simultaneously. I could be wrong but I think it will only broadcast on multiple ports.

mrcottonmoutht
Posts: 2
Joined: Fri Nov 07, 2014 2:55 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by mrcottonmoutht »

DIE_KUH wrote:Ouch. But autotuning at night... Audacious. ;)
Seems like the autotune algorithm is not very robust

My bad on doing this in the dark :oops:
It could have been the firmware version or maybe just my quad. A 230 frame with rubber dampeners. Like this one:

http://www.buddyrc.com/diatone-17-v1-230-size-mini-quadcopter-frame.html

Maybe the frame separated?

bikerboy
Posts: 6
Joined: Wed Jul 03, 2013 4:16 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by bikerboy »

Hello,

I noticed today, something appears to be broken with the GPS code.
It doesn't enable, after the Feature gps command, I get the reply GPS enabled, but after save and reboot, it is still Feature -GPS.
Of course, the board does not see the GPS. This is on naze32 acro, latest firmware as of today.

The hardware is hooked up correctly, I flashed baseflight and I get the GPS recognized right away after enabling.

Post Reply