MultiWii v1.prebis7 released

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

MultiWii v1.prebis7 released

Post by Alexinparis »

MAIN SOFT: anti yaw jump modification for multi with 4 motors or more

ALL: BI COPTER is now a avatar style implementation, still in beta
    on a pro mini: 9 motor left, 10 motor right, 11 servo left, 3 servo right
    on mega: 3 motor left, 5 motor right, 6 servo left, 2 servo right
ALL: addition of Y4 (not tested)
    on a pro mini: motors 9,10,11,3
    on mega: motors 3,5,6,2
    REAR1 , FRONT R , REAR2 , FRONT L
ALL: addition of HEX6X (not tested)
    on a pro mini: motors 9,10,11,3,6,5
    on mega: motors 3,5,6,2,7,8
    REAR_R , FRONT_R , REAR_L , FRONT_L , RIGHT , LEFT
LCD: implementation of TextStar LCD tanks to Hamburger & gtrick90 code

OSD: implementation of MIS code thanks to Rurek

CAM triger option:
    a servo can be connected on digital pin A2 (pro mini) to activate the trigger of a camera
    the option can be activated or deactivated via the button configurator pannel AUX1/AUX2
    #define CAM_SERVO_HIGH 2000 // the position of HIGH state servo
    #define CAM_SERVO_LOW 1020 // the position of LOW state servo
    #define CAM_TIME_HIGH 1000 // the duration of HIGH state servo expressed in ms
    #define CAM_TIME_LOW 1000 // the duration of LOW state servo expressed in ms
    the PIN on arduino mega is also A2, but this is not the final PIN mapping
CAM stab (servo tilt) button option:
    the servo tilt option can be activated or deactivated via the button configurator pannel AUX1/AUX2
MAIN SOFT: servo range for tricopter
    #define TRI_YAW_CONSTRAINT_MIN 1020
    #define TRI_YAW_CONSTRAINT_MAX 2000
MAIN SOFT: compass lock now works
    the option can be activated or deactivated via the button configurator pannel AUX1/AUX2
    the lock is activaed 1s after the stick release
    the lock is maintained only if the YAW stick in centered +/- 50
MAIN SOFT: HMC5883 integration (beta)

MAIN SOFT: there was a bug on servo tilt (it came back to zero at around 45deg due to a variable overflow)

GUI: the memory leak bug GUI is corrected

MAIN SOFT: correction of anti yaw jump problem at full throttle

The code is on the googlecode repository
This code is as usual compatible with everything developed before
including the very low cost setup: WMP only + promini + standard 4ch receiver

Rurek
Posts: 30
Joined: Sun Jan 30, 2011 1:28 pm

Re: MultiWii v1.prebis7 released

Post by Rurek »

Great, Alex!!! THX for support OSD in MWC code :)

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

Re: MultiWii v1.prebis7 released

Post by copterrichie »

Thank you Alex, I am testing the BiCopter segment now. Looks good so far. One thing, We will need to add a means of adjusting trim of each of the servo separately because it is very had to center each servo with linkage only.

arnaldo
Posts: 49
Joined: Sun Mar 06, 2011 4:53 pm

Re: MultiWii v1.prebis7 released

Post by arnaldo »

compass works fine now? if i use wm+ and nunchuk how do i connect this?

BHI
Posts: 2
Joined: Wed Mar 16, 2011 2:55 pm

Re: MultiWii v1.prebis7 released

Post by BHI »

Hi Alex,
I'm developing a smal consol box to avoid to bring my computer to the field. This is based on a ProMini and use the LCD 2x16 of the project.
This console doesn't need any changes to the MultiWii software and use the serial communication as if it was the MultiWiiConf application. I use 4 buttons coming out the NK (recycling...).
Objectves: modifying all parameters, but also visualize RC levels and motors command level as with the Conf application, but without the graphs.

I'm now working on the V1.prebis6 version, I was not able to download the V1.prebis7 until now.

My question is: when the Conf application make a write to the MultiWii, the message is 16 bytes (char) lenght, but the MultiWii is waiting for 18... Am I wrong or is there a problems I didn't see?

Thanks,

BR

Bernard

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: MultiWii v1.prebis7 released

Post by Alexinparis »

Hi,

I don't catch your explanation

the following are the 22 bytes sens from the GUI

Code: Select all

   s[0] = 'C';
   s[1] = byteP_ROLL;  s[2] = byteI_ROLL;  s[3] =  byteD_ROLL;
   s[4] = byteP_PITCH; s[5] = byteI_PITCH; s[6] =  byteD_PITCH;
   s[7] = byteP_YAW;   s[8] = byteI_YAW;   s[9] =  byteD_YAW;
   s[10] = byteP_LEVEL; s[11] = byteI_LEVEL;
   s[12] = byteRC_RATE; s[13] = byteRC_EXPO;
   s[14] = byteRollPitchRate;
   s[15] = byteYawRate;
   s[16] = byteDynThrPID;
   s[17] = activationLevelByte;
   s[18] = activationBaroByte;
   s[19] = activationMagByte;
   s[20] = activationCamStabByte;
   s[21] = activationCamTrigByte;


received on the arduino side:

Code: Select all

'C' detection
+
      for(i=0;i<3;i++) {P8[i]= Serial.read(); I8[i]= Serial.read(); D8[i]= Serial.read();}
      PLEVEL8 = Serial.read(); ILEVEL8 = Serial.read();
      rcRate8 = Serial.read(); rcExpo8 = Serial.read();
      rollPitchRate = Serial.read(); yawRate = Serial.read();
      dynThrPID = Serial.read();
      activateAcc8 = Serial.read();activateBaro8 = Serial.read();activateMag8 = Serial.read();
      activateCamStab8 = Serial.read();activateCamTrig8 = Serial.read();

Geni
Posts: 3
Joined: Fri Feb 11, 2011 1:51 pm

Re: MultiWii v1.prebis7 released

Post by Geni »

Hi Alex,
first congratulations for your great work. I have now completed my first Tri and the first successful jump behind me.
Now follow error is noticed:
My SW is MultiWii1_prebis7 (73) with Jeti RMK2 and multiplex (uni-mode) and Servo min. 950 max. 2050.
Now if yaw is moved to left, the tail servo moved for me properly to the right site.
As soon as 90% to left, the tail servo moves fast to full left deflection.
My workaround is to limit the servo travel in the transmitter to 88%.

Thanks
Geni

BHI
Posts: 2
Joined: Wed Mar 16, 2011 2:55 pm

Re: MultiWii v1.prebis7 released

Post by BHI »

Hi,

I was talking about version 1prebis6:

MultiWii code: read 18

Code: Select all

    case 'C': //GUI to arduino param
      while (Serial.available()<18) {}
      for(i=0;i<3;i++) {P8[i]= Serial.read(); I8[i]= Serial.read(); D8[i]= Serial.read();}
      rcRate8 = Serial.read(); rcExpo8 = Serial.read();
      accStrength8 = Serial.read();
      rollPitchRate = Serial.read(); yawRate = Serial.read();
      dynThrPID = Serial.read();
      writeParams();
      break;


MultiwiiConf code: write 16

Code: Select all

  int[] s = new int[32];
   s[0] = 'C';
   s[1] =  byteP_ROLL;
   s[2] =  byteI_ROLL;
   s[3] =  byteD_ROLL;
   s[4] =  byteP_PITCH;
   s[5] =  byteI_PITCH;
   s[6] =  byteD_PITCH;
   s[7] =  byteP_YAW;
   s[8] =  byteI_YAW;
   s[9] =  byteD_YAW;
   s[10] = byteRC_RATE;
   s[11] = byteRC_EXPO;
   s[12] = byteACC_STRENGTH;
   s[13] = byteRollPitchRate;
   s[14] = byteYawRate;
   s[15] = byteDynThrPID;
   for(int i =0;i<16;i++)    g_serial.write(char(s[i]));

toshirotamigi
Posts: 8
Joined: Fri Mar 18, 2011 3:47 pm

Re: MultiWii v1.prebis7 released

Post by toshirotamigi »

I've done a very simple addition to the GUI/firmware:
Battery voltage value is displayed in the GUI.
This can be of some interests for simple telemetry when using some sort of wireless connection. tested in short range using bluetooth.
I'll post after some other tests later this evening, as soon as I came back from office.

Alessio

toshirotamigi
Posts: 8
Joined: Fri Mar 18, 2011 3:47 pm

Re: MultiWii v1.prebis7 released

Post by toshirotamigi »

as promised:
this is the modification in firmware (just add the "serialize8(vbat);" where shown in the following code:

Code: Select all

 
      serialize8(activateCamStab8);serialize8(activateCamTrig8);//82
     serialize8(vbat);  // <-- AM: added to send vbat
      serialize8('A');


Add the following pieces in the configuration tool:

Code: Select all

int graph_on = 0;
float volt = 0;  // <-- add this line, after row 79
float mot0=1000,mot1=1000,mot2=1000,mot3=1000,mot4=1000,mot5=1000;


this line after row 264:

Code: Select all

text("Cycle Time:",230,285);text(cycleTime, 330, 285);
 
text("Bat:",xGraph-7,yGraph-20); text(volt/10,xGraph+60,yGraph-20);  // <-- add this line

time1=millis();
 

Add the following line after original row 773 as shown:

Code: Select all

      activationCamTrigByte = read8(); //82
       volt = read8(); // <-- add this line     
      if ((present&1) >0) nunchukPresent = 1; else  nunchukPresent = 0;


then, in row 736, change 83 with 84

Code: Select all

  int frame_size = 84; // <-- change 83 to 84 (1 byte is added for vbat value)


PS: check the battery value with a voltmeter to see if the value shown is correct you may have to adjust the
VBATSCALE value at row 94 in firmware to trim some differencies.

Alessio

Post Reply