Baseflight aka multiwii port to stm32

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

@TC: Hi!
I seriously doubt, that you are interested in implementing the simple serial LCD stuff but in any case, here is the link to the sourcecode: http://fpv-treff.de/viewtopic.php?f=18& ... 460#p25302
Cheers Kraut Rob

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

simple serial LCD?
You mean, already working serial console?
Right.

cGiesen
Posts: 188
Joined: Wed Jul 18, 2012 7:53 am
Location: Bochum, Germany

Baseflight aka multiwii port to stm32

Post by cGiesen »

@tc
You can edit settings with you RX and see the result on the Display. There is a video of that in the thread too

http://www.youtube.com/watch?feature=player_embedded&v=1A5eGQ85y30

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Baseflight aka multiwii port to stm32

Post by mr.sneezy »

@ Crashpilot1000

Hey Rob, saw a video of a 'default PID test' on the German FPV thread. Looked like it was locked in position as well as anyone could ever want.
If you have time could you give us a quick update of what the status is of your code. I did the Google translate thing on the German site, but it's not good to read afterwards.
Cheers,
Martin

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

@mr.sneezy: Thank you very much for your interest. I think the ins/gps Poshold part is done. The failsafepart has seen great improvement. I am still struggeling with a faster RTL but i think i fixed it (will test tomorrow). If you are using harakiri 9/10beta you can increase the RTL speed by increasing the nav_speed_min and nav_speed_max for now. The circle mode (with nose pointing inside) is making progress as well.
Greetings
Rob

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Baseflight aka multiwii port to stm32

Post by mr.sneezy »

@Crashpilot1000

Hi Rob, I tried to PM you from here a couple of questions about Harakiri, I think unsuccessfully. Do you have PM blocked ?

Martin

PS. Been very quiet generally on this thread lately. I guess the Northern hemisphere is on summer holidays.

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

well, everything works and there's nothing to complain about :)

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Baseflight aka multiwii port to stm32

Post by felixrising »

So we have PH, RTH and Autoland working? Also as part of Failsafe? Awesome :p

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

^ Go get a fucking naza if you can't fly ^
especially autoland, rofl.
that garbage will make it into baseflight over my dead fucking body.

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Baseflight aka multiwii port to stm32

Post by Gimbal »

hm, must be missing something, but how do i calibrate the esc ?

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Either the usual way w/tx or you can gang-calibrate them with "mincommand".
If it isn't clearly obvious to you how to do the latter, don't do it.

jgrouse
Posts: 5
Joined: Thu Jun 14, 2012 12:20 am

Re: Baseflight aka multiwii port to stm32

Post by jgrouse »

Can someone point me to a link to download the compiled Harakiri10PublicBeta hex file? Or is it still not generally available yet?
I've gone through the latest posts here and on the German site looking for it. Also could not spot it on the GitHub site.
I'll test my new CRIUS CN-06 GPS on the latest BF code for now but after seeing a video of a quad using Harakiri10PublicBeta sitting in the air like a $2000 DJI control board I just have to give it a go.

cGiesen
Posts: 188
Joined: Wed Jul 18, 2012 7:53 am
Location: Bochum, Germany

Re: Baseflight aka multiwii port to stm32

Post by cGiesen »

In the first post, there are a list of different versions.
http://fpv-treff.de/viewtopic.php?f=18&t=1368

Thats the actuall best version:
http://fpv-treff.de/download/file.php?id=3895

Thats the lates version:
http://fpv-treff.de/download/file.php?id=3899
Here we have now different LED functions.
Perhaps this:
http://www.youtube.com/watch?feature=player_embedded&v=6KdIzSjNYgY

There is some english docu too!

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Baseflight aka multiwii port to stm32

Post by Gimbal »

Tnx cG, but witch GUI for Harakiri10, Naze32 AIO gives stange reading in CLI

cGiesen
Posts: 188
Joined: Wed Jul 18, 2012 7:53 am
Location: Bochum, Germany

Re: Baseflight aka multiwii port to stm32

Post by cGiesen »

There is only a windows version!
http://fpv-treff.de/viewtopic.php?f=18&t=1504

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Baseflight aka multiwii port to stm32

Post by Gimbal »

Tnx cG got it

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Baseflight aka multiwii port to stm32

Post by Gimbal »

Hi, can I use #define USE_MSP_WP and #define GPS_FROM_OSD with Harakiri10

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

Re: Baseflight aka multiwii port to stm32

Post by fiendie »

Here is a thought for you all you Harakiri people:
Why not create a separate thread and keep this one here clean and strictly on topic?

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Baseflight aka multiwii port to stm32

Post by Gimbal »

Well that's really cG's call not my'n, don't se the problem thou :ugeek:

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Baseflight aka multiwii port to stm32

Post by felixrising »

timecop wrote:^ Go get a fucking naza if you can't fly ^
especially autoland, rofl.
that garbage will make it into baseflight over my dead fucking body.


Lol, okay... :j Some of us geeks like flicking switches and watching things happen instead, certainly not everyone's thing... It's a neat multiwii add-on, sure beats a fixed throttle descent on failsafe and is a nice safety feature for learning FPV.

fwiw, I do not own a na$a nor ever intend to. full stop.

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

Hehe.
I am no programmer but trying to push things ahead makes some people somehow angry and upset. I don't exactly comprehend why but that's ok. Because upset people will react and perhaps some of them have the ability to make things actually better instead of just sitting around. This could lead to something good. I really like the idea, meanwhile they may keep calling me names in irc behind my back but in the end there might be a result that is beneficial for all of us and that would be a "mission accomplished" for me.


Cheers
Kraut Rob

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Baseflight aka multiwii port to stm32

Post by Gimbal »

Hi C1k, like you're work with Baseflight/Harakiri, Q: my setup are Y6 is it possible with GIMBAL_MIXTILT if so what output.

Anders

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Crashpilot1000 wrote:Hehe.
I am no programmer but trying to push things ahead makes some people somehow angry and upset. I don't exactly comprehend why but that's ok. Because upset people will react and perhaps some of them have the ability to make things actually better instead of just sitting around. This could lead to something good. I really like the idea, meanwhile they may keep calling me names in irc behind my back but in the end there might be a result that is beneficial for all of us and that would be a "mission accomplished" for me.


Cheers
Kraut Rob


It doesn't take a lot of time to run your code through "indent -kr -nut -l400" before committing. Really.

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Gimbal wrote:Hi C1k, like you're work with Baseflight/Harakiri, Q: my setup are Y6 is it possible with GIMBAL_MIXTILT if so what output.

Anders

Yes, with PPM receiver.

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Baseflight aka multiwii port to stm32

Post by mr.sneezy »

fiendie wrote:Here is a thought for you all you Harakiri people:
Why not create a separate thread and keep this one here clean and strictly on topic?
+1 on that. I feel a bit like I'm hijacking TC's thread when I ask about Harakiri stuff.
(and yes I have a few questions to ask if a Harakiri thread gets going).
Martin

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Baseflight aka multiwii port to stm32

Post by Gimbal »

timecop wrote:
Gimbal wrote:Hi C1k, like you're work with Baseflight/Harakiri, Q: my setup are Y6 is it possible with GIMBAL_MIXTILT if so what output.

Anders

Yes, with PPM receiver.


Ah yes, Naze32 manual, well I got the new Frsky Delta8 ppm out, works great with Futaba T8J

cGiesen
Posts: 188
Joined: Wed Jul 18, 2012 7:53 am
Location: Bochum, Germany

Re: Baseflight aka multiwii port to stm32

Post by cGiesen »

timecop wrote:
Crashpilot1000 wrote:Hehe.
I am no programmer but trying to push things ahead makes some people somehow angry and upset. I don't exactly comprehend why but that's ok. Because upset people will react and perhaps some of them have the ability to make things actually better instead of just sitting around. This could lead to something good. I really like the idea, meanwhile they may keep calling me names in irc behind my back but in the end there might be a result that is beneficial for all of us and that would be a "mission accomplished" for me.


Cheers
Kraut Rob


It doesn't take a lot of time to run your code through "indent -kr -nut -l400" before committing. Really.


TC is speaking in insider language! For the guys they don't know what he mean:
http://gnuwin32.sourceforge.net/packages/indent.htm

And yes this is helpfull!

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Baseflight aka multiwii port to stm32

Post by Gimbal »

Hi, can I find a map over cli flags and other settings

nicog
Posts: 88
Joined: Tue Aug 21, 2012 2:21 pm

Re: Baseflight aka multiwii port to stm32

Post by nicog »

read the code.

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Baseflight aka multiwii port to stm32

Post by Gimbal »

well I did, it only took me an hour to find out the flag for mix_tilt, unlike you I can't memorise the hole code, but then i'm a bit stupid(if I wasn't I'd by one Nasa, quit fiddling with MW, BF, Quanton, Phonix and UAVX) I'm even have a hard time setting up Eclipce toolchain and linker

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

most stuff is in mw.h, with comments.
rest of stuff is in board.h
not very difficult.

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Baseflight aka multiwii port to stm32

Post by Gimbal »

tnx TC, will take a look got som more time now, going abroad again so i will have som time during nights

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Baseflight aka multiwii port to stm32

Post by mr.sneezy »

Gimbal wrote:tnx TC, will take a look got som more time now, going abroad again so i will have som time during nights
You hobby time sounds a bit like mine, broken into small chunks between trips away and other commitments, makes absorbing the changing technical stuff a challenge...

User avatar
mr.sneezy
Posts: 109
Joined: Sat Jan 12, 2013 12:00 pm
Location: Adelaide, Australia

Re: Baseflight aka multiwii port to stm32

Post by mr.sneezy »

cGiesen wrote:In the first post, there are a list of different versions.

Thats the actuall best version:
http://fpv-treff.de/download/file.php?id=3895

Hi, the one above referred to as the 'actual best version', is that the Harakiri10Beta, or another ?
(I see Harakiri10Beta4 in the video link you posted for us).

Thanks,
Martin

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Baseflight aka multiwii port to stm32

Post by Gimbal »

exactly mr.s, having a hard time to keep up, things doesn't get better by broken hardware on arrivel when you have like three weeks window

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Baseflight aka multiwii port to stm32

Post by felixrising »

I finally got around to skimming through the thread and taking a proper look at harakiri/hinkel4 stuff in the Naze32 CodeEcke - brushing off my super rusty German too!. Vielendank Crashpilot1000 for your posts, a bit more welcoming for my perhaps naive first posts in here :j Perhaps this thread should be renamed because it's more about the tweaks and addons to Baseflight than Baseflight itself :p But then so often threads take on a life of their own.

I come very late to the question about the name Harakiri, I'd have suggested Mushi-ishi or MushiMushi, but only to throw in some childish multilingual humour.

I'll get my FlipFPV setup in the coming days and take the Naze32 for a few runs on stock Baseflight before trying out some Harakiri/Henkel4 as a panic button. Will report back. Any special tips I won't easily find regarding setting up my uBlox CN-06v2 gps on this board? I don't have a full range PPM Rx but in PWM in mode I still get TYPR+2 Aux anyway right? I love the CLI for baseflight, as a Linux guy the CLI and me are good friends.

TC, with all of that 90% idle STM32, maybe you want to implement Perl scripting and beat OpenPilot Revo to the punch ;j

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: Baseflight aka multiwii port to stm32

Post by mbrak »

mr.sneezy wrote:
cGiesen wrote:In the first post, there are a list of different versions.

Thats the actuall best version:
http://fpv-treff.de/download/file.php?id=3895

Hi, the one above referred to as the 'actual best version', is that the Harakiri10Beta, or another ?
(I see Harakiri10Beta4 in the video link you posted for us).

Thanks,
Martin



hi martin

the 10b4 is currently the public beta with the best tuned pids for gps. as you can see in my video :) the pids are standart.
rob is currently cooking a new version (maybe 10b6 or 10b7 dont know) with many new features in gps modes.

br michael b.

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Baseflight aka multiwii port to stm32

Post by felixrising »

And there we have it... Harakiri thread :)

http://www.multiwii.com/forum/viewtopic.php?f=23&t=3524

kol
Posts: 5
Joined: Fri Jan 04, 2013 6:11 am

Re: Baseflight aka multiwii port to stm32

Post by kol »

I made a test flight on the quadrocopter on firmware of r303 changest with stock settings in ANGLE, HORIZON, BARO modes. Works fine for me.
And made my first flip on this firmware :-)

Timecop, great work!

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

Hi, Timecop!

I re-arranged the current mag calibration in sensors.c . Besides this i integrated px4mu "sphere_fit_least_squares" method to calculate the mag bias. The bias/offsets are a little bit better in my copter now. Perhaps other setups could profit more from this. I also introduced a cfg variable called "cfg.mag_oldcalib" to choose wich calibrationstyle you want (cfg.mag_oldcalib = 1 selects the old style) so there is always a fallback to the original. Besides this i struggled with dynamic memory allocation (malloc) and an compiler error while trying to allocate less than 6kB. It's something with my none-eabi stuff, so i also included that version as well, just in case you find it useful. Code formated with eclipse and put together with arduino ide :).
Perhaps this is somehow useful.

EDIT: This code should be no problem on bigger arduinos as well, because just the calibration is more intense. There is no difference in runtime afterwards.

Cheers
Rob
Attachments
ExtendedMagCalibration.zip
(9.76 KiB) Downloaded 123 times

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

This is cool, but, what is the benefit of running this calculation on each power up? I don't imagine it would change.

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

No, it's just done on calibration. The magscale is done on startup but the bias/offset is done through calibration. The actual offsets are done in original mwii just by getting min/max and deviding them by 2. This sphere sh*t is more accurate than the div by 2.
Cheers Rob

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Baseflight aka multiwii port to stm32

Post by felixrising »

Hi, I see there is a "feature pass" for ESC calibration in Harakiri, but is there an equivalent on Baseflight? If so, what version implements it? I'm trying to avoid calibrating 6 ESCs individually..

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

none of them, and it will never be in baseflight.
you can calibrate escs using mincommand, if it isn't immediately obvious how, do NOT even attempt it.

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

@timecop: Yeah i think i got the idea now. While finishing full sonar support (BTW: not copied code from around here or arducopter etc), i have a question: Is the Trigger/Echo Sonarstuff obligatory for ppsum RX? - I ask because sonar with the option "usePWM56" uses motorchannels. Is it safe to open up that option for non - ppsum RX - setups, or are there incompatibilities expected?
So long
Rob

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Um, you can probably just not enable the 2 pins needed for it as PWM inputs/whatnot, it will be same thing as GPS + non-PPM, you will lose 2 channels. Keep in mind you need 5V tolerant pins for this AND you better not ever have sonar powered before FC or else instant smoke.

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

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

@Timecop: Sorry for my unprecise question. "usePWM56" refers to the PWM output the user will see (PB8/9) in the PWM1-14 nomenclature they are actually PWM13/14 and 5V tolerant. I think it is safe to make it selectable on non - ppsum setups (currently just ppsum), but i just wanted to ask you in advance because the pwm assigning part in pwm.c is rather complicated.
Greetings
Rob

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

its not complicated at all, skip that map and it can be used in either ppm or pwm mode.

User avatar
IceWind
Posts: 115
Joined: Fri Mar 25, 2011 2:11 am
Contact:

Re: Baseflight aka multiwii port to stm32

Post by IceWind »

I know someone will bitch about this but...

I have a old FreeFlight board that was getting dust and I decided to give it some use, I loaded the latest FW that was able to work with it and it's all working fine except for the following.
I added a external HMC5883, the MAG is ok as I tested it first directly with a Arduino and all 3 axis were responding correctly but when used with this code on the Baseflight GUI only one axis reads anything (1) the one that by default is assigned to yaw.
The other two (Roll & Pitch) either always show 0 or after calibrating show some random number but never change afterwards when I move the board.

The FW I have loaded is from March 15 2013, any idea what might be? Am I using a broken version? I've checked the commits after this one but found none about the HMC5883 or at least that weren't related to the update of the code for Mwc 2.2.

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

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Haha. No, its fine.
There hasn't been any mag code changes for a while, the only thing I can think of is maybe pullups on mag breakout are doing something weird to i2c bus, or something. What about breakout voltage regulator/i2c levels? I hope it's not 5V shifted for tarduino, right?

Post Reply