Cleanflight aka Multiwii port to STM32 F10x and F30x

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by copterrichie »

It would be nice to have a heartbeat with basic telemetry data, would cut down on traffic too.

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by Crashpilot1000 »

Well, BRM you know I respect you as a someone with very good input (like Hinkel) and scientific background. I've seen TC turning down your calibration improvements (too fast for me to look at them further, or copy them onto my hddsk) but on the other hand your github repo (bubi-007) lacks all the achievments you have done - and is full of forked repos- why is it? I (and I think many others that don't like to admit it like TC and his pitbulls like fiendie - yes, fiendie you know that you are nothing more than that. - Don't believe that? Just look at your own posts and doings and you will know you *tink ) would like to see yor changes/improvements. I think you have the power and the knowledge to start something better. Maybe with D.C.
Ps.: Sorry, too much beer already.
Cheers
Rob
Last edited by Crashpilot1000 on Fri Jun 06, 2014 10:03 pm, edited 1 time in total.

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

brm wrote:

Code: Select all

void setupTaskEntries()
{
   clearTaskEntries();

   setTaskEntry(eFrame_1Hz, 1, frame_Hartbeat);
   setTaskEntry(eFrame_10Hz, 10, frame_10Hz);
   setTaskEntry(eFrame_50Hz, 50, updateCommands);
   setTaskEntry(eFrame_Sensor_Fusion, 500, updateActuators);
   setTaskEntry(eFrame_Read_IMU, 1000, readImu);
}

a tasklet would look like:

Code: Select all

void updateActuators(float time)
{
    updateAttitude(time);
    stabilisation(time);
    mixTable();
    writeServos();
    writeMotors();
}


seperation of concerns ...
TC would say f*** it!


yes, that looks fine. i was also thinking that instead of this kind of commonly found code:

Code: Select all

    setTaskEntry(EVENT_10Hz, EVERY_EVENT, updateHoTTTelemetry);

    ...

    void updateHoTTTelemetry() {
        static triggerCount = 0;

        respondToHOTTRequest();

        switch(triggerCount++ % 3) {
            case 1:
                updateHoTTGPSMessage();
            break;
            case 2:
                updateHoTTGPSMessage();
            break; 
        }
       
        ...
    }


There could be way of saying do this every X time the event occurs. Since it's quite common to find code that performs this kind of logic inside the larger 'event' handlers.

Code: Select all

   setTaskEntry(EVENT_10Hz, EVERY_EVENT, respondToHOTTRequest);
   setTaskEntry(EVENT_10Hz, EVERY_SECOND_EVENT, updateHoTTGPSMessage);
   setTaskEntry(EVENT_10Hz, EVERY_THIRD_EVENT, updateHoTTEAMMessage);

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by brm »

Crashpilot1000 wrote:Well, BRM you know I respect you as a someone with very good input (like Hinkel) and scientific background. I've seen TC turning down your calibration improvements (too fast for me to look at them further, or copy them onto my hddsk) but on the other hand your github repo (bubi-007) lacks all the achievments you have done - and is full of forked repos- why is it? I (and I think many others that don't like to admit it like TC and his pitbulls like fiendie - yes, fiendie you know that you are nothing more than that. - Don't believe that? Just look at your own posts and doings and you will know you *tink ) would like to see yor changes/improvements. I think you have the power and the knowledge to start something better. Maybe with D.C.
Ps.: Sorry, too much beer already.
Cheers
Rob


the input i have: not much of value.

one of the nasty things is the production issues (offsets) at the invensense manufacturing site.
the latest dongs hw needs no calibration at all.
then i have mems devices which are slightly of the center.
and other ones i can only use with sphere fitt calibration.
this is difficult to handle.

alas john said - put the hw in the fridge and then do the temp. calibration.
according to seb madgwick this eliminates the random walk of the device.
and john said this is enough to achieve good results.

need to verify this on the different hw i have.

emptied a bottle of crement - spend the the last weekend near selestat ...

doppler
Posts: 64
Joined: Wed Sep 26, 2012 1:35 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by doppler »

Does cleanflight contain the Yaw improvments made in versio 2.3 of Mwii, or is it a copy of baseflights? I found I couldn't get acceptable yaw, well ever, but basic usable yaw without -90 expo on my transmitter. I've currently switched to Harakiri testcode3 which has incorporated 2.3's yaw improvements and is very usable on that front. However it doesn't appear ez-gui works with it and I really like being able to tweak everything via my droid tablet.

Thanks
Andrew

Pierre_A
Posts: 35
Joined: Thu May 15, 2014 9:32 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by Pierre_A »

@doppler
don't know the yaw improvements you're thinking of but for me , with Cleanflight version june 3, Naze32 on Y4 config, default yaw PID , yaw rate=0 , align_board_yaw=-90 and no expo on the Tx, the yaw behaviour is quite precise, fast and smooth.

doppler
Posts: 64
Joined: Wed Sep 26, 2012 1:35 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by doppler »

Pierre_A wrote:@doppler
don't know the yaw improvements you're thinking of but for me , with Cleanflight version june 3, Naze32 on Y4 config, default yaw PID , yaw rate=0 , align_board_yaw=-90 and no expo on the Tx, the yaw behaviour is quite precise, fast and smooth.


Best way to find out is to try it. I loaded a compile I did from a git pull last night and configured it all up. Flies just like baseflight, unfortunately, that means the YAW is near useless on my quadX. Rate is at 0.50 for YAW, I copied my config over from my Harakiri setup, I had to switch my radio from +12 expo to -80 to get anything usable out of it, as I fly acro, usable isn't good enough, it needs to be stupid fast.

Any chance the MWii 2.3 YAW changes can make it into cleanflight? I like the fact that I got back the baseflight configurator, and the ez-gui android app.

Thanks
Andrew

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

i'll add that to my list of things to look into. feel free to have a go at merging the code yourself and submit a pull request. :D Do you have any links to the specific code changes you're referring to in Multiwii? links/file/method/line numbers?

That would be most helpful.

doppler
Posts: 64
Joined: Wed Sep 26, 2012 1:35 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by doppler »

dominicclifton wrote:i'll add that to my list of things to look into. feel free to have a go at merging the code yourself and submit a pull request. :D Do you have any links to the specific code changes you're referring to in Multiwii? links/file/method/line numbers?

That would be most helpful.


Hi Dominic, appreciate the offer and capability to submit code, however I'm not a coder, I can build the sources just fine when things are in good shape :) but my ability to identify and modify code is very poor. I can however always help with testing out the code on my quad as more and more features and bug fixes come up.

The closest I can point you to the right place is CrashPilot1000's testcode3 at https://github.com/Crashpilot1000/TestCode3 in his Harakiri readme he notes the inclusion but I can't find any commits to that effect.

Thanks and I appreciate the consideration you've already given this item

Andrew

fiendie
Posts: 151
Joined: Fri Apr 20, 2012 4:22 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by fiendie »

Crashpilot1000 wrote:Well, BRM you know I respect you as a someone with very good input (like Hinkel) and scientific background. I've seen TC turning down your calibration improvements (too fast for me to look at them further, or copy them onto my hddsk) but on the other hand your github repo (bubi-007) lacks all the achievments you have done - and is full of forked repos- why is it? I (and I think many others that don't like to admit it like TC and his pitbulls like fiendie - yes, fiendie you know that you are nothing more than that. - Don't believe that? Just look at your own posts and doings and you will know you *tink ) would like to see yor changes/improvements. I think you have the power and the knowledge to start something better. Maybe with D.C.
Ps.: Sorry, too much beer already.
Cheers
Rob


I can certainly hap-hazardly copy some APM code over or create a fork with some fancy math experiments every other week before angrily deleting everything after two days if that's what you want ;)

Dunno what made you think I have any problems with brm, tho.

The only issue I ever had with you is that you refuse to do even basic source control and have been rather whiney about it. You can't dump ZIP files somewhere and complain that nobody wants your changes. If you need help with Github I would be glad to provide it ;)

Since the move to Github there have been a lot of great Pull Requests and if they were in accordance with the coding guidelines in the wiki they all got a fair shake.
There is no "not invented here" attitude which people like Hamburger keep pushing and where patches rot for months. Despite the impression that the "Hydrama" might have made here in the forum.

Maybe if Hydra/Clifton told you the whole story or you would have been there to witness it you wouldn't call the little license stunt a "declaration of war". Do I think it's a bit childish? Yes. But Hydra tried *really* hard ;)

So no, it's not about being anybody's pitbull. It's about getting the facts straight and not quoting shit out of context.

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 guys!

Status update time again.

I'm happy to announce support for Addressable RGB LED strips!

You can read the full documentation here.

https://github.com/hydra/cleanflight/bl ... edStrip.md

quick overview summary:

Addressable LED strips can be used to show information from the flight controller system, the current implementation
supports the following:

* Indicators showing pitch/roll stick positions.
* Heading/Orientation lights.
* Flight mode specific color schemes.
* Low battery warning.

Max of 10 * WS2812 LEDs currently supported (RAM/Current Draw) each to change in the future if required.

WS2811 LEDs are CRAZY bright. They work really well even in daylight. Simple wiring - only 3 connections including power!

Example products:

http://www.ebay.co.uk/itm/0-5m-WS2812B- ... 58b0944fbe
http://www.ebay.co.uk/itm/1m-WS2812B-RG ... 233b6332c2
http://www.ebay.co.uk/itm/10-RGB-LED-WS ... 1c40e376cc
http://www.ebay.co.uk/itm/20-RGB-LED-WS ... 19ed634f78


In the future, if someone codes it, they could be used to show GPS navigation status, thrust levels, RSSI, etc.
Lots of scope for ideas and improvements.

Likewise, support for more than 10 LEDs is possible, it just requires additional development. 10 was chosen to
start with due to current draw and RAM usage.

Code, as always, is here: https://github.com/hydra/cleanflight/commits/master

Once I fit some to only of my quads I'll try and get some photos and video together.

Enjoy!

User avatar
treym
Posts: 258
Joined: Sat Jul 21, 2012 12:28 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by treym »

dominicclifton wrote:I'm happy to announce support for Addressable RGB LED strips!
[...]
WS2811 LEDs are CRAZY bright.


Hello Dominic,

thanks for this new supported hardware , very much appreciated .. this is a handy addition for all stm32

Image

Hydroculture
Posts: 5
Joined: Wed Jan 22, 2014 5:42 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by Hydroculture »

Dear Dominic!

Thank you so much for this nice Firmware branch.
Installed it on my little h-quad
Installation went flawless, connection to your cleanflight configurator the same.
Quad flies great!

Whats im still unsure about is the format of your mag-declination input in the cleanflight fw.
How do I have to enter it?


Before, it used to have crashpilot1000's super "summergame pre2.6" version.
Unfortunately i didnt get the beeper working with it, as i loose the fpv model quite often in high grass,
i liked to have it working. Still use SG2.6 it on all my other quads, his failsafe routines are great.
Really looking forward to crashpilot1000 continuing his great work. Love it!

So again, thank you so much for your work Dominic (and Robert)

best
Holger

bernsy
Posts: 2
Joined: Sun May 11, 2014 2:00 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by bernsy »

subscribed

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

Hydroculture wrote:Dear Dominic!

Thank you so much for this nice Firmware branch.
Installed it on my little h-quad
Installation went flawless, connection to your cleanflight configurator the same.
Quad flies great!


Thats great! Thanks for the feedback. Did you try pid controller 2? - lux's one.

Hydroculture wrote:Whats im still unsure about is the format of your mag-declination input in the cleanflight fw.
How do I have to enter it?


It's the same as in baseflight. Not got the details handy at the moment.

Please keep the feedback, ideas, etc coming

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

I built a new Mini Spider quad over the last week and gave it it's maiden flight today. I made a video of the customisable LED support that I've added.

Here's the video of the LED progress:



https://www.youtube.com/watch?v=cZTofVITR94

Here's a video of the maiden flight of my new quad, starting during the day and some night flying later on in the video, on the youtube page there are time offsets.



https://www.youtube.com/watch?v=j67E1uIEnUQ

Hardware wise my new quad's spec is as follows:

Frame - Alien Spider AQ50D PRO 250mm Mini Quadcopter Carbon Fiber - http://www.goodluckbuy.com/alien-spider ... frame.html
Motors - ZMR 1804 2400kv - http://www.banggood.com/-X-Power-1804-2 ... 23424.html
Flight Controller - Flip 32 + - http://witespyquad.gostorego.com/flight ... 2-249.html
Props - Gemfan 5030 - http://www.hobbyking.co.uk/hobbyking/st ... hite_.html
ESC - B-12A Ice Blue series SimonK - http://witespyquad.gostorego.com/speed- ... imonk.html
RX - FrSky D4R-II - http://www.unmannedtechshop.co.uk/frsky ... eiver.html
Battery - Dynamic 1800Mah 3S LiPo - http://www.hobbystores.co.uk/default.as ... =DYN3S1800
+ buzzer
+ 28 WS2812 LEDs.
+ foam under baro
+ o-rings above and below FC.
+ nylon screws for FC
+ 2x inline female bullet connectors for power distribution
+ bluetooth module for configuration
+ 100uf smoothing capacitor on FC.
+ RSSI lead from RX to RC2 and using RSSI_ADC feature
+ Telemetry lead from RX and using UART2 - still need to fit inverter or write some code to get telemetry working because softserial pins used by LED strip pins.

Total weight inc props and battery = 420grams. Flight time ~12-15m depending on throttle usage.

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

Also, my CC3D board turned up, hopefully I'll get some time to port cleanflight to that now that my new quad is built, need to work a little more on the LED support first though.

http://www.openpilot.org/products/openp ... -platform/

http://www.goodluckbuy.com/cc3d-openpil ... odels.html

Those boards are now only $37!

My experience with the Flip32+ has been very positive so far - for my use the only thing missing is a built in inverter for the FrSky telemetry output. Really like having the +5V and GND next to the IO ports and RC inputs. My wiring for the Flip32+ was much tidier than on the Naze32 which has head pins all over the place.

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

Cleanflight configurator updated today to support the MSP command to configure servo channel forwarding.

https://github.com/hydra/cleanflight-co ... its/master

The old multiwii code that hacked using 'mid' to also do servo channel forwarding was replaced with a new MSP command a while ago and I finally got round to making the corresponding change in the configurator.

I will merge in all the recent configurator changes ASAP.

bernsy
Posts: 2
Joined: Sun May 11, 2014 2:00 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by bernsy »

Dominic,

I am quite curious to see your review on the GLB CC3d boards, compared with Flip32 and NazeAcro board.

With the prices of CC3D boards coming so low, they are going to be very popular.

failsafe
Posts: 4
Joined: Wed Jul 09, 2014 10:18 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by failsafe »

We have seen issues with these boards , take a quick gander over at the openpilot forums and you will see many new threads the past couple of weeks due to the influx of these inexpensive boards . Most of what we have seen is lack of bootloader installed. There have also been reports of faulty soldering and some boards cutting out for no reasons.
I have been following this for a while now and am excited to be able to move platforms across one board .
Great job dominicclifton!
Also digging the youtube videos as well
Very interesting the work you are doing

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

failsafe wrote:We have seen issues with these boards , take a quick gander over at the openpilot forums and you will see many new threads the past couple of weeks due to the influx of these inexpensive boards.

Yes, mine came without the bootloader installed. Luckily I had tools. Being able to upload a bootloader is pretty important but luckily the CC3D board doesn't require any soldering to allow you to do it since it has a nice SWD port built in - unlike the naze32.

Anyway,status update time:

1 - Cleanflight configurator is now available on the Chrome App Store. Link in first post on this thread.

2 - CC3D board is probably flyable using a limited configuration - PPM + 4 MOTORS only.

Details here:
https://github.com/hydra/cleanflight/issues/20

Code here: ('cc3d' git branch)
https://github.com/hydra/cleanflight/commits/cc3d

Video here:

https://www.youtube.com/watch?v=4l4REH_R-gg



Video shows the CC3D board hooked up and PPM + LED + Accelerometer & Gyro working (via SPI, not I2C)

So who wants to try it?

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

Post by strips »

I like the notion that cleanflight will run on multiple hardware platforms. I just hope it will not eat up all your time dominicclifton :) I hope you find a good platform and focus on that. Keep up the good work :D

User avatar
tungsten2k
Posts: 62
Joined: Sat Jun 21, 2014 10:49 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by tungsten2k »

I wish I could say my first experience with Cleanflight was, well, cleaner :)

Following directions on this page (which happen to be the same default process in Baseflight):

https://github.com/hydra/cleanflight/wi ... upner-SUMD
To enable SerialRX use CLI and type:
"feature SERIALRX"
and then choose the type of receiver by typing one of the following lines
"set serialrx_type=0" for Spektrum 10bit (1024)
"set serialrx_type=1" for Spektrum 11bit (2048)
"set serialrx_type=2" for Futaba SBUS mode
"set serialrx_type=3" for for Graupner SUMD


None of these parameters are even available, having been replaced (presumably) by these:

Code: Select all

feature RX_SERIAL

and

Code: Select all

serialrx_provider = 1
serial_port_1_scenario = 1
serial_port_2_scenario = 2
serial_port_3_scenario = 0
serial_port_4_scenario = 0

But even enabling "RX_SERIAL" and setting "serialrx_provider" to "1"

Code: Select all

Entering CLI Mode, type 'exit' to return, or 'help'

# feature RX_SERIAL
Enabled RX_SERIAL

# feature
Enabled features: VBAT RX_SERIAL RX_PARALLEL_PWM

# feature -RX_PARALLEL_PWM
Disabled RX_PARALLEL_PWM

# feature
Enabled features: VBAT RX_SERIAL

# save
Saving...
Rebooting...ÿ

Results in no error or anything, but the feature is jettisoned upon reboot:

Code: Select all

Entering CLI Mode, type 'exit' to return, or 'help'

# feature
Enabled features: VBAT

#

And then on the next reboot, the RX_PARALLEL_PWM feature is again enabled without any user action (!) which gives the impression to a new user of, "man, this is some flakey f@#%*n $4#!". :mrgreen: But so many here seem happy with it, and at least the heart of the project seems in the right direction, so I persevered...

On this page:

https://github.com/hydra/cleanflight/wiki/CLI-Variables

It states:
NOTE: These settings always describe LATEST firmware source release, and do not necessarily reflect features of pre-built firmware images.

And it too has the outdated parameters that do not match with the current code:
serialrx_type

When feature SERIALRX is enabled, this allows connection to several receivers which output data via digital interface resembling serial. These include Spektrum Satellite, Futaba SBUS, and Graupner SUMD. Currently supported values for this setting are:
0 - Spektrum 10bit (1024)
1 - Spektrum 11bit (2048)
2 - Futaba SBUS
3 - Graupner SUMD
Note, that SBUS will require a signal inverter in order to connect.

I appreciate the goal of Cleanflight:
...a fork of baseflight that attempts to improve the quality of the codebase by introducing tests, improving naming, code decoupling and other software development best practices...

But it seems even basic functionality isn't really user friendly. After reviewing the code, I found the following lines:

Code: Select all

// this exists so the user can reference scenarios by a number in the CLI instead of an unuser-friendly bitmask.
const serialPortFunctionScenario_e serialPortScenarios[SERIAL_PORT_SCENARIO_COUNT] = {
    SCENARIO_UNUSED,

    // common scenarios in order of importance
    SCENARIO_MSP_CLI_TELEMETRY_GPS_PASTHROUGH,
    SCENARIO_GPS_ONLY,
    SCENARIO_SERIAL_RX_ONLY,
    SCENARIO_TELEMETRY_ONLY,

    // other scenarios
    SCENARIO_MSP_CLI_GPS_PASTHROUGH,
    SCENARIO_CLI_ONLY,
    SCENARIO_GPS_PASSTHROUGH_ONLY,
    SCENARIO_MSP_ONLY
};

Seeing that the 4 serial parameters must be related, I dug deeper, then found this page:

https://github.com/hydra/cleanflight/bl ... uration.md

Which in fact has the final piece of the puzzle required to enable serial RX (hallelujah !)

Code: Select all

set serial_port_2_scenario = 3

As one who typically uses Google to resolve most issues, the misinformation on the ancillary pages (the relevant *.md files didn't even show up on the first page of google hits) causes a bit of confusion since they are not maintained. Since the code will be changing considerably in your effort to "clean" it, It would probably best to get rid of the pages entirely, or ensure they are kept up to date as part of your coding process. This will prevent stale information from tripping up new users. Additionally, maybe putting the "Documentation" section of the "Readme" file as the very first section may help new users as well, as most new users might not be familiar with the *.md files being actual documents, directing them clearly to it (I'm not sure; I'm just trying to think of things that would have got me out of the ditch. These are just suggestions based on my "newbie to Cleanflight" experience).

Anyway, it's working now (Spektrum SAT).

Now for a bug report (or "feature request" depending on how you look at it ;) )

OSDSW auxilliary switch setting does not function with MWOSD 1.1 (OSD stays on screen when OSDSW switch is activated). On this exact same hardware configuration with latest Baseflight and MWOSD 1.1, the OSDSW switch functioned. It was stated earlier that Cleanflight is tested with KVOSD, but most of those I know have moved to MWOSD so it would probably be good to add that popular project to the test mix. Let me know how I can help.

Thanks for the work on this !

-=dave

EDIT: I ran into an obscure one that needed to be captured... I couldn't get any of the upper channels to work on my DX9, no matter what I did. In the end, I finally tracked it down to that apparently the Spektrum SAT gets its protocol config set from the receiver it's bound to at the time. I had originally bound the SAT with the closest receiver I had at arms length, which was a Spektrum AR6210 6-channel. Once I rebound with the AR8000, all the channels on my DX9 worked.
Last edited by tungsten2k on Tue Aug 19, 2014 9:00 pm, edited 8 times in total.

User avatar
tungsten2k
Posts: 62
Joined: Sat Jun 21, 2014 10:49 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by tungsten2k »

ps- The reason I detailed the process here wasn't to just complain, but for others attempting to use Spektrum satellites, as it is not documented in one location anywhere else in the world :)

-=dave

failsafe
Posts: 4
Joined: Wed Jul 09, 2014 10:18 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by failsafe »

I have successfully loaded cleanflight to my cc3d
with St flash demo and a ftdi serial adaptor.
Board is responsive in the gui and all is looking well.
Will try to test fly tonight if I can

subaru4wd
Posts: 316
Joined: Sat Dec 08, 2012 2:16 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by subaru4wd »

dominicclifton wrote:My experience with the Flip32+ has been very positive so far - for my use the only thing missing is a built in inverter for the FrSky telemetry output. Really like having the +5V and GND next to the IO ports and RC inputs. My wiring for the Flip32+ was much tidier than on the Naze32 which has head pins all over the place.


I couldnt agree with you more! I just got a new Flip32+ to replace my old one which died in a crash. I was debating if i should get an authentic Naze32, but after helping so many newbs with theirs and dealing with the horrible pin position, i decided I can wait 3 weeks for another Flip.

Here it is with all the pins it needs to be functional (OSD/BT pins located on the bottom)
Image

Just loaded Cleanflight on it and will maiden it here in a few hours as soon as the kids take their nap :)

wade.weppler
Posts: 3
Joined: Mon Jul 21, 2014 8:57 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by wade.weppler »

Had a rather scary experience with AutoTune...

Installed cleanflight on a Naze32, on a stock DJI FW550 w/D4R-II via CPPM, and it flew very nicely. No different than baseflight.

Then I tried autotune.

Turned it on to do it's roll calibration, and off it went. Rocking back and forth. Let it go for about 20 seconds or so before the slight breeze pushed it too far. Flipped it on again, and it started to do pitch calibration. This is where it got interesting. Started to oscillate strangely, but I let it keep going. Before it got too far, I turned it off and it did a couple of spins on its own, and then was very hard to control!

It had highspeed oscillations, and kept trying to lean to one side drastically. I had to fight to get it back down in one piece, all the while it would move unpredictably. Landed on one arm, which I managed to break, but that was the only damage. Could have been much much worse!

So, I'm a bit paranoid and have gone back to baseflight. I know AutoTune is experimental, and the hex was flying nicely without it, so I probably shouldn't have fixed what wasn't broken in the first place.

Just thought I'd post my results.

failsafe
Posts: 4
Joined: Wed Jul 09, 2014 10:18 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by failsafe »

cleanflight on my cc3d
just a simple testflight to verify flight characteristics
http://youtu.be/tLaDye2w0lA

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

wade.weppler wrote:It had highspeed oscillations, and kept trying to lean to one side drastically. I had to fight to get it back down in one piece, all the while it would move unpredictably. Landed on one arm, which I managed to break, but that was the only damage. Could have been much much worse!

So, I'm a bit paranoid and have gone back to baseflight. I know AutoTune is experimental, and the hex was flying nicely without it, so I probably shouldn't have fixed what wasn't broken in the first place.

Just thought I'd post my results.


Thanks for sharing that. If you had flipped the autotune switch again it would have in-flight reverted the changes back to the old pid settings. I specifically designed the feature that way so you could get out of such trouble 8-)

Did you by any chance record the pid settings that it produced?

User avatar
tungsten2k
Posts: 62
Joined: Sat Jun 21, 2014 10:49 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by tungsten2k »

Is OSDSW (enable/disable OSD overlay) working for anyone else using CPPM receiver input on a minimosd (Witespy) board ?

-=dave

wade.weppler
Posts: 3
Joined: Mon Jul 21, 2014 8:57 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by wade.weppler »

dominicclifton wrote:Thanks for sharing that. If you had flipped the autotune switch again it would have in-flight reverted the changes back to the old pid settings. I specifically designed the feature that way so you could get out of such trouble 8-)

Did you by any chance record the pid settings that it produced?


Thanks Dominic,

I did not record the PID's. I thought about it, not sure why I didn't!

I should have also read the procedure more thoroughly, so I could have done the last step and reverted back to the original PID's and save having to buy another $6 arm. ;)

I'll give it another try at some point, with a different quad (FW330). I will post my results.

-wade

shadowjig
Posts: 16
Joined: Thu Jun 26, 2014 12:22 am

Post by shadowjig »

The naze is a great piece of hardware but baseflight doesn't seem to be moving forward with new features and enhancements.

I wanted to get some testimonials for users of cleanflight and find out if you like it or not.

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by nebbian »

Wow there's some really targeted anger here:
https://github.com/multiwii/baseflight

... if the developer viewing or updating the code is named "dominic clifton", the modified "hydraIRC limited-use source license" (http://www.hydrairc.com/content/developers) applies, as below:


I'm sure that there's some real politics going on behind the scenes here (but being new to the 32 bit scene I don't know what's going on).

Is Cleanflight in contravention of this license? Is there a thread that explains what that license issue is all about? Or is BaseFlight in contravention of the GPL V3 license by trying to restrict the license terms despite being based on a GPL project itself (Multiwii).

As a developer who is keen to get some code onto his new board, I'm tossing up between baseflight and cleanflight. I would also like to start modifying, improving and submitting code back to the main branch... which branch would you suggest?

Pierre_A
Posts: 35
Joined: Thu May 15, 2014 9:32 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by Pierre_A »

tungsten2k wrote:Is OSDSW (enable/disable OSD overlay) working for anyone else using CPPM receiver input on a minimosd (Witespy) board ?

-=dave


Hi Dave,
Did not really use the OSDSW up to now but wanted to try..
My config :
- MinimOSD (Witespy board and KVTeam sw 2.2) connected to telemetry port of Naze32 (Cleanflight version june 9)
- OSDsw defined as Aux2 in Cleanflight config.
I confirm that the OSDSW does not work (OSD overlay remains visible).
Can’t tell if this works with Baseflight but seems to work fine with Harakiri 2.5 : see post by hinkel at
[url]http://www.multiwii.com/forum/viewtopic.php?f=8&t=2918&sid=8f8faa7090697f0946a8a4a9a6f633b9&start=700
[/url]
PA

User avatar
Gaijin
Posts: 82
Joined: Sat Jan 14, 2012 8:00 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by Gaijin »

Dominic,

Very interested in your WS2812 RGS Led support, a question and a request if you don't mind

Question - what is the default state of these leds, If I apply 5v to the pins and no control signal will they light at all, I'd like to default them as my forward / aft orientation lights with turn signals battery warning etc as secondary functions

Request - Would you be willing to add the configuration to CLI or GUI rather than direct into the code, I'm not anywhere near as smart as you in that respect :ugeek:

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:Is Cleanflight in contravention of this license? Is there a thread that explains what that license issue is all about? Or is BaseFlight in contravention of the GPL V3 license by trying to restrict the license terms despite being based on a GPL project itself (Multiwii).


Baseflight is in contravention of the GPL v3. Timecop is attempting to troll me with it but I know better.

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

Pierre_A wrote:- OSDsw defined as Aux2 in Cleanflight config.
I confirm that the OSDSW does not work (OSD overlay remains visible).
Can’t tell if this works with Baseflight but seems to work fine with Harakiri 2.5 : see post by hinkel at
[url]http://www.multiwii.com/forum/viewtopic.php?f=8&t=2918&sid=8f8faa7090697f0946a8a4a9a6f633b9&start=700
[/url]
PA


Thanks for the feedback Pierre, can you raise an issue on the Cleanflight issue list? I'll look into it. It's probably broken in baseflight too since it's an area of code that I haven't touched.

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

Gaijin wrote:Dominic,

Very interested in your WS2812 RGS Led support, a question and a request if you don't mind

Question - what is the default state of these leds, If I apply 5v to the pins and no control signal will they light at all, I'd like to default them as my forward / aft orientation lights with turn signals battery warning etc as secondary functions

Request - Would you be willing to add the configuration to CLI or GUI rather than direct into the code, I'm not anywhere near as smart as you in that respect :ugeek:


I think that's answered in the documentation for the LEDs but I'll check it when i update the LED code next. But anyay, the default is for all the leds to be white during initialisation and then to show armed state, orientation, battery warning and indicators.

Since I just built a new quad that has 31 leds on it in a different layout there is futher motivation for me to finish the customisable LED strip code. I've really been loving flying my quad at night with the LEDs on, like this:



https://www.youtube.com/watch?v=P11V7jtoYgU

If you do not send a signal they will not light at all. If you remove the signal they will hold their last state/color.

Can you give me details on how many leds you are going to use and how you are planning on positioning the LEDs on the quad so that I can make sure what I code works for you too?

I think I already mentioned I will be making the LEDs configurable by CLI initially, and GUI later. This isn't difficult to do and shouldn't take long.

I also plan on adding some cool LED effects, just need to find time.

Some pictures of the new quad i just built with 31 LEDs is here: https://plus.google.com/112690974776939 ... HeTvQSCH5J

As you an see the LED pattern doesn't match the layout of the leds and needs fixing on this new quad. I will probably work on this tomorrow.

User avatar
Gaijin
Posts: 82
Joined: Sat Jan 14, 2012 8:00 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by Gaijin »

Some really clean building and really tight flying there, I haven't really built a quad small / agile enough to try flips yet and can't wait to finish my house stuff off and get back to it...

That ZMR Mini H is the same mini H frame I'm planning to use too, originally I had a goodluckbuy version but the arms and main plates are very thin (2mm and 1mm respectively and the standoffs are mostly 2mm) and I didn't think it would survive the abuse, I see you have built yours with the main frame hanging below the arms, any reason for that or just trying things out?

I picked up 10 of the individual Leds to experiment with and my (rough) plan was to use them in an X formation with 2 leds to the underside of each arm and a pair on the bottom of the main plate

With forward (Green) and rear (Red) switching to turn signals on the pairs on the arms and mode / status lights on the centre pair, I'm open to suggestions on the usage case and have a Naze32Pro or rev5 Naze32 for the FC, I haven't cracked the flashing method for the Pro just yet (any tips appreciated) so would you mind compiling the hex / DFU for me?

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:Is Cleanflight in contravention of this license? Is there a thread that explains what that license issue is all about? Or is BaseFlight in contravention of the GPL V3 license by trying to restrict the license terms despite being based on a GPL project itself (Multiwii).


Baseflight is in contravention of the GPL v3. Timecop is attempting to troll me with it but I know better.


Thanks Dominic!

I think I'm going to do all my development using CleanFlight as a starting point, rather than baseflight. I think my values as a developer align more closely with yours than with the developer of baseflight :-)

Pierre_A
Posts: 35
Joined: Thu May 15, 2014 9:32 am

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by Pierre_A »

dominicclifton wrote:
Pierre_A wrote:Thanks for the feedback Pierre, can you raise an issue on the Cleanflight issue list? I'll look into it. It's probably broken in baseflight too since it's an area of code that I haven't touched.


done, thks

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:I think I'm going to do all my development using CleanFlight as a starting point, rather than baseflight. I think my values as a developer align more closely with yours than with the developer of baseflight :-)


Awesome! What do you plan on adding/improving first? - looking forward to receiving pull requests.

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by dominicclifton »

I'm about to fly Cleanflight on my CC3D board - with WS2812 led's and updated PPM code:



https://www.youtube.com/watch?v=EViw4lBRa94

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by brm »

dominicclifton wrote:I'm about to fly Cleanflight on my CC3D board - with WS2812 led's and updated PPM code:
https://www.youtube.com/watch?v=EViw4lBRa94


ups, that explains some nasty situations i had when testing new functionality.
up to now i didn't trust frsky to much ... as i run occasionally into problems.

thanks for showing the problem!

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by timecop »

nebbian wrote:I think I'm going to do all my development using CleanFlight as a starting point, rather than baseflight. I think my values as a developer align more closely with yours than with the developer of baseflight :-)


so you're an unemployed java developer? Good, your contributions wouldn't be accepted into baseflight anyway.

asabird
Posts: 1
Joined: Sun Jul 27, 2014 3:30 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by asabird »

Are there someone working (or interested) in porting "Flysky RX" to the 32bits world?
Actually it works on Multiwii : http://www.rcgroups.com/forums/showthre ... st25399459 (from midelic)

The goal is to replace the standard receiver (PWM or PPM) by a lightweight and cheap RF module XL7105 which have SPI interface.
Your TX needs to be a compatible with : FS-TH9X or FS-CT6B.

Benefits are :
- Weight
- Better accuracy/stability as there is no conversion to PPM/PWM but only digital transmission.
- The statisfaction to know that your powerfull STM32 proc is doing one more thing .... and be little less in idle mode ... :)

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by Crashpilot1000 »

Hi!
Thanks Dominic for the ppsum hint! However I can not reproduce it on my gear.
My RC gear seems ancient but it is working so well I don't want to change it...
http://www.frsky-rc.com/product/pro.php?pro_id=100 (Using 8 channels in ppsum, I know: http://diydrones.com/profiles/blogs/why ... appointing but never managed to max out all channels at once in flight..)
http://www.frsky-rc.com/product/pro.php?pro_id=59
Attached to this: http://www.rcmaster.net/de-flysky-fs-th ... tAod7iYAjQ (but not bought there...)

Test setup: I monitored the first 4 channels Rll/Ptch/Yw/Thr (rcData[0..3])
The channels show no errors and are transmitted correctly and steady. Perhaps it's an issue with more than 8 channels?
Cheers Rob

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

Post by strips »

I find my self wanting to test Oneshot but really not wanting to replace (downgrade) my Naze at the moment. Could this be something for you Dominic?

http://www.rcgroups.com/forums/showthre ... p=29026012

viewtopic.php?f=23&t=1947&start=650#p46598

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

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by nebbian »

Is the documentation for Cleanflight up to date?

The reason I ask is that if you go to the command line parameters link on this page:
https://github.com/hydra/cleanflight/wiki

it talks about two pid_controller values, 0 and 1.

However in the code it references three different pid_controllers:

Code: Select all

void setPIDController(int type)
{
    switch (type) {
        case 0:
        default:
            pid_controller = pidMultiWii;
            break;
        case 1:
            pid_controller = pidRewrite;
            break;
        case 2:
            pid_controller = pidBaseflight;
    }
}


Am I looking in the right place for the cleanflight documentation?

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Cleanflight aka Multiwii port to STM32 F10x and F30x

Post by Crashpilot1000 »

Hi, just fixed the 18ms lost ppm sync problem for unflashable D4FR (depicted here: http://diydrones.com/profiles/blogs/why ... appointing). The problem is reproducible when maxing out 7 channels and using a little channel 8. I was able to reproduce it on the bench (Aux all max, Full throttle + Full Roll + Full Pitch and then a little yaw -> - BOOM sync lost, all channels floating around max, same effect on latest BF). That is more than unlikely to happen in real life however the fix is simple. I want to commit the change to your repo, shall I wait till you updated your ppm part? Or will it fix that as well? Do you need a before/after fix video?
Cheers Rob

Note: Even old D4FR might be flashable after some hardware slaughtering but who wants 27ms (37Hz) when you can have safe 50Hz without hassle?

EDIT: Whoopsie, you already committed the updated ppm part! Have to check how that works.
EDIT EDIT: I downloaded your last repo and crossed out the motor and stick config part to check the ppsum frsky 18ms behaviour. Your new ppm code just freezes the output in such situations (I guess validation fail = keep last values). Hmm.
BTW I don't understand that:

Code: Select all

Prior to this, on other boards (Naze32/Flip32+/Olimexino/etc) it was
observed that when using an 8 channel RX AUX5-8 would sometimes be set
due to bad PPM data.

How can I have Aux5-8 on 8ch RX? AETR Aux1 Aux2 Aux3 Aux4 = 8 ch.
Anyway I will try to find out what is going on.

EDIT EDIT EDIT: I did a video of the problem and the solution here: https://vimeo.com/101973730 (will be available in 30 min)

Post Reply