Page 3 of 21

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 06, 2013 7:56 am
by Crashpilot1000
Hi!

I did another Version. This time it is called 3c because the althold is not altered from the previous version. I put the whole mwii main PID controller to more precise float variables and introduced a proper "delta time". It flies so well and locks so good on my rig i just want to make you take part. Take your normal PIDs and take it for a spin. It will fly like you will expect. Than add "1" to your normal Nick/Roll P Pids and you will see what i mean. LOL STM does that for free! It flies like on steroids. Besides that i included the Spektrum fix so it is based on r240. This flies so ridiculously good i have to post it, sorry :).
Just flies/locks better, Althold unchanged good :).

Cheers
Kraut Rob

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 06, 2013 8:18 am
by jy0933
does anyone know if the MMC10 is the rebranded FF?

thx

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 06, 2013 8:25 am
by timecop
jy0933 wrote:does anyone know if the MMC10 is the rebranded FF?

thx


I never figured that out since they became too expensive.
From what others said in FF thread on RCG, it is same/mostly same, but schematic for this stuff never appeared, so I didn't bother investigating further. It's still stm32 so its probably just a matter of mapping correct PWM pins and you can use it.

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 06, 2013 4:33 pm
by a944734
Gimbal wrote:tnx TC, still in MW :-)

Naze32AIO is really cool, just what I'm looking for, next on my wish list is sbus, it's not possible to get cppm from futaba r2008 and i would like to access the other port's and I'm kind a stuck with futaba but if anybody know a small suitcase friendly 8ch cppm system I'm all ear


I am using a FRSky TFR4-B receiver with my Futaba T12FG. Using a single CPPM connection cable - working just fine

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 06, 2013 5:46 pm
by Gimbal
Well god for you, FG uses FASST, unfortunately t8j has a different system S-FHSS so they are not compatible
and there is no chance to get CPPM from that system, any way thnx for the tip.
Have looked at S-BUS to PPM converter with 328p(do have working code and layout)
but system on system is not appealing, has an working progress with S-BUS implementation to
Baseflight, just need to get my heading right(started yesterday with Baseflight so i got some homework to do)

Anders

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 06, 2013 5:54 pm
by Gimbal
Hi except from Afroflight32 i also got one Abusemark STM32 dev board, tried to get it to work as a FC but after successful flashing Baseflight.hex i got blinking green led but no communication with Naze32 AIO, what did i miss ?

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 06, 2013 5:58 pm
by timecop
Did you hookup a random sensor board to I2C, add pullups etc? devboard has no sensors on it, and (repeatedly blinking) red/green sequence = panic code for no gyro detected.

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 06, 2013 6:05 pm
by Gimbal
Nop just did a dry bench test, the green blink is apr 1sec on off, will try with a GY86, think it has pullups

Re: Baseflight aka multiwii port to stm32

Posted: Mon Jan 07, 2013 8:21 pm
by Crashpilot1000
Hi !

I did a little improvement of the althold. When descending it will not do an initial hight gain anymore. Just a small update. "Harakiri04" has the 03c changes as well. Feel free to test.

Cheers
Kraut Rob

Re: Baseflight aka multiwii port to stm32

Posted: Tue Jan 08, 2013 8:23 pm
by Benzel
Hi, still doing some tests to get the minimosd working with my naze32 board. Almost everything works now fine, GPS, PID, Altitude and artificial horizon.
But if i arm the motors the osd freezes if i unarm everything works again. I tested this also with the MW-WinGUI all sensors are read correct but if you arm the board everything stops?

Does someone use the FrSKY Telemetry adapter that TC sells, it should have the same problem if you arm the motors?

Re: Baseflight aka multiwii port to stm32

Posted: Tue Jan 08, 2013 8:54 pm
by arne
Disable the "telemetry" feature, then the OSD should work when the copter is armed.

Re: Baseflight aka multiwii port to stm32

Posted: Tue Jan 08, 2013 9:39 pm
by Benzel
arne wrote:Disable the "telemetry" feature, then the OSD should work when the copter is armed.


Thanks, can't believe it was that simple :D I spent hours going through the osd code :roll:.

Re: Baseflight aka multiwii port to stm32

Posted: Wed Jan 09, 2013 12:47 am
by Crashpilot1000
Sorry for my spam but i did a further improvement to Harakiri04 so it is called Harakiri04b!
Please read this for installation, tuning, already preset parameters and the "logic" of althold: viewtopic.php?f=23&t=1947&start=110#p28742
I added an nice autolanding feature that is the difference between 04 and 04b.
Function:
You fly in baromode and pull the Throttlestick to the lowest position will engage Autolanding in several automatic steps.
1. Copter will hold hight for 2 seconds
2. Copter will descent with approx 40cm/sec
3. After touchdown copter will disarm itself when motorspeed is on idle for 3 seconds (you will have to re-arm to launch again)
You can stop autolanding by putting the throttlestick up or by turning off althold.
You can use this as an failsave landing just set your rx to the following on signal loss:
Baro & Angle mode on, Nick/Roll/Yaw to middle, Throttlestick down.
Have fun testing :) :) !

Cheers
Kraut Rob

Re: Baseflight aka multiwii port to stm32

Posted: Sat Jan 12, 2013 1:48 pm
by mr.sneezy
Hi Guys, this is my first post here on MultiWii forum.

I need a little info to smooth my path. I've recently loaded up Baseflight firmware on a FreeFlight FCB (which is like a Nase32 Rev2 I think). Converting to Baseflight was fairly straight forward, no real issues encountered.
The board has a BMP085 baro sensor added and I expect I'll be adding a mag sensor very soon (as an aside, I notice Bosch now have the BMP280 baro sensor that is more sensitive than the old one).
Currently I dabbling with a GPS module fitted to the AUX serial input on the unused Ch3/Ch4 servo input pins (RX is CPPM).

A couple of questions about Baseflight, MultiWii GUI and my board...

The GPS is a Ftec FMP04 which uses a MediaTek chipset. The default baudrate seems to be 38400, and I matched Baseflight via CLI and it works sort of. MultiWiiConfig GUI shows the GPS is giving Lat Lon and Alt and SV data. However the GPS indicator box on the GUI does not light up green like the ACC and BARO sensors.
I gather it should show green (active), can anyone suggest a reason or remedy ?

I notice on various posts here and on the Nase32 board thread too that there are references to a CLI setting called 'gps_type =' with values of 0-2. Odd thing is that on my Baseflight FW I can't see a setting for that parameter listed. I only have 'gps_baudrate =' (which I set to 38400). I used the Aftroflight32 Baseflight version 20120726 which I assumed was fairly current. Can someone let me know what the story is in regards to that setting or if I need a different firmware version or fork ?

Last query is about Mag sensors and GPS Return to Home function. I assume that I'd need a Mag sensor fitted for that to work (as GPS is unaware of heading while stationary). Would I be correct ?

Thanks,
Martin

GPS link
http://www.f-tech.com.tw/modules/publis ... p?itemid=5

Re: Baseflight aka multiwii port to stm32

Posted: Sat Jan 12, 2013 1:51 pm
by timecop
You need to download latest svn baseflight build (r249 or 250 of this writing) from google code. the firmware posted for download from 201207 is really old). as for gps, good luck! and yes, if it finds gps talking within first second or so, the gps box should light up

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 13, 2013 3:21 am
by mr.sneezy
Thanks I'm not familiar with the svn system so I'll go and learn up.

Yes I gather you have no interest in GPS control, so I'll ask others about that stuff...

Cheers,
Martin

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 13, 2013 6:21 am
by mr.sneezy
Loaded r250 OK. Found the gps_type setting now listed via CLI.

I found these notes in github about gps_type
where X=0 if NMEA (no special config), X=1 if UBX (enters ubx binary mode), X=2 if MTK (sets up MTK for 5Hz operation).

Two questions.
Is the github the best place to go to find info about changes between versions and get specific info about Baseflight ?

I noticed that 3 is also listed as value for gps_type in the set list. Is there actually there a valid gps_type = 3 ?

Cheers,
Martin

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 13, 2013 10:11 am
by fiendie
mr.sneezy wrote:Loaded r250 OK. Found the gps_type setting now listed via CLI.

I found these notes in github about gps_type
where X=0 if NMEA (no special config), X=1 if UBX (enters ubx binary mode), X=2 if MTK (sets up MTK for 5Hz operation).

Two questions.
Is the github the best place to go to find info about changes between versions and get specific info about Baseflight ?

I noticed that 3 is also listed as value for gps_type in the set list. Is there actually there a valid gps_type = 3 ?

Cheers,
Martin


Hi Martin,

the github repo is a 1:1 mirror of the SVN repo. Mr. timecop here still refuses to move over ;)
Right now there are only those 3 config options if you take a look at the GPS init method: https://github.com/multiwii/baseflight/blob/upstream/src/gps.c#L48

If you still have problems/questions I suggest you swing by #multiwii on FreeNode and bug timecop yourself. But I'm sure other folks there will be able to help, too ;)

-- Andy

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 13, 2013 12:09 pm
by brm
what did you change?
tc has not much time at the moment.
this is the reason he is quite silent.
are you doing gps related things?
when yes how to get it?

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 13, 2013 1:15 pm
by mr.sneezy
fiendie wrote:
Hi Martin,

the github repo is a 1:1 mirror of the SVN repo. Mr. timecop here still refuses to move over ;)
Right now there are only those 3 config options if you take a look at the GPS init method: https://github.com/multiwii/baseflight/blob/upstream/src/gps.c#L48

If you still have problems/questions I suggest you swing by #multiwii on FreeNode and bug timecop yourself. But I'm sure other folks there will be able to help, too ;)

-- Andy

Thanks Andy. Not sure what FreeNode is :)
I'd rather not bug TC anyway as GPS is not his interest, but I'm happy that guys here who do use BaseFlight with GPS can chime in.

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 13, 2013 1:24 pm
by mr.sneezy
brm wrote:what did you change?
tc has not much time at the moment.
this is the reason he is quite silent.
are you doing gps related things?
when yes how to get it?


Not sure if the ? was directed at me.

I changed the gps_type in CLI to type 2 for MTK. I verified that the GPS output rate changed from 10Hz to 5Hz, so I guess the GPS is using MTK protocol.
Not sure if 5Hz is better (less serial load perhaps) but since the change to r250 and the gps_type change the GPS indicator box on MultiWii GUI is lighting up green right away now.

My desire for GPS on this Quad is mainly for 'Return To Home' when I loose orientation while flying it. Getting it to fly a course of two or more waypoints would be good eventually for some videoing tasks.
Currently I'm happy to have debugged a switch to Baseflight this weekend and debugged attaching a GPS module I had laying around doing nothing better.

I've not actually flown it today with r250, but it was very nice on the previous old version I had before (July version I think).

Regards,
Martin

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 13, 2013 3:51 pm
by fiendie
mr.sneezy wrote:Thanks Andy. Not sure what FreeNode is :)
I'd rather not bug TC anyway as GPS is not his interest, but I'm happy that guys here who do use BaseFlight with GPS can chime in.

FreeNode is an IRC (Internet Relay Chat) server where many open source projects maintain channels (chat rooms).
You can join by either using a dedicated client like XChat or mIRC, or by using their web chat: http://webchat.freenode.net/

And you can bug him all day, he loves that ;P

-- Andy

Re: Baseflight aka multiwii port to stm32

Posted: Sun Jan 13, 2013 4:07 pm
by brm
http://youtu.be/tv73kWezRwc
my quad flies not that bad - even with bended motorshafts and the gopro is just taped to the frame.
no vibration absorber inbetween.
should also be a good base for my fpv trials...

yes, the next thing is a safe return to home function.

Re: Baseflight aka multiwii port to stm32

Posted: Tue Jan 15, 2013 1:48 pm
by mr.sneezy
brm wrote:yes, the next thing is a safe return to home function.
My own aspirations of eventual RTH took a dive today. Powered up the quad and GPS tonight, and no output from the GPS at all. Power is good, data wires fine. I wonder if the firmware in the FMP04 (MTK 3329) is stuffed. Anyone had that happen ?

MTK GPS firmware

Posted: Mon Jan 21, 2013 2:35 pm
by mr.sneezy
Guys, I resurrected the FMP04 GPS module (MTK MT3329). I opened up the RF shield and had a poke around. Turns out the battery is stone dead, or at least very nearly at 0.1V on it. I took a punt and shorted it out completely for a few seconds then applied power to the GPS to see if it had any change on the battery voltage (like charging). Nope, no change, but then I noticed the current to the module was pulsing like it used to, and yep now it's sending data again.

So, looks like I need to graft on a 3V lithium cell to restore the battery backup, and being dead or mostly dead may have stopped it working or at least corrupted some settings...
Martin

AW: Baseflight aka multiwii port to stm32

Posted: Mon Jan 21, 2013 7:03 pm
by Lapino
Hi TC, is there some kind of current consumption estimation implemented for the naze? On arduino there was powermeter but I didn't see this option in the cli or manual ;)
Thanks in advance

Re: Baseflight aka multiwii port to stm32

Posted: Tue Jan 22, 2013 7:48 am
by timecop
There isn't, as there's no reasonable way to calculate that just based on motors spinning.
A feature returning random numbers would make more sense than whatever "poweremeter" is implemented in current 8bit multiwii.

AW: Baseflight aka multiwii port to stm32

Posted: Tue Jan 22, 2013 8:33 am
by Lapino
But there's also the option to add a current sensor ;)
Could vbat be modified to do so? Current sensors have voltage output in correspondence with current used ...or am I wrong with that?

Re: Baseflight aka multiwii port to stm32

Posted: Tue Jan 22, 2013 8:36 am
by timecop
There is no reasonable way to add a current sensor, so no.

AW: Baseflight aka multiwii port to stm32

Posted: Tue Jan 22, 2013 12:46 pm
by Lapino
Ok, thank you ;)

Re: Baseflight aka multiwii port to stm32

Posted: Wed Jan 30, 2013 9:33 am
by gena_g
Tell me please. As the firmware r260 mode triŅoptera can include Gimbal (servo_tilt).

Re: Baseflight aka multiwii port to stm32

Posted: Wed Jan 30, 2013 9:40 am
by timecop
Not unless you want to use PPM input and change driver to allow more servos (well, actually, change should be minimal, but whatevers).
Too much effort otherwise.

Re: Baseflight aka multiwii port to stm32

Posted: Wed Jan 30, 2013 10:02 am
by gena_g
I use the PPM-sum. And you can adjust the gimbal with cmix . The board free PWM5-PWM8. They can be used for Gimbal

Re: Baseflight aka multiwii port to stm32

Posted: Wed Jan 30, 2013 10:12 am
by timecop
Right.
Feel free to contribute a patch that makes use of additionally available servos in that mode.
Its certainly doable.

Re: Baseflight aka multiwii port to stm32

Posted: Wed Jan 30, 2013 9:20 pm
by whakahere
I am having a hell of a time find the looptime variable. I'm using the lastest version of baseflight and the naze32 android app. I thought it would be under sets in the cli but I can't find it in there.

I want to improve the level of my quad and from what I understand I need to increase looptime. Is it under a different name or in a different location in the app?

AW: Baseflight aka multiwii port to stm32

Posted: Wed Jan 30, 2013 10:13 pm
by Lapino
Looptime should be in the set accessible via cli ;)
Just have a closer look at it...

Re: Baseflight aka multiwii port to stm32

Posted: Wed Jan 30, 2013 10:27 pm
by whakahere
I know it can be changed by the cli ... If I could plug in my board but I built my current quad with the board sealed within the body (it's a battle style, all weather quad). This means I can't plug it in by usb. I do have access through bluetooth but for the life of me I have no idea how to access that through a mac. So I was hoping since all functions were meant to be in the app I would do all my updating through that. (no need to add to the firmware as I just need rate and level mode).

Of course I updated the lastest baseflight before putting it in.

Re: Baseflight aka multiwii port to stm32

Posted: Thu Jan 31, 2013 11:53 am
by Crashpilot1000
Hi!
Currently i am implementing the new eos bandi code into my nazeproject. Due to my limited c coding abilities, i am experiencing severe problems with the new leadfilter and its' "class" definition. I always get compile errors with the class definition of the mwii gps code (http://code.google.com/p/multiwii/sourc ... 321&r=1321) what is the secret?
Cheers
Kraut Rob

Re: Baseflight aka multiwii port to stm32

Posted: Thu Jan 31, 2013 5:29 pm
by timecop
uh, wow, why the fuck would they go back to class-based C++ failcode...
Well, just rewrite the class garbage in C and problem solved.

Re: Baseflight aka multiwii port to stm32

Posted: Thu Jan 31, 2013 5:48 pm
by Crashpilot1000
Hahaha actually it is arducopter gps leadfilter class "failcode" LOL !
I am too stupid to do that but i will try :)

Re: Baseflight aka multiwii port to stm32

Posted: Fri Feb 01, 2013 5:45 am
by timecop
i.e. class Crap { int foo; int bar; void trash(); void param(int lol); }
rewrite as
typedef struct crapStruct { int foo; int bar; } crapStruct;

crapStruct c_static_data;
c_crap_ctor(crapStruct *this) { /* init stuff */ this->foo = 42; this->bar = 10; }
c_crap_trash(crapStruct *this) { /* do crap */ print(this->foo); }
c_crap_params(crapStruct *this, int lol) { /* do stuff */ this->foo += lol; }

then use like
c_crap_ctor(&c_static_data);
c_crap_trash(&c_static_data);
c_crap_params(&c_static_data, 133);
etc.

Re: Baseflight aka multiwii port to stm32

Posted: Sun Feb 03, 2013 11:38 pm
by Crashpilot1000
@Timecop: Thank you very much for your info!!! I haven't looked into this subject already but meanwhile i improved BF very much.

- Althold relative to throttlestick middle with Autoland (put thr stick completely down in althold) and Disarm after Landing
- RTH with Autoland and minimal hight for Return feature
- Showing Satnumbers with red LED Blinkcode. So you know how many Sats you have while Arming (setting Homepos)
- PosHold Override. Pos hold is only engaged when you let go the stick, so you can fly around and PH is engaged. PH only possible with 7 Sats to prevent flyaway
- Failsafe: RTL and Autoland (if Baro&GPS) or just Autoland (no GPS but Baro) or the old crap (no GPS no Baro) or RTL and old crap if only GPS
- Updated/refreshed GPS code. Added binary protocol MTK16/MTK19, improved initialization (with 10sec timeout). Replaced moving average with own Spikefilter. Own MTK binary parser.
- Improved Main Pid controller with floats and dT and PT1 Element, flies more stable, you can increase roll/pitch P now.
- ESC Calibration function "feature pass" (disable for flight "feature -pass") does a Passthrough of thr channel to all esc according to copter config (default QuadX). You can Calibrate/config all your soldered ESC at once now.
The documentation is currently only available in Kraut :) but here is the link: http://fpv-community.de/showthread.php? ... post284706
I attach the files here as well, so you don't have to sign up, if you want to take a look.
Perhaps there is some useful stuff for your upcoming releases in it.

Cheers
Kraut Rob

AW: Baseflight aka multiwii port to stm32

Posted: Sun Feb 03, 2013 11:54 pm
by Lapino
Sounds nice ;)
Did anyone test it yet?
I would if I could :(

Re: Baseflight aka multiwii port to stm32

Posted: Mon Feb 04, 2013 12:04 am
by timecop
Crashpilot1000 - you mean GPS works? Shock and horror.

Re: Baseflight aka multiwii port to stm32

Posted: Mon Feb 04, 2013 12:12 am
by Crashpilot1000
He says it works: http://fpv-community.de/showthread.php? ... post283741

I am currently grounded by weather and hardware (motor)..

Cheers
Kraut Rob

Re: Baseflight aka multiwii port to stm32

Posted: Mon Feb 04, 2013 11:50 am
by Gimbal
I'm a bit confused, witch software version shall i use and what GUI

Re: Baseflight aka multiwii port to stm32

Posted: Mon Feb 04, 2013 11:52 am
by timecop
First post of thread.

Re: Baseflight aka multiwii port to stm32

Posted: Mon Feb 04, 2013 1:29 pm
by Gimbal
Well i hate to brake it to you Timecop, but you're not the only one contributing to this thread.
Cp witch GUI can i use together with Harakiri6c.

have a few MTK laying around i'd like to test

KR Anders

Re: Baseflight aka multiwii port to stm32

Posted: Mon Feb 04, 2013 1:33 pm
by timecop
Since it looks like stuff copied from -dev multiwii, I would assume whatever -dev gui is on multiwii code page.
it takes about 15 seconds to try and find out.

Re: Baseflight aka multiwii port to stm32

Posted: Mon Feb 04, 2013 1:46 pm
by Gimbal
for the latest MW dev (from 12?? something) Win -GUI can not be used, so ther is a few diferent GIU's, shure i can make som trail n error but why not ask ? btw have em all.