Baseflight aka multiwii port to stm32
-
- Posts: 48
- Joined: Sat Jun 22, 2013 2:37 am
Re: Baseflight aka multiwii port to stm32
rortega, I think arducopter 'sensor fusion' has a lot to do with Harakiri's excellent altitude and position hold performance. Harakri may drift in strong wind because the GPS is not very active with the default settings; I think Rob did this to limit the fly aways, but it can be modified for a more aggressive hold.
Re: Baseflight aka multiwii port to stm32
@timecop, @Truglodite: this code is about one year old and i have not added all the settings needed to cli. if you look up this commit and ignore all the #ifdef FFOSD and updateOSD() stuff it should work
https://github.com/frog32/baseflight/co ... b1119f5c84
https://github.com/frog32/baseflight/co ... b1119f5c84
Re: Baseflight aka multiwii port to stm32
Guys,
Can you give me a sanity check on a Baseflight (Latest) flashed rev2 quad I've knocked up for a friend with a spare board, Spektrum satellite to Pin 1 (the same as CPPM assumed, I use FrSky personally), GPS rx to Pin 3 and tx to Pin 4 with a HobbyKing Ne0-6M unit with separate 5v supply.
I don't get any packets from the GPS no matter what I try, GPS_type set to 1 and GPS_baudrate set to 4, I've tried -1 for auto detect and reversing the tx and rx pins in case I got them wrong, no luck yet.
It's a new gps and the original board from my hex which Is now running a rev 4 Naze32.
Thoughts? Something obvious I've forgotten?
Otherwise it seems fine
Can you give me a sanity check on a Baseflight (Latest) flashed rev2 quad I've knocked up for a friend with a spare board, Spektrum satellite to Pin 1 (the same as CPPM assumed, I use FrSky personally), GPS rx to Pin 3 and tx to Pin 4 with a HobbyKing Ne0-6M unit with separate 5v supply.
I don't get any packets from the GPS no matter what I try, GPS_type set to 1 and GPS_baudrate set to 4, I've tried -1 for auto detect and reversing the tx and rx pins in case I got them wrong, no luck yet.
It's a new gps and the original board from my hex which Is now running a rev 4 Naze32.
Thoughts? Something obvious I've forgotten?
Otherwise it seems fine
- aBUGSworstnightmare
- Posts: 115
- Joined: Mon Jun 27, 2011 8:31 pm
- Location: Munich, Germany
Re: Baseflight aka multiwii port to stm32
Gaijin wrote:Guys,
Can you give me a sanity check on a Baseflight (Latest) flashed rev2 quad I've knocked up for a friend with a spare board, Spektrum satellite to Pin 1 (the same as CPPM assumed, I use FrSky personally), GPS rx to Pin 3 and tx to Pin 4 with a HobbyKing Ne0-6M unit with separate 5v supply.
I don't get any packets from the GPS no matter what I try, GPS_type set to 1 and GPS_baudrate set to 4, I've tried -1 for auto detect and reversing the tx and rx pins in case I got them wrong, no luck yet.
It's a new gps and the original board from my hex which Is now running a rev 4 Naze32.
Thoughts? Something obvious I've forgotten?
Otherwise it seems fine
Hi,
The Spektrum Sat is Not a PPM Receiver! You Need to connect it's Signal line to Input 4.
In addition, the supply voltage of the Sat is 3.3v!
Since you Need a Uart for the Sat you can either have GPS or Spektrum Sat.
What is you GPS rx/tx level? Should be 3.3v. Be shure your GPS baudrate is right. Is your GPS working (i.e. Use an FTDI to connect it to your PC)?.
Rgds
aBUGSworstnightmare
- Crashpilot1000
- Posts: 631
- Joined: Tue Apr 03, 2012 7:38 pm
Re: Baseflight aka multiwii port to stm32
The strange reason maybe that I reworked the ublox parser.....
@Turgolite: Sorry to say the ins stuff has absolutely no arducopterstuff in it - because it will get to vibration sensitive then. And I don't want to end up like that, it's pointless
@Turgolite: Sorry to say the ins stuff has absolutely no arducopterstuff in it - because it will get to vibration sensitive then. And I don't want to end up like that, it's pointless
Re:
theailer wrote:My ublox 6 gps doesn't work in baseflight but with the same settings it works in harakiri for some strange reason
My test ublox (HK neo6 and crius v2.0 or something like that) works sitting near the window.
RTFM: https://code.google.com/p/afrodevices/w ... tVariables
gps configuration in harakiri is old and NOT the same as in baseflight, which has changed.
Also, to auto-configure ublox both RX and TX need to be connected from GPS.
Pre-configured ublox is no longer supported because idiot users would break too much shit.
Re: Baseflight aka multiwii port to stm32
Hi,
The Spektrum Sat is Not a PPM Receiver! You Need to connect it's Signal line to Input 4.
In addition, the supply voltage of the Sat is 3.3v!
Since you Need a Uart for the Sat you can either have GPS or Spektrum Sat.
What is you GPS rx/tx level? Should be 3.3v. Be shure your GPS baudrate is right. Is your GPS working (i.e. Use an FTDI to connect it to your PC)?.
Rgds
aBUGSworstnightmare
Damn, really, it's either GPS OR Spektrum, bummer I can't work around that even with a straight spektrum receiver can I?
Well I'm not surprised then as both SerialRX and GPS are turned on no doubt tying baseflight in a knot
Do I have any options beside persuading him to go FrSKy (Unlikely sadly as his radio isn't modular), can I specify the pin for serial input, is that impossible to add using soft serial?, I assume harakiri uses the same input pin.
Yet another reason why I don't like Spektrum, no worries on the 3.3v by the way I'm supplying it from a dedicated UBEC.
Thnks
Re: Baseflight aka multiwii port to stm32
Just use regular Spektrum PWM receiver, enable GPS, and skip RC4/5 for inputs, you'll just lose 2 aux switches.
Re: Baseflight aka multiwii port to stm32
Thanks TC,
I missed the channel shifting note in the manual, that'll do nicely for now.
I advise he splashes out on a LemonRX to gain all the channels http://www.lemon-rx.com/shop/index.php?route=product/product&path=70&product_id=66
I missed the channel shifting note in the manual, that'll do nicely for now.
I advise he splashes out on a LemonRX to gain all the channels http://www.lemon-rx.com/shop/index.php?route=product/product&path=70&product_id=66
Re: Baseflight aka multiwii port to stm32
I dunno about that, I think that's a 6ch receiver regardless if you use it in PPM or direct mode - if you look at the bottom of that page it lists only 6 ppm pulses. I'd say just trash spektrum shit and go to frsky.
Re: Re:
timecop wrote:theailer wrote:My ublox 6 gps doesn't work in baseflight but with the same settings it works in harakiri for some strange reason
My test ublox (HK neo6 and crius v2.0 or something like that) works sitting near the window.
RTFM: https://code.google.com/p/afrodevices/w ... tVariables
gps configuration in harakiri is old and NOT the same as in baseflight, which has changed.
Also, to auto-configure ublox both RX and TX need to be connected from GPS.
Pre-configured ublox is no longer supported because idiot users would break too much shit.
So for ublox---gps_type=1 and gps_baudrate=0 for autoconfiguration?
Re: Baseflight aka multiwii port to stm32
As long as both tx/rx are connected, yes.
Re: Baseflight aka multiwii port to stm32
The same thing here, just flashed the newest baseflight using the download option in baseflight configurator. The gps works fine using gps_type=0 and gps_baudrate=0. But it doesn't work using gps_type=1 and gps_baudrate=0.
The GPS is a ublox NEO 6m from crius.
The GPS is a ublox NEO 6m from crius.
Re: Baseflight aka multiwii port to stm32
frog32 wrote:The same thing here, just flashed the newest baseflight using the download option in baseflight configurator. The gps works fine using gps_type=0 and gps_baudrate=0. But it doesn't work using gps_type=1 and gps_baudrate=0.
The GPS is a ublox NEO 6m from crius.
I have the same GPS. I'll try with your settings.
Re: Baseflight aka multiwii port to stm32
What's the point of running ubx GPS in nmea mode?
Re: Baseflight aka multiwii port to stm32
timecop wrote:What's the point of running ubx GPS in nmea mode?
But the problem is if I set gps_type=1 and gps_baudrate=0 in chrome configurator (gps is at default settings)...there si no green light on GPS. But if I set both to 0...there is green light on GPS. And If ublox neo6 is set to default in uCentre...it is outputting NMEA not UBX.
What if I set gps manually with sending conf file to gps? Will still work in baseflight or no?
Re: Baseflight aka multiwii port to stm32
first of all, there's no need to run any GPS above 38400 baud.
second, ubx will accept configuration commands (and baseflight sends them) to configure it to output what I need.
So if you fuck with it making it output nmea only, etc, then yes, you will get what you are getting.
second, ubx will accept configuration commands (and baseflight sends them) to configure it to output what I need.
So if you fuck with it making it output nmea only, etc, then yes, you will get what you are getting.
Re: Baseflight aka multiwii port to stm32
Mine is a stock crius neo 6m. Never hooked it up to anything than baseflight. I first tried with default settings in baseflight and it worked. Then i've set it to gps_type=1 and since it doesn't work anymore. If i set it back to gps_type=0 then it is working again. Is it possible, that this gps it only outputting nema? http://dx.com/p/crius-cn-06-v2-0-standa ... een-177018
回覆: Baseflight aka multiwii port to stm32
frog32 wrote:Mine is a stock crius neo 6m. Never hooked it up to anything than baseflight. I first tried with default settings in baseflight and it worked. Then i've set it to gps_type=1 and since it doesn't work anymore. If i set it back to gps_type=0 then it is working again. Is it possible, that this gps it only outputting nema? http://dx.com/p/crius-cn-06-v2-0-standa ... een-177018
This gps outputs nmea by default, only if its been configured properly in the codes or manually via ublox software then it can output data in ublox format.
Kenny
Re: Baseflight aka multiwii port to stm32
The code does configure it.
Which is why I have said "both rx and tx need to be connected" etc.
Which is why I have said "both rx and tx need to be connected" etc.
Re: Baseflight aka multiwii port to stm32
That's why i've connected tx and rx (the last one on the top and the first one on the bottom row of pins). tx and rx are not reversed, this would not have allowed the nema setting to work. i'll reset the whole controller once again and download the newest hex using baseflight configurator, but i don't think this will help.
Re: Baseflight aka multiwii port to stm32
Last code for this I tested was before this:
https://github.com/multiwii/baseflight/ ... 64bc665573
Try pulling code pre-that and build and see? Anyway, as long as stuff works on my window I'll say its some other problem.
https://github.com/multiwii/baseflight/ ... 64bc665573
Try pulling code pre-that and build and see? Anyway, as long as stuff works on my window I'll say its some other problem.
Re: Baseflight aka multiwii port to stm32
using this code and building it using yagarto i get a working hex. but then i get gibberish like this in the cli after i activate gps and set gps_type=1
and if i set gps_type=0 i have an imediate fix and 7 satelites.
i have set everything to default before but it still doesn't work
Code: Select all
$M<ee$M<ll$M<kk$M<nn$M<ee$M<ll$M<kk$M<nn$M<ee$M<
and if i set gps_type=0 i have an imediate fix and 7 satelites.
Code: Select all
# status
System Uptime: 429 seconds, Voltage: 0 * 0.1V (2S battery)
CPU 72MHz, detected sensors: ACC BARO MAG GPS ACCHW: MMA845x
Cycle Time: 3610, I2C Errors: 0, config size: 892
# $M<ee$M<ll$M<kk$M<nn$M<ee$M<ll$M<kk$M<nn$M<ee$M<
ERR: Unknown command, try 'help'
# version
Afro32 CLI version 2.2 Dec 17 2013 / 20:38:34
# $M<ee$M<ll$M<kk$M<nn$M<ee$M<ll$M<kk$M<nn$M<ee$M<
i have set everything to default before but it still doesn't work
Re: Baseflight aka multiwii port to stm32
frog32 wrote:using this code and building it using yagarto i get a working hex. but then i get gibberish like this in the cli after i activate gps and set gps_type=1Code: Select all
$M<ee$M<ll$M<kk$M<nn$M<ee$M<ll$M<kk$M<nn$M<ee$M<
i have set everything to default before but it still doesn't work
Hm, unplug minimOSD?
Re: Baseflight aka multiwii port to stm32
ABL wrote:frog32 wrote:using this code and building it using yagarto i get a working hex. but then i get gibberish like this in the cli after i activate gps and set gps_type=1Code: Select all
$M<ee$M<ll$M<kk$M<nn$M<ee$M<ll$M<kk$M<nn$M<ee$M<
i have set everything to default before but it still doesn't work
Hm, unplug minimOSD?
Looks like MSP_STATUS, MSP_ATTITUDE, MSP_COMP_GPS, MSP_ANALOG, without the NULs.
Re: Baseflight aka multiwii port to stm32
ABL wrote:Hm, unplug minimOSD?
this is my setup, only bec for power, gps and usb
now i tried almost every thing. gps_type=1 and gps_baudrate=4 seems to work using the latest available in the downloader. i have absolutely no clue whether it is successfully initialized and working using at least 5Hz and probably a higher baudrate, or if it is just outputting at 1Hz 9600 baut.
Re: Baseflight aka multiwii port to stm32
Just flashed latest baseflight from configurator, GPS seems to work for me. It's an ublox NEO-6M.
Re: Baseflight aka multiwii port to stm32
then my gps must have been shipped with off settings. how do i reset my gps?
Re: Baseflight aka multiwii port to stm32
frog32 wrote:then my gps must have been shipped with off settings. how do i reset my gps?
I can't find the original text for the method but you may try this - http://www.drotek.fr/ftp/pdf/ublox_EN.pdf .
Except that your gps doesn't have a USB port and you need a FTDI cable/adapter to connect it to your computer this instruction should work for you.
If you just want to perform a configuration reset do not follow 1.2 to 1.5. Instead select the "RST (Reset)" option from the list shown in the screenshots, then choose all configurations there and click Save, then follow the rest of the steps to store the default configuration into the eeprom of your gps.
Kenny
Re: Baseflight aka multiwii port to stm32
Yesterday I have set gps_type=0 and gps_baudrate=0 and went out. In about 30 seconds...red led started flashing on FC. So I think gps works.
Re: Baseflight aka multiwii port to stm32
Ok this is working for me. But what are the optimal settings for baseflight?
- 115200 baud
- protocol in and protocol out only ubx
- which messages are needed? i like to kick out everything else
or at what baudrate do i have to configure it so autoconfigure will work in baseflight?
- 115200 baud
- protocol in and protocol out only ubx
- which messages are needed? i like to kick out everything else
or at what baudrate do i have to configure it so autoconfigure will work in baseflight?
Re: Baseflight aka multiwii port to stm32
frog32 wrote:Ok this is working for me. But what are the optimal settings for baseflight?
- 115200 baud
- protocol in and protocol out only ubx
- which messages are needed? i like to kick out everything else
or at what baudrate do i have to configure it so autoconfigure will work in baseflight?
gps_baudrate is the baudrate you *want* your GPS to run on, BF will try all baudrates from 115200 to 9600 and try to set your GPS to the gps_baudrate setting.
Baseflight will autoconfigure GPS messages (gps_type=1 / uBlox only) so if you want you can turn off all messages in GPS configuration. Needed messages will be turned on after baudrate is set anyway. Also, gps_baudrate=-1 is autodetect baudrate (not autoconfig) and it is for NMEA only, don't worry about it if you have uBlox.
Just set gps_type=1 and gps_baudrate=0 and you should be good to go.
回覆: Baseflight aka multiwii port to stm32
frog32 wrote:Ok this is working for me. But what are the optimal settings for baseflight?
- 115200 baud
- protocol in and protocol out only ubx
- which messages are needed? i like to kick out everything else
or at what baudrate do i have to configure it so autoconfigure will work in baseflight?
My understanding is that baseflight will take care of all ublox settings for you, including baud rate, protocol settings etc., to make everything as neat as possible. You just need to keep your gps at default settings, and have the correct gps type specified in baseflight .
Kenny
Re: Baseflight aka multiwii port to stm32
But it didn't in my case. It could only use it as a ubx gps when i did set gps_baudrate=4 (9600 baud), but i didn't realize that it should have worked then
Re: Baseflight aka multiwii port to stm32
Hi !
Today I try the last Hex file from Baseflight from github, but impossible to get my Naze32 rev0 work with GPS from HK.
feature GPS, gps_type=1, gps_baudrate=0 .... gps_type=0, gps_baudrate=0 ...... all possible Gui .....
So I take Baseflight r464 the last on svn, but I had a lot of issues with it also ?
So I go back on Baseflight r363 and GPS was detected
My Question is Naze32 rev0 with GPS not supported on last Baseflight revisions or is it a Software failure !
Regards
hinkel
Today I try the last Hex file from Baseflight from github, but impossible to get my Naze32 rev0 work with GPS from HK.
feature GPS, gps_type=1, gps_baudrate=0 .... gps_type=0, gps_baudrate=0 ...... all possible Gui .....
So I take Baseflight r464 the last on svn, but I had a lot of issues with it also ?
So I go back on Baseflight r363 and GPS was detected
My Question is Naze32 rev0 with GPS not supported on last Baseflight revisions or is it a Software failure !
Regards
hinkel
Re: Baseflight aka multiwii port to stm32
Any hardware/software revision works fine with GPS.
Re: Baseflight aka multiwii port to stm32
timecop wrote:Any hardware/software revision works fine with GPS.
I try It again with Naze32 rev0 and rev4, but with "Chrome Google Baseflight configurator" and I had the same issues, GPS is not detected in GUI ! With old Baseflight code it is ok! I miss certainly something but what ?
- Crashpilot1000
- Posts: 631
- Joined: Tue Apr 03, 2012 7:38 pm
Re: Baseflight aka multiwii port to stm32
It would be nice having an ublox gps model with no autoconfiguration since the enabled sbas protocol could cause problems in Australia. So the copter is then disturbed by Japanese Sbas sattelites - that is also confirmed by the information I've seen in a youtube documentation of the "UAV outbackchallenge" where some contendors had to change their code to disable sbas to take part in the challenge. Actual baseflight doesn't allow that, except you fall back to NMEA with ublox.
Re: Baseflight aka multiwii port to stm32
GPS not detected = user is dumb and did something wrong.
New GPS code will always autoconfigure and setup GPS as specified, even if its connected after board reset or disconnected/reconnected.
New GPS code will always autoconfigure and setup GPS as specified, even if its connected after board reset or disconnected/reconnected.
- aBUGSworstnightmare
- Posts: 115
- Joined: Mon Jun 27, 2011 8:31 pm
- Location: Munich, Germany
Re: Baseflight aka multiwii port to stm32
Crashpilot1000 wrote:Actual baseflight doesn't allow that, except you fall back to NMEA with ublox.
Hi,
what's wrong with using NMEA? Why use any proprietary protocol related to a particular vendor/GPS chip generation?
The only thing you need is a good NMEA message parser. This shouldn't be a big deal since we only need to deal with RMC and GGA sentence.
Rgds
aBUGSworstnightmare
- Crashpilot1000
- Posts: 631
- Joined: Tue Apr 03, 2012 7:38 pm
Re: Baseflight aka multiwii port to stm32
Depending on gps and nmea parser you might loose one digit of precision (seen with MTK).
Re: Baseflight aka multiwii port to stm32
timecop wrote:GPS not detected = user is dumb and did something wrong.
New GPS code will always autoconfigure and setup GPS as specified, even if its connected after board reset or disconnected/reconnected.
I assume I am dumb , and I test the Flight ability of " Afro32 CLI version 2.2 Nov 26 2013 / 11:53:50 " and it was very
Crappy on my Naze 32 rev0 so I change the looptime and some PIDs but ever the same bad flight, finally i had a Look at the GPS
and Now It was surprisely detected in GUI ??????? . And ask myself how is this possible ???? . So I find that changing looptime from
default 3500 to 3000 or 0 , made the GPS Detected go back to looptime =3500 than GPS is not Detected. Now I am sure something is wrong with this Baseflight code for Naze32 rev0.
Eventually Naze32 rev5 will be fine with this code
Regards
hinkel
Re: Baseflight aka multiwii port to stm32
Looptime 0 should never be used, I should probably limit it to like 1000 or something minimum - after the recent sensor axis unfucking, the redundant double-sensor read was removed and now setting looptime to zero results in time of ~600us which is completely unflyable on default PIDs.
Re: Baseflight aka multiwii port to stm32
frog32 wrote:But it didn't in my case. It could only use it as a ubx gps when i did set gps_baudrate=4 (9600 baud), but i didn't realize that it should have worked then
hinkel wrote:I try It again with Naze32 rev0 and rev4, but with "Chrome Google Baseflight configurator" and I had the same issues, GPS is not detected in GUI ! With old Baseflight code it is ok! I miss certainly something but what ?
There's a new build to remedy the GPS autoconfiguration/detection problems. Not flighttested, so use with caution:
https://github.com/multiwii/baseflight/ ... flight.hex
- Crashpilot1000
- Posts: 631
- Joined: Tue Apr 03, 2012 7:38 pm
Re: Baseflight aka multiwii port to stm32
@disq:
You forgot to quote that:
You forgot to quote that:
timecop wrote:GPS not detected = user is dumb and did something wrong.
New GPS code will always autoconfigure and setup GPS as specified, even if its connected after board reset or disconnected/reconnected.
Re: Baseflight aka multiwii port to stm32
disq wrote:frog32 wrote:But it didn't in my case. It could only use it as a ubx gps when i did set gps_baudrate=4 (9600 baud), but i didn't realize that it should have worked thenhinkel wrote:I try It again with Naze32 rev0 and rev4, but with "Chrome Google Baseflight configurator" and I had the same issues, GPS is not detected in GUI ! With old Baseflight code it is ok! I miss certainly something but what ?
There's a new build to remedy the GPS autoconfiguration/detection problems. Not flighttested, so use with caution:
https://github.com/multiwii/baseflight/ ... flight.hex
ahhh,
a bug in the gps code ...
will it now work?
Re: Baseflight aka multiwii port to stm32
Crashpilot1000 wrote:@disq:
You forgot to quote that:timecop wrote:GPS not detected = user is dumb and did something wrong.
New GPS code will always autoconfigure and setup GPS as specified, even if its connected after board reset or disconnected/reconnected.
don't worry, that quote is still correct.
at least even with bugs its still light years ahead of your randomly pasted together GPS code.
especially baffled at "ubx receicer rewrite". as if that would make any difference for getting baud rate correctly.
- Crashpilot1000
- Posts: 631
- Joined: Tue Apr 03, 2012 7:38 pm
Re: Baseflight aka multiwii port to stm32
Love you too honey.