Harakiri aka multiwii port to stm32

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

Re: Harakiri aka multiwii port to stm32

Post by subaru4wd »

Okay, but why does it pause then enter GPS Hold??? Then stay in GPS Hold for a minute before going into GPS Home?

Would it be possible to make just a simple RTH mode, with no compass or baro or anything?? I don't care if the craft returns to home nose in, just so long as it starts to return home... and immediately. This is for my failsafe, which I will program in my Receiver so if there is a loss of signal, the quad starts to return. As soon as I regain radio control, i would leave RTH and resume my flight.

The way it is now, if I lose radio, my failsafe just applies 80% throttle and sits in Angle mode. This could cause it to drift farther out of range, and who know's where it would be by the time it entered RTH.

Next time I am out in the field and ready to RTH test, I will do a Mag Calibration before hand. Now that I remember, the last Mag Calibration I performed was on the bench, before I even installed the flight controller /facepalm

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

After engaging RTH in full flight, it will brake and do a PH & Althold (and gain some hight, if specified), if some requirements are fulfilled the RTH is engaged. So when your mag isn't working properly that stuff goes wrong in the first place. An RTH without MAG is possible on copters (easier on planes, naturally they always move according to the nose, besides from some wind crosstrack - so the very nice ublox gps heading resemble very good the actual plane heading) but I will not spend time on figuring that out (reason: 1st: Own stupidity/inability 2nd: Codesize is also some monster grinning at me). A failsafe function without baro seems like an idea from the 19th century today (sorry for those harsh words), since those parts (bmp085 will do) sell for less than 5$ and can guarantee a smooth landing without a predefined throttle and secure your investment (copter). Offering flightcontrols that are assumed to do a little more than a KK today without a baro is beyond my understanding. Everybody is bitching about the poor BMP085 (or the smaller BMP180) but if handled properly in code, it does a reasonably good job (of course can not rival to ms5611, but not shabby at all).
Cheers to you
Rob
Last edited by Crashpilot1000 on Fri Oct 25, 2013 8:02 pm, edited 1 time in total.

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Harakiri aka multiwii port to stm32

Post by hinkel »

Ramei wrote:I use the same configuration and I'm very interested in the osd-switch.

Can you share the osd-sketch and the harakiri-hex.

Thanks,
Ralf


The code was test in short flight.
I am not a programmer no warranty of all this Code , test on your own risk !

@Crashpilot1000
Feel free to do what you want with this crappy Code. This forum is a pain for me and my very bad English :( .


Regards
hinkel
Attachments
src SG25 R3750SG Harakiri MODIFIED FILES.rar
Modified Harakiri SG2.5 files
(44.39 KiB) Downloaded 206 times
SG25 KVOSD FAILSAFE HEX.rar
do not forget to change PID an other stuff in CLI. No Warranty on this code !
(105.11 KiB) Downloaded 206 times
KV_Team_OSD R370SG OSDSW FAILSAFE.rar
Code for Minimosd
(23.7 KiB) Downloaded 273 times

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

Re: Harakiri aka multiwii port to stm32

Post by subaru4wd »

Crashpilot1000 wrote:After engaging RTH in full flight, it will brake and do a PH & Althold (and gain some hight, if specified), if some requirements are fulfilled the RTH is engaged. So when your mag isn't working properly that stuff goes wrong in the first place. An RTH without MAG is possible on copters (easier on planes, naturally they always move according to the nose, besides from some wind crosstrack - so the very nice ublox gps heading resemble very good the actual plane heading) but I will not spend time on figuring that out (reason: 1st: Own stupidity/inability 2nd: Codesize is also some monster grinning at me). A failsafe function without baro seems like an idea from the 19th century today (sorry for those harsh words), since those parts (bmp085 will do) sell for less than 5$ and can guarantee a smooth landing without a predefined throttle and secure your investment (copter). Offering flightcontrols that are assumed to do a little more than a KK today without a baro is beyond my understanding. Everybody is bitching about the poor BMP085 (or the smaller BMP180) but if handled properly in code, it does a reasonably good job (of course can not rival to ms5611, but not shabby at all).
Cheers to you
Rob


You are thinking of Failsafe: "Stop, return to home, auto-land"

I just need a "return to home". I have a 2nd board that is full acro, it does not have a Baro or Mag on it. I was hoping I could get a ublox and have return to home for it, but i guess maybe I will have to just get me a cheap 8bit board and use MW2.2 software for that.

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

@Hinkel: Thank you very much for posting your changes here!! Very much appreciated! Cheers to you!!
@Subaru: Yes, do that and persuade the mwii2.2/2.3 code to do what you want. Don't forget to post that code, I will be very happy to implement that!
@lol:
Having another friday beer now.. the sixpack has *somehow* halfed it's capacity... stay away from guiness...veltins is my favourite... too keep it even: kilkenny is ok and budwiser is also good... *hicks*.....on german tv James Bond saving the world 197X.... without GPS and MAG or SONAR.... lol.... I wonder what you are drinking right now... if not some religion/believ/convincement keeps you away from that evil stuff.....I can not refrain on free weekends....
Cheers to all of you!
Greets
Rob

P.s.: I wonder what Japanese guys drink on fridays? Sake along with some karaoke?

Truglodite
Posts: 48
Joined: Sat Jun 22, 2013 2:37 am

Re: Harakiri aka multiwii port to stm32

Post by Truglodite »

Cheers Rob, ask if they have a 'Racer 5' IPA... one of my favorites at the local pub. I hope you feel OK tomorrow morning. ;)

timecop wrote:
Truglodite wrote:Sorry, I should have specified I am working with a rev4 board, not rev5. Should I be doing something different?

The code seems to be working OK on my bench, but I haven't test flown it yet.

Kev


rev4 will be at 80, rev5 will be at 84.


OK I tried testflying it, but I could never get it to calibrate compass or ACC using the stick commands. :?:

This is with "80mhz modified Harakiri SG2.6". Like I mentioned before, it did in fact show 80mhz in CLI. I triple checked everything in the latest Baseflight GUI; radio calibration, sensors, etc... AFAIK everything looks good to go. I fell back to flying 80mhz SG2.5 until I get this sorted. I have a feeling I need to change more than just those 2 numbers in the code. Any ideas why this happens? or what I should try next?

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

Re: Harakiri aka multiwii port to stm32

Post by subaru4wd »

Kevin, make sure you arent trying to use stick commands with your dual rates set on the transmitter. I thought my stick commands weren't working for a while too, then i remembered to set rates back to 100% and they worked.

Truglodite
Posts: 48
Joined: Sat Jun 22, 2013 2:37 am

Re: Harakiri aka multiwii port to stm32

Post by Truglodite »

Brian, I don't have dual rates setup on my TX. I checked in baseflight GUI and all my channels are reaching 1000-2000 like they always have. To be complete, all the sensors were also responding appropriately in the GUI. I don't understand what is keeping it from entering the calibration routines, unless the 80mhz mod is not working properly.

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

Re: Harakiri aka multiwii port to stm32

Post by subaru4wd »

I will check to see if the stick command for Mag Calib works on my setup and let you know Kevin.

Ramei
Posts: 2
Joined: Wed Apr 17, 2013 11:27 pm

Re: Harakiri aka multiwii port to stm32

Post by Ramei »

hinkel wrote:
Ramei wrote:I use the same configuration and I'm very interested in the osd-switch.

Can you share the osd-sketch and the harakiri-hex.

Thanks,
Ralf


The code was test in short flight.
I am not a programmer no warranty of all this Code , test on your own risk !

@Crashpilot1000
Feel free to do what you want with this crappy Code. This forum is a pain for me and my very bad English :( .


Regards
hinkel


Hi Hinkel,

thanks a lot for your files.

The harakiri.hex with the Osd-switch works perfekt with kv-osd r345 (unflown of course).

Only with the kv r370 I've problems. There was only displayed a black screen. But after a test with the original r370 it was the same. So the error must be on my side. I'll try it again next days.

Thanks and sorry for my bad English

Ralf

SecretSpy711
Posts: 14
Joined: Sat Oct 26, 2013 1:13 am

Re: Harakiri aka multiwii port to stm32

Post by SecretSpy711 »

hi, I have a rev5 Naze32 board (not the Acro) that I am trying to put Harakiri on, to experiment with position hold. But I'm having some trouble loading Harakiri on it.

I am using Source081513-2215Uhr (Harakiri Summer Games 2.5, baseflight_NAZE.hex) with the Carsten GUI. I've also tried it with the Flash Loader Demo. Both methods successfully update the firmware, but afterwards I can't connect to the board. Tried connecting using the Chrome app as well, without success. So I have to use the "recovery" method of shorting the bootloader pads to put Baseflight back on it.

Any ideas? What am I doing wrong?

Truglodite
Posts: 48
Joined: Sat Jun 22, 2013 2:37 am

Re: Harakiri aka multiwii port to stm32

Post by Truglodite »

The GUI has always acted buggy for me after firmware updates and CLI access... it rarely reconnects without first resetting the board and restarting the GUI.

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

Re: Harakiri aka multiwii port to stm32

Post by timecop »

SecretSpy711 wrote:hi, I have a rev5 Naze32 board (not the Acro) that I am trying to put Harakiri on, to experiment with position hold. But I'm having some trouble loading Harakiri on it.

I am using Source081513-2215Uhr (Harakiri Summer Games 2.5, baseflight_NAZE.hex) with the Carsten GUI. I've also tried it with the Flash Loader Demo. Both methods successfully update the firmware, but afterwards I can't connect to the board. Tried connecting using the Chrome app as well, without success. So I have to use the "recovery" method of shorting the bootloader pads to put Baseflight back on it.

Any ideas? What am I doing wrong?


You need newer build on rev5, it was posted somewhere in this thread.

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

So is this firmware working on Rev 5 board now? I hope so. Appreciate the work that has gone into this

SecretSpy711
Posts: 14
Joined: Sat Oct 26, 2013 1:13 am

Re: Harakiri aka multiwii port to stm32

Post by SecretSpy711 »

timecop wrote:You need newer build on rev5, it was posted somewhere in this thread.


maintainable codebase FTW!
*cough*, anyone got a link? Haven't found it yet.

Truglodite
Posts: 48
Joined: Sat Jun 22, 2013 2:37 am

Re: Harakiri aka multiwii port to stm32

Post by Truglodite »

Rob, I just had myself plenty of beer... Grolsch & Dos Equis... thought of you and checked the thread,

Maintainable what? Rob sometimes says github is good, sometimes not maintained, but hey... here you go my friend:

https://github.com/Crashpilot1000/SGTodaysSnapshot

That is where I got my pre2.6... now it's Friday night... someone else post something while drunk.

Cheers,
Kev

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Harakiri aka multiwii port to stm32

Post by hinkel »

Hi !
Actually they are 2 PID controller in Harakiri , the first is optimal for all GPS an Angle stuff , the second Alex.K seems fine in acro mode but the PIDs are in most case different and the choice of witch controller is used must be done in CLI.
So why don't create a Alex.k PID always configurable (( eventually in Multiwiiconf also )) in CLI like this for exemple :
cfg.P8[AKROLL] = ;
cfg.I8[AKROLL] = ;
cfg.D8[AKROLL] = ;

cfg.P8[AKPITCH] = ;
cfg.I8[AKPITCH] = ;
cfg.D8[AKPITCH] = ;

cfg.P8[AKYAW] = ; //
cfg.I8[AKYAW] = ;

cfg.P8[AKPIDLEVEL] = ; //Angle
cfg.I8[AKPIDLEVEL] = ; //Horizon


The choice between first and second PID controller should be done with a switch on Radio and by use of GPS fonctions RTL and PH, the first PID controller always take the hand !

Regards
Hinkel

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

@Truglodite: I haven't tried "Racer 5", let's see where to find that canadian beer here... Really don't know why the stick commands don't work with your setup, maybe it's something with your overclocking. I don't have that barebone knowledge, I have to trust in the supplied libraries/drivers (mostly).
@SecretSpy711: I think the github version should be v5 compatible. Since I still have the arduino IDE, I mostly use the build in serial monitor (if no baudswitching is needed). You can copy paste commands etc, that makes the cli a breeze and I think it's very nice for pure cli work. Flashing with the (in the manual) recommended "Flash Loader Demo" is so simple, btw I always tick the option "global erase".
@Hinkel: I implemented the osd sw box now. Your proposal for another box for the alternative controller seems reasonable, but I am currently not up to that.
@brm: Sadly to see you go here: http://code.google.com/p/afrodevices/so ... tail?r=458 hopefully you keep up with impulses on some other googlecode/github repo. Don't let that TC bring you down. BTW: I also played around with normalization of the mag vector, like done in the baseflightplus branch, but got worsened practical results, hmm.. maybe I should try that again.
Cheers
Rob

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Harakiri aka multiwii port to stm32

Post by hinkel »

Crashpilot1000 wrote:@Hinkel: I implemented the osd sw box now. Your proposal for another box for the alternative controller seems reasonable, but I am currently not up to that.


Thanks a lot for implement the osd sw box. I will try to add the alternative controller box for fun by myself just to feel the direct difference in
FPV flight . :)

EDIT: OMG Just have a quick look on the last SG2.6 mw.c .......lots of change in compare to SG2.5 :shock:
also my poor crappy failsafe hack for kvteamosd is not inside :mrgreen:

Regards
hinkel

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

Hi. I've been using Baseflight for a while but thought I would give Harakiri a go to try RTH and PH. Position Hold has been working quite well in Baseflight but I like the idea of RTH for video link failures. Anyway I have successfully loaded the SG Pre2.6 to a Ver5 Naze32 but I'm having issues from there on. In Baseflight Config GUI ver 2.11 it connects but that is all. In Baseflight GUI ver2.3.5.0 it connects and shows PID values. I can calibrate everything. It shows gyro, acc, baro but not GPS. In CLI I can set all variables but it doesn't seem to write to the board as it is cleared when I leave and return. I thought I was getting somewhere last night when I tried a test flight and it did 4 flips on take off until the props were broken lol. Maybe not that close after all. I'd like to make this work as it looks good on the videos. I the baseflight and Baseflight ver 2.11 CLI and PuTTy CLI It continually adds jibberish and I can make no changes and all GUI seem to crash after a short time. I thought I might be from the GPS so I disconnected it but it didn't make a difference.
This is the message I get when the GUI crashes....

BaseflightGUI
ProductVersion = 2.3.5.0
CurrentCulture
- DisplayName = English (United States)
- DateTimeFormat = yyyy'-'MM'-'dd HH':'mm':'ss'Z'
- NumberDecimalSeparator = .
- NumberGroupSeparator = ,

**** User Comment Start ****



**** Message ****
The operation has timed out.


**** Source ****
System


**** Helplink ****



**** Last Command ****
UnhandledException
****** StackTrace ******
at System.IO.Ports.SerialStream.ReadByte(Int32 timeout)
at System.IO.Ports.SerialPort.ReadOneChar(Int32 timeout)
at System.IO.Ports.SerialPort.ReadChar()
at BaseflightGUI.modCLI.startCLI()
at BaseflightGUI.frmMain.setTAB()
at BaseflightGUI.frmMain.tabMain_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.TabControl.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.TabControl.WmSelChange()
at System.Windows.Forms.TabControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

And from the GUI ver 2.11 CLI I get this sort of message but it continues on and on and wont let me get a word in lol

þ È@ÏÁþ È@%¿þ È@È@ñBþ È@v2þ È@œLþ È@¢Ïþ È@H±þ È@Ä]þ !È@.#þ "È@ þ #È@úÞþ $È@}®þ %È@—Ðþ &È@©Sþ 'È@C-þ (È@§²þ )È@MÌþ *È@sOþ +È@™1þ ,È@Aþ -È@ô?þ .È@ʼþ /È@ Âþ 0È@‹þ 1È@ùõþ 2È@Çvþ 3È@-þ 4È@ªxþ 5È@@þ 6È@~…þ 7È@”ûþ 8È@pdþ 9È@šþ :È@¤™þ ;È@Nçþ <È@ɗþ =È@#éþ >È@jþ ?È@÷þ @È@»þ AÈ@þÅþ BÈ@ÀFþ CÈ@*8þ DÈ@­Hþ EÈ@G6þ FÈ@yµþ GÈ@“Ëþ HÈ@wTþ IÈ@*þ JÈ@£©þ KÈ@I×þ LÈ@Χþ MÈ@$Ùþ NÈ@Zþ OÈ@ð$þ PÈ@Ãmþ QÈ@)þ RÈ@þ SÈ@ýî

Any Ideas where to start??

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

It all seems to work in MultiWii Config ver 2.11 but I can change anything via the CLI. This might be why it smashed the props as I thought it had camtilt programmed when it wasn't but I had motors and servos connected as though it was.

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

The other problem is I can map the rx channels correctly

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Have not tested camtilt or altered rx channels, that is unchanged from older orig. BF so i expect that to work. Reading the readme.txt is not your business ????????????????????????????????????????????????????????????? I will not comment on stuff that is already in the readme. Using some gui instead of the mwii2.1 Gui is your problem as well......

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

Sorry. I've read so much I'm overloaded. I'll go back to the read me file again. If I can't see how to access the CLI I guess I'll go back to BF. Thanks for you help.

jingej
Posts: 29
Joined: Sat Oct 27, 2012 11:56 am

Re: Harakiri aka multiwii port to stm32

Post by jingej »

alistairr wrote:Hi. I've been using Baseflight for a while but thought I would give Harakiri a go to try RTH and PH. Position Hold has been working quite well in Baseflight but I like the idea of RTH for video link failures. Anyway I have successfully loaded the SG Pre2.6 to a Ver5 Naze32 but I'm having issues from there on. In Baseflight Config GUI ver 2.11 it connects but that is all. In Baseflight GUI ver2.3.5.0 it connects and shows PID values. I can calibrate everything. It shows gyro, acc, baro but not GPS. In CLI I can set all variables but it doesn't seem to write to the board as it is cleared when I leave and return. I thought I was getting somewhere last night when I tried a test flight and it did 4 flips on take off until the props were broken lol. Maybe not that close after all. I'd like to make this work as it looks good on the videos. I the baseflight and Baseflight ver 2.11 CLI and PuTTy CLI It continually adds jibberish and I can make no changes and all GUI seem to crash after a short time. I thought I might be from the GPS so I disconnected it but it didn't make a difference.
This is the message I get when the GUI crashes....

BaseflightGUI
ProductVersion = 2.3.5.0
CurrentCulture
- DisplayName = English (United States)
- DateTimeFormat = yyyy'-'MM'-'dd HH':'mm':'ss'Z'
- NumberDecimalSeparator = .
- NumberGroupSeparator = ,

**** User Comment Start ****



**** Message ****
The operation has timed out.


**** Source ****
System


**** Helplink ****



**** Last Command ****
UnhandledException
****** StackTrace ******
at System.IO.Ports.SerialStream.ReadByte(Int32 timeout)
at System.IO.Ports.SerialPort.ReadOneChar(Int32 timeout)
at System.IO.Ports.SerialPort.ReadChar()
at BaseflightGUI.modCLI.startCLI()
at BaseflightGUI.frmMain.setTAB()
at BaseflightGUI.frmMain.tabMain_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.TabControl.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.TabControl.WmSelChange()
at System.Windows.Forms.TabControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

And from the GUI ver 2.11 CLI I get this sort of message but it continues on and on and wont let me get a word in lol

þ È@ÏÁþ È@%¿þ È@È@ñBþ È@v2þ È@œLþ È@¢Ïþ È@H±þ È@Ä]þ !È@.#þ "È@ þ #È@úÞþ $È@}®þ %È@—Ðþ &È@©Sþ 'È@C-þ (È@§²þ )È@MÌþ *È@sOþ +È@™1þ ,È@Aþ -È@ô?þ .È@ʼþ /È@ Âþ 0È@‹þ 1È@ùõþ 2È@Çvþ 3È@-þ 4È@ªxþ 5È@@þ 6È@~…þ 7È@”ûþ 8È@pdþ 9È@šþ :È@¤™þ ;È@Nçþ <È@ɗþ =È@#éþ >È@jþ ?È@÷þ @È@»þ AÈ@þÅþ BÈ@ÀFþ CÈ@*8þ DÈ@­Hþ EÈ@G6þ FÈ@yµþ GÈ@“Ëþ HÈ@wTþ IÈ@*þ JÈ@£©þ KÈ@I×þ LÈ@Χþ MÈ@$Ùþ NÈ@Zþ OÈ@ð$þ PÈ@Ãmþ QÈ@)þ RÈ@þ SÈ@ýî

Any Ideas where to start??

detach your OSD

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

Thanks for the suggestion. I don't have an OSD attached but I did try plugging the GPS back into the 5v and earth and it stopped so now I can use the Cli. Shit Hot!
A question about the GUI. As you read earlier I have about 5 different versions on my laptop. I only use Naze32 boards with Baseflight and now Harakiri. I need to change that to just 2 to simplify things.
I'm on a steep learning curve but I'm enjoying it. My past experience has been with Eagletree fixed wing FPV which is plug and play. Thanks for your work

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

WooHoo!! I'm flying. Only a quick flight on the front lawn in the dark at midnight.

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Harakiri aka multiwii port to stm32

Post by hinkel »

Hi !
Just a stupid noob question in Harakiri in config.c the parameter cfg.D8[YAW] is not define for eeprom write, but in mw.c the parameter cfg.D8[axis] is
use for the PID Controller, axis is going from 1 to 3 so is there not a possible bug if the cfg.D8[3] is reading value from cfg.D8[PIDALT] in eeprom ?
cfg.D8[YAW] = 0; // not exist in config.c ???
Excuse me if i don't understanding this ?

Regards
hinkel

Truglodite
Posts: 48
Joined: Sat Jun 22, 2013 2:37 am

Re: Harakiri aka multiwii port to stm32

Post by Truglodite »

Crashpilot1000 wrote:@Truglodite: I haven't tried "Racer 5", let's see where to find that canadian beer here... Really don't know why the stick commands don't work with your setup, maybe it's something with your overclocking. I don't have that barebone knowledge, I have to trust in the supplied libraries/drivers (mostly).

...//

Cheers
Rob


It's a local brew, but it is very popular:

http://bearrepublic.com/

Maybe your local pub or beer store can order some? It is well worth the trouble if you like IPA... or if you just want less bottles to accomplish the same task. ;)

You're probably right it has to do with overclocking, and I too lack knowledge in that area... and many other areas too. :D Oh well, 80mhz did help a little bit, but if Harakiri progresses too far I may have to drop it in favor of other features or performance improvements. Hopefully by then TC or someone with adequate knowledge will figure out how to get with the latest code base running 80mhz on pre-v5 boards. I wonder if the v5 boards work at 84mhz, or have the same problems?

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

Re: Harakiri aka multiwii port to stm32

Post by timecop »

overclocking works fine in baseflight, the version you forked drivers from is probably way too old, look at commit history and see what changed (I left a comment something about 80mhz) to fix it.

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

hinkel wrote:Hi !
Just a stupid noob question in Harakiri in config.c the parameter cfg.D8[YAW] is not define for eeprom write, but in mw.c the parameter cfg.D8[axis] is
use for the PID Controller, axis is going from 1 to 3 so is there not a possible bug if the cfg.D8[3] is reading value from cfg.D8[PIDALT] in eeprom ?
cfg.D8[YAW] = 0; // not exist in config.c ???
Excuse me if i don't understanding this ?

Regards
hinkel


Hi, Hinkel!
Thanks for staying sharp and rechecking! Well, actually the whole config specified in the struct config_t (mw.h https://github.com/Crashpilot1000/SGTod ... /mw.h#L202) is saved in eeprom and there is a complete PID for every piditem. The section you refer to (static void resetConf(void)) does not explicitly set a value for cfg.D8[YAW] but it is assigned with a zero along with the "writeParams" call and its' erasing the eeprom before writing (https://github.com/Crashpilot1000/SGTod ... nfig.c#L74). So if no value for cfg.D8[YAW] specified in "resetConf", it will be set to zero. I list all of my new/altered variables there even if they are by default zero, but that is not necessary.
EDIT: Have you checked the Autostart function, it's such a nice plaything, I can autostart and autoland all day.. lol...
@Turgolite: Well, if your rc channels are reported back correctly in the gui, the triggering of stick commands should work as well. Please recheck if you haven't sitll some trim on you yaw on your tx left, that spoiled it once for me.

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Harakiri aka multiwii port to stm32

Post by hinkel »

Crashpilot1000 wrote:EDIT: Have you checked the Autostart function, it's such a nice plaything, I can autostart and autoland all day.. lol...
.


Thanks to clear my noob questions ! :)
I have not try yet the SG2.6 , because I had issues to download the code from Github http://github.com/Crashpilot1000/SGTodaysSnapshot/blob/master/baseflight_NAZE.hex
and I was not sure If it was just a testcode for Naze32 rev5 ! But ASAP I will try this SG2.6 and report when weather will be better !

Regards
hinkel

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

Hi again.....
I think I have read somewhere about someone having issues setting RC Control Settings in MultiWii 2.1. When I choose RTH or PH and then check on Real Time Data page when I switch to either RTH or PH it highlights Camstab and Level. I have tried all the other options individually and none of them highlight RTH or PH.
Thanks Alistair

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

Did I miss something with auxset. Could you give an example of a CLI command for channel set

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Like always in mwii the boxes turn green when the function could be activated. Probably not enough sats in your room??
Cli command auxset is described (with example) in the cli. That original was non human readable and just an awful waste - probably still present in BF.

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Harakiri aka multiwii port to stm32

Post by hinkel »

short fly test with SG2.6 version 17 oktober :
* the bug from arming motor in baro mode is now fixed , :)
* the autostart is working fine :) test with 2m
* the (( cfg.nav_rtl_lastturn = 1; // 1 = when copter gets to home position it rotates it's head to takeoff direction independend of nav_controls_heading )) is not working , I was just 1 or 2 meter in hight for the test, no head rotate !

Regards
hinkel

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

Re: Harakiri aka multiwii port to stm32

Post by subaru4wd »

alistairr wrote:Hi again.....
I think I have read somewhere about someone having issues setting RC Control Settings in MultiWii 2.1. When I choose RTH or PH and then check on Real Time Data page when I switch to either RTH or PH it highlights Camstab and Level. I have tried all the other options individually and none of them highlight RTH or PH.
Thanks Alistair



Make sure you are using a MW2.2 gui, and not a GUI for MW2.1

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

Re: Harakiri aka multiwii port to stm32

Post by subaru4wd »

alistairr wrote:Hi again.....
I think I have read somewhere about someone having issues setting RC Control Settings in MultiWii 2.1. When I choose RTH or PH and then check on Real Time Data page when I switch to either RTH or PH it highlights Camstab and Level. I have tried all the other options individually and none of them highlight RTH or PH.
Thanks Alistair



Make sure you are using a MW2.2 gui, and not a GUI for MW2.1

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

Re: Harakiri aka multiwii port to stm32

Post by scrat »

alistairr wrote:WooHoo!! I'm flying. Only a quick flight on the front lawn in the dark at midnight.


What did you do?

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

Re: Harakiri aka multiwii port to stm32

Post by IceWind »

For the autoland/autostart does it requires sonar?

Now I want to test that as well... ;)

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

Re: Harakiri aka multiwii port to stm32

Post by timecop »

Why not just get a DJI NAZA like the rest of cool kids with autostart/autoland?

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

hinkel wrote:short fly test with SG2.6 version 17 oktober :
* the bug from arming motor in baro mode is now fixed , :)
* the autostart is working fine :) test with 2m
* the (( cfg.nav_rtl_lastturn = 1; // 1 = when copter gets to home position it rotates it's head to takeoff direction independend of nav_controls_heading )) is not working , I was just 1 or 2 meter in hight for the test, no head rotate !

Regards
hinkel


Hi, Hinkel!
Thanks for the feedback!
The GPS part is currently unchanged, I wanted to rework the althold part first (using cm/s for hightchange, allowing autostart, iron out sonar issues) - that seems pretty much done. Currently changing the GPS logic...

IceWind wrote:For the autoland/autostart does it requires sonar?

Now I want to test that as well... ;)

No, sonar will just come in handy with obstacles (or close range stuff, like inspecting a roof etc..). Sonar is not neccessary for Autostart or Autoland. Sonar is supported in both modes, autoland profits a little more from it with faster grounddetection but sonar is no gamechanger for both modes. The readme.txt has all the dirty details..

Cheers Rob

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Harakiri aka multiwii port to stm32

Post by e_lm_70 »

Apparently the code is 5 months old on the repository : https://github.com/slashphotos/harakiri/

Do I look in the right place for get the latest code ?

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

Hi!
Look here: https://github.com/Crashpilot1000?tab=repositories
The 2.5 is the recent version, the "SGTodaysSnapshots" are the preparation for 2.6. The folders may be deleted/replaced with actual progress so check the repo. Sorry for no incremental stuff. Some folders have been deleted to clean up the repo from outdated/nonworking code.
BTW, i stumbled upon a very nice and short serial program, that is very good for cli (cut&paste etc) here: https://sites.google.com/site/terminalbpp/

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Harakiri aka multiwii port to stm32

Post by hinkel »

hinkel wrote: * the (( cfg.nav_rtl_lastturn = 1; // 1 = when copter gets to home position it rotates it's head to takeoff direction independend of nav_controls_heading )) is not working , I was just 1 or 2 meter in hight for the test, no head rotate

I make this test again issue is the same autoland is done but no head rotate ! :? on SG2.5 it is fine !
Have someone the same flight test issue ? I am missing some thing hmm ...
Regards
hinkel

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

Re: Harakiri aka multiwii port to stm32

Post by Crashpilot1000 »

hinkel wrote:
hinkel wrote: * the (( cfg.nav_rtl_lastturn = 1; // 1 = when copter gets to home position it rotates it's head to takeoff direction independend of nav_controls_heading )) is not working , I was just 1 or 2 meter in hight for the test, no head rotate

I make this test again issue is the same autoland is done but no head rotate ! :? on SG2.5 it is fine !
Have someone the same flight test issue ? I am missing some thing hmm ...
Regards
hinkel


Thank you very much for retesting this! That can absolutely be the case and in 99% your observations are correct. The core routines are untouched, since they work very well, but I started changing some variables/names, so probably introduced some error there. But that is not a real problem since the pre versions are preversions... Currently thinking about the best way to unf***/restructure the GPS part, damn where is that TC when you need a good idea...
Stay tuned and cheers
Rob

alistairr
Posts: 51
Joined: Thu Sep 26, 2013 10:30 am

Re: Harakiri aka multiwii port to stm32

Post by alistairr »

scrat wrote:
alistairr wrote:WooHoo!! I'm flying. Only a quick flight on the front lawn in the dark at midnight.


What did you do?


Well the I've been using PuTTY to do CLI commands. Sometimes I can get in and sometimes it just keeps on spitting out jiberish, but I have enabled servo tilt, GPS, Sonar etc. It flys ok but when I engage RTH or PH it cuts the power and I switch it back off and the quad recovers. I'm still not sure if I am actually turning these features on or off as I mentioned earlier with GUI confusion. Crashpilot1000 previously told me to use MW2.1. I'll give MW2.2 and go when I get back from work in a weeks time. I'm an underground miner digging holes in the Australian outback so programming and electronics is definitely not my area of expertise....but I'm trying. And I'm having fun learning..

Is PuTTY the best way to access the CLI commands. I'm doing the ### to enter it. Sometimes it works - sometimes it doesn't

PacciK
Posts: 29
Joined: Fri Nov 01, 2013 12:59 pm

Re: Harakiri aka multiwii port to stm32

Post by PacciK »

First post....Hello !!!

Today was my first testflight with SG2.5 from the crashpilot rep.
Setup: Naze32 v4, QuadX small bird 50cm between props, Ublox Gps.
Everything works fine, Gps enabled, Acc calibrated, mag calibrated on the Quad with all wiring.
Checked all sensor values....Fine !
Board is mounted away from wiring, by about 15cm, in fact graphed MAG looks fantastic and very good looking sine.
PID's work well... smooth copter.
Baro not selected in any modes....reason is that I have not covered it with black foam yet.

3 Position switch assignment :
LO - gyro only
MID - GPS HOLD ,Horizontal, MAG
HI - GPS RTH, Horizontal, MAG

So I take it up, ( switch LO ), Coptier flies a treat. Stays Put. So everything's fine.
1 Minute into the flight after some smooth maneuvers, I engage MID ( GPS position hold ).

Copter shows good signs of wanting to stay in position ( its stock gains..for PH )
I move the copter slightly left and right, forwards and back. Nice n' smooth even under GPS ( no wind ..calm day ).
Returns to Horizontal perfectly and smoothly when i release the sticks. Niiiice !!

Bring it down to about 4 meters high, about 4 meters in front of me. Still in PH
After a few seconds ...say 10sec ..... WHOOP !!!! a HARD LEFT all by itself, and WHACK on the ground inverted.
The two right arms , including props break as it hit the ground still rolling left.
GoPro3 on the front didn't smack unfortunately.

Question..... What would be a good explanation for this ?

After relaxing for 30seconds to come to grip, I grabbed the phone, fired up the GUI, checked all sensor values, and they're still perfect...
Accelerometers textbook = 0,0,512.
Gyros 0.0 for all three of them,
Magnetometer...still perfect sine
Attitude...perfect
GPS.... still showed my exact position in google maps.

Realized that copter was still in PH switch MID.... ( so I didnt accidentally switch to another position......confirmed ! )
I carefully removed the props, and fired up the motors.
Motors worked well and responded to attitude changes as one would expect.

Again.... I think...what may have gone wrong.
The copter didn't even toilet bowl when Switched to position hold !! Therefore the Mag was working perfectly.

Still a bit shaken about it....
what could I have done wrong ?
I have the setup file available but could not attach it to this post....not even if renaming extension to jpg, png, pdf, txt... :/

Thanks for any info on this.....

hinkel
Posts: 109
Joined: Sun Sep 09, 2012 7:24 am

Re: Harakiri aka multiwii port to stm32

Post by hinkel »

Hi PacciK !
how many sats did you have in PH ?

Regards
hinkel

PacciK
Posts: 29
Joined: Fri Nov 01, 2013 12:59 pm

Re: Harakiri aka multiwii port to stm32

Post by PacciK »

Hi.. Hinkel,

I have a Ublox GS407 with Sarantel Antenna.
it was seeing 7 satellites.

I spent the first 8 minutes checking over the settings and making sure everything was OK.
Before Taking off, I checked again on the gui, and it was seeing 8 sats.

BTW.. the GPS was used on other copters before, and was working fine. Never crashed.
It was still working after the crash..I might add.

Knowing it got hit, i am hesitant to use it again, at least not after a very thorough test including giving it some nasty vibes and shocks to see if it holds and remains dependable.

Thanks Hinkel !!

Post Reply