MultiWii

vatanuki

как это ничего? 😃 а это?

***Control mode***

- main PITCH/ROLL/YAW PID modification (r1474)
  - the sticks scaling is no more affected by PID coefficients
  - yaw rate (to the right of the PIDs in GUI) now works as stick scaling
  - default yaw rate is increased (with yaw rate at 0)
  - yaw PID principle is now different from PITCH&ROLL PID:
    - yaw ITerm windup is very high, allowing an 'elastic' direction return after a manual perturbation
    - yaw ITerm is also constrained with a windup independent limit
    - yaw PTerm is constrained in order to counter the yaw jump effect.
      use yaw DTerm to increase this constrain (r1573)
    - yaw ITerm is canceled if the yaw stick is not centered

- Throttle angle correction (r1374)

- Advanced Headfree mode added (see config.h for instructions) (r1374)

- DYNBALANCE option, individual motor can be controled via GUI, to test individual vibration
  

- better gyro & acc calibration accuracy (r1546)
  

- cannot arm is baro mode is on (r1550)
  
  ! baro mode should be activated only when the multi is nearly Z stable !
- only one baro mode : vario around a throttle deadband (r1554)

- magHold is reset when arm is switched on (r1553)
  

- ONLYARMWHENFLAT option (r1587)
  



***receiver & UART***

- RCSERIAL is now deeply integrated. If a MSP_SET_RAW_RC comes, it will just override legacy RX data. (r1420)
  as a consequence, RCSERIAL is no more an option

- no RC averaging for Spektrum & SBUS (r1545)

- SBUS center define (r1568)
  

- FAILSAFE_DETECT_TRESHOLD configurable



***GPS***

- Enables sonar altitude from i2c-gps-nav board (1424)

- navigation code will follow after 2.3



***GUI***

- Gui with Servosettings. (r1441 & r1450)
  All models with servo included.

- GUI globalsettings (for some settings previously only in config.h)

- do not display /dev/cu.* devices but only corresponding /dev/tty.* (r1442)

- GUI baudrate as configurable setting



***LCD***

- lcd.telemtry: show max ground speed from gps data (r1398)

- lcd.telemetry: allow separate suppression of aux2 configuration (r1456)

- new display support 1.3" i2c OLED from  (r1413)

- config.menu: when abort, revert all values back to last saved state

- visual feedback from servos during midpoint trim via LCD



***IMU and baro***

- correct GYRO_SCALE for all gyro (r1428)

- no more small angles while shaking the board (r1579)
  

- baro Alt based on ground temp compensation (r1570)
  

- not I reset for FIWEDWING (r1590)
  

- add 6DOF LSM330 sensor (r1571)

- add ACC BMA280 sensor (r1600)



*** SERVO management ***

warning:
The pins for coptertypes with servos have been changed.
Attaching a servo to a motor pin can quickly destroy your servo.
All connection diagrams out there from v2.2 or older are no longer valid for v2.3 with servos using hardware PWM.



- add 8 hardware PWM's for servos on MEGA boards. Servo outputs are 44,45,46,11,12,6,7,8 (r1384)

- Allow any servo refresh rate from 20 to 400Hz on Mega hardware PWM servos. (r1386)

- Tri servo moved to SERVO4 (pin11) on mega boards with HW PWM's. (r1392)

- a32u4 (nanoWii, MicroWii etc) HW PWM for 4 servos; warning different pins!!
  (with lots of info and help from ronco)
  (r1464 & r1470)

- add a generic way to configure servo settings : conf struct + MSP read/set messages (r1383)

- Added general servo handler (r1421 & r1429)
  

- allow preset of some servo stuff from config.h (r1432)

- Gui with Servosettings. (r1441)

- add gimbal servo stretcher usable with HW PWM's. (r1384)
  We can get 180 degrees servo move without servo modification.
- note about gimbal: settings for neutral&endpoints are no more in config.h, but only in GUI

- do not update servos during unarmed calibration of sensors which are sensitive to vibration (r1408)



***internal improvements***

- migration to a cpp/h code structure (r1515 & r1516)
  
  

- huge flash size optimization (around 1k)
  thanks to fine struct definitions + serialization over MSP (r1369)

- make powermeter computation time based (again) to reduce config hassle and increase accuracy (r1375)

- read at most one analog channel per MWii main loop cycle (r1375)

- smoothing of RX_RSSI (r1379)

- make faster analog reads an option with default off to increase accuracy (r1375)

- detangle vbat & buzzer dependancy (r1375)

- optimization : small approximation bit shift used instead of * or / number
  for TPA, rates, dynP, dynD and expo curb (r1376)

- Added checking for flash content change, and reload config parameters in this case. (r1389)

- split Serial into Serial(core UART management) & Protocol (r1548)

- loop is globally faster



***add-ons***

- option to suppress defaults in mwc sketch and load via gui from file instead (r1365)

- add OVERRIDE_PSENSORPIN option (r1375)

- manual for using Multiwii in Eclipse environment
  

- add amperage to MSP_ANALOG (r1542)

- MY_PRIVATE_DEFAULTS (r1559)
  

- no more than one MSP per port and per cycle
  should smooth the delay while requesting MSP, especially for USB port on micro

или только одним гпс пользоваться? 😃
если думать как Вы то сидеть нам на 98 виндовсе:)

omegapraim

А чего из нужных функций нет сейчас в маховии? Честно вот мне сейчас прошивки достаточно а ненужный хлам типа включать по 1му двигателю из гуи для проверки вибрации мне нафиг не нужно)))) Но я выражаю чисто свое мнение.

Кстати подумываю вообще перейти на RC2 чет она мне больше нравится, мягче и приятнее летала чем RC3

mahowik
omegapraim:

да над писать автору в личку или на почту.

никуда писать не надо… все подробно расписано в дневнике rcopen.com/blogs/83206/17033

vatanuki:

интересно будет ли маховий на базе 2.3 ?

как уже писал в дневнике, пока не вижу в 2.3 чего то принципиально нового и интересного… даж полет по точкам не доделан…

omegapraim

Саш а нафиг он нужен то этот полет по точкам? для этого ведь мегапират есть. Лучше бы совершенствовали и доводили то что есть, а не делали мегапирата 2.8))))

mahowik
vatanuki:

как это ничего? а это?

Все верно. Изменений много, но в основном рефакторинг и бесполезные мелкие фичи, либо то что у меня уже давно есть, типа Advanced Headfree mode, Throttle angle correction или baro Alt based on ground temp compensation…

omegapraim:

Саш а нафиг он нужен то этот полет по точкам? для этого ведь мегапират есть.

банальная конкуренция смежных проектов 😉

omegapraim:

Кстати подумываю вообще перейти на RC2 чет она мне больше нравится, мягче и приятнее летала чем RC3

в RC2 (на базе 2.1) меньше периферии и меньше нагрузки на проц, потому она возможно покажется более мягкой, но я не заметил…
НО всеЖ лучше RC3, т.к. последние плюхи и заморочки касательно гпс режимов, удержания высоты и ее дин. регулировки + real time калибровки и т.д… все там… да ты и знаешь в общем 😉

еще возможно ты ИНС не отключил, а она недонастроена и тоже проц. жрет хорошо…

omegapraim

Я с лета летаю на твоей прошивке и все супер, но есть моменты))))) Кстати по поводу переферии я тока гпс пользуюсь и ОСД и соответственно всей (в осд) есть все данные также в ней можно и пиды подстроить, а тогда зачем нужна телеметрия? В общем Летают обе прошивки замечательно это факт и я не могу сказать что одна лучше или хуже другой, я поскольку я имею часть своей собственной периферии то у меня есть нюансы.

vatanuki
mahowik:

как уже писал в дневнике, пока не вижу в 2.3 чего то принципиально нового и интересного

нет, так нет - я просто просил и не настаивал что надо обновлять:)
а то сразу както в штыки:)

mahowik
vatanuki:

нет, так нет - я просто просил и не настаивал что надо обновлять
а то сразу както в штыки

нет нет 😃 т.е. никаких штыков 😃
вот тут чуть подробнее rcopen.com/forum/f123/topic221574/9783

serenya
omegapraim:

А смысл делать маховий 2.3, в этой прошивке нет почти ничего нового

Вроде как появилась инструкция как допилить токовый датчик на 2.3

omegapraim:

Саш а нафиг он нужен то этот полет по точкам? для этого ведь мегапират есть.

mahowik:

банальная конкуренция смежных проектов 😉

А как же религиозная составляющая😁

romeo84

Спасибо!

mataor:

вы вообще полезли в абсолютно левые дебри…
вот чтение собственно сигналов:

#if defined(STANDARD_RX)

#if defined(FAILSAFE) && !defined(PROMICRO)
  // predefined PC pin block (thanks to lianj)  - Version with failsafe
 #define RX_PIN_CHECK(pin_pos, rc_value_pos)                        \
   if (mask & PCInt_RX_Pins[pin_pos]) {                             \
     if (!(pin & PCInt_RX_Pins[pin_pos])) {                         \
       dTime = cTime-edgeTime[pin_pos];                             \
       if (900<dTime && dTime<2200) {                               \
         rcValue[rc_value_pos] = dTime;                             \
         if((rc_value_pos==THROTTLEPIN || rc_value_pos==YAWPIN ||   \
             rc_value_pos==PITCHPIN || rc_value_pos==ROLLPIN)       \
             && dTime>FAILSAFE_DETECT_TRESHOLD)                     \
               GoodPulses |= (1<<rc_value_pos);                     \
       }                                                            \
     }

а в функции void computeRC() получаем готовые значения в массив rcData[chan]

или же у вас OpenLRS плата?

и вообще подробней объясните задачу (какой контроллер?, зачем и что нужно? и т.д. )

Плата Crius SE v 0 2, а зачем это нужно - хочу задействовать вход AUX3.

============

И ещё вопрос: скачал MultiWii 2.3, пытаюсь настроить вертолётный режим (HELI_120_CCPM) Так вот, никак не могу инвертировать серво… Подскажите плз, у кого получалось

mataor
romeo84:

хочу задействовать вход AUX3.

так задействуйте… в конфиге есть все для этого

serenya

На 328 меге аукс3-4 доступны только через сум-ппм.

mataor
serenya:

На 328 меге аукс3-4 доступны только через сум-ппм.

хех… кто тебе такое сказал? 😛

я уже делал подобное, жертвуеш ненужной сейчас ногой, небольшая добавка кода - и вуаля все 4 аукса

п.с. - вспоминать лень, делать по типу

 #if defined(PROMINI)
    #if defined(RCAUXPIN)
    /* this ISR is a simplification of the previous one for PROMINI on port D
       it's simplier because we know the interruption deals only with one PIN:
       bit 0 of PORT B, ie Arduino PIN 8
       or bit 4 of PORTB, ie Arduino PIN 12
     => no need to check which PIN has changed */
    ISR(PCINT0_vect) {
      uint8_t pin;
      uint16_t cTime,dTime;
      static uint16_t edgeTime;

      pin = PINB;
      cTime = micros();
      sei();
      #if defined(RCAUXPIN8)
       if (!(pin & 1<<0)) {     //indicates if the bit 0 of the arduino port [B0-B7] is not at a high state (so that we match here only descending PPM pulse)
      #endif
      #if defined(RCAUXPIN12)
       if (!(pin & 1<<4)) {     //indicates if the bit 4 of the arduino port [B0-B7] is not at a high state (so that we match here only descending PPM pulse)
      #endif
        dTime = cTime-edgeTime; if (900<dTime && dTime<2200) rcValue[0] = dTime; // just a verification: the value must be in the range [1000;2000] + some margin
      } else edgeTime = cTime;    // if the bit 2 is at a high state (ascending PPM pulse), we memorize the time
    }
    #endif
  #endif

кстати тут же если сделать одну мааааленькую правку - уже получаем работающий аукс 3

serenya

Ну то что код подшаманить можно это понятно, а это был ответ на

mataor:

так задействуйте… в конфиге есть все для этого

romeo84
mataor:

хех… кто тебе такое сказал? 😛

я уже делал подобное, жертвуеш ненужной сейчас ногой, небольшая добавка кода - и вуаля все 4 аукса

кстати тут же если сделать одну мааааленькую правку - уже получаем работающий аукс 3

Благодарю. Сейчас попробую реализовать… Отпишусь как получится. Ведь явно не хватает двух ауксов…

PS Блин, как же тяжело без отладки что-либо делать ((

romeo84

Итак, если кому надо,

добавляем каналы AUX2, AUX3, AUX4 в прошивку MultiWii 2.3, Плата Crius multiwii se

  1. Раскомментить в config.h (строка 388)
#define RCAUXPIN8
#define RCAUXPIN12

так как иначе эти пины настроятся будут работать не на вход, а на выход на всякие там BUZZERы и т.д.

  1. В RX.cpp разрешаем прерывания от нужных нам пинов
/*************    atmega328P's Specific Aux2 Pin Setup    *********************/
    #if defined(PROMINI)
     #if defined(RCAUXPIN)
        PCICR  |= (1 << 0) ; // PCINT activated also for PINS [D8-D13] on port B
        #if defined(RCAUXPIN8)
          PCMSK0 = (1 << 0); PCMSK0 |= (1 << 3); PCMSK0 |= (1 << 4);
        #endif
        #if defined(RCAUXPIN12)

        #endif
      #endif
    #endif
  1. В RX.cpp настраиваем обработку прерываний от этих же пинов и формируем значения в ауксах от приёмника
/*********************      atmega328P's Aux2 Pins      *************************/
  #if defined(PROMINI)
    #if defined(RCAUXPIN)
    /* this ISR is a simplification of the previous one for PROMINI on port D
       it's simplier because we know the interruption deals only with one PIN:
       bit 0 of PORT B, ie Arduino PIN 8
       or bit 4 of PORTB, ie Arduino PIN 12
     => no need to check which PIN has changed */
    ISR(PCINT0_vect) {
      uint8_t pin;
      uint16_t cTime,dTime;
      static uint16_t edgeTime;
      static uint16_t edgeTimeAux[4]; // 0 не используется, 1 для aux2, 2 для aux3, 3 - резерв
      static uint8_t auxIntLast; // сохранённое состояние битов порта B после предыдущего прерывания
      uint8_t auxMask; // маска для определения изменённого входа порта B

      pin = PINB;
      auxMask = pin ^ auxIntLast;   // doing a ^ between the current interruption and the last one indicates wich pin changed
      cTime = micros();
      sei();
      auxIntLast = pin;          // we memorize the current state of all PINs [B0-B7]

      if (auxMask & 1<<0) { // если меняется бит 0 порта B (выход D08 на плате), то формируем aux2
        if (!(pin & 1<<0)) {     //indicates if the bit 4 of the arduino port [B0-B7] is not at a high state (so that we match here only descending PPM pulse)
          dTime = cTime-edgeTimeAux[1]; if (900<dTime && dTime<2200) rcValue[0] = dTime; // just a verification: the value must be in the range [1000;2000] + some margin
        } else edgeTimeAux[1] = cTime;    // if the bit 2 is at a high state (ascending PPM pulse), we memorize the time
      }

      if (auxMask & 1<<4) { // если меняется бит 4 порта B (выход D12 на плате), то формируем aux3
        if (!(pin & 1<<4)) {     //indicates if the bit 4 of the arduino port [B0-B7] is not at a high state (so that we match here only descending PPM pulse)
          dTime = cTime-edgeTimeAux[2]; if (900<dTime && dTime<2200) rcValue[1] = dTime; // just a verification: the value must be in the range [1000;2000] + some margin
        } else edgeTimeAux[2] = cTime;    // if the bit 2 is at a high state (ascending PPM pulse), we memorize the time
      }

      if (auxMask & 1<<3) { // если меняется бит 3 порта B (выход D11 на плате), то формируем aux4
        if (!(pin & 1<<3)) {     //indicates if the bit 4 of the arduino port [B0-B7] is not at a high state (so that we match here only descending PPM pulse)
          dTime = cTime-edgeTimeAux[2]; if (900<dTime && dTime<2200) rcValue[3] = dTime; // just a verification: the value must be in the range [1000;2000] + some margin
        } else edgeTimeAux[2] = cTime;    // if the bit 2 is at a high state (ascending PPM pulse), we memorize the time
      }


    }
    #endif
  #endif

Работает замечательно. Единственное, если выдернуть из платы провода всех ауксов, то вновь добавленные принимают хаотичные значения (то есть все, кроме aux1). Видать, где-то надо добавить дефолтное значение, если сигнала на пин не поступает. Где это делается - искать уже оочень в лом.

Вот итоги 3-х часового мучения и поиска багов в собственном коде… Подскажите, кто как отлаживает код? …перепрошивать девайс по 10 раз для того, чтобы фиг знает как угадать, что не ту переменную подставил это анреал мучения ))

flygreen

Народ, попробовал в Криус 2.0 SE залить base 2.1 от Маховика . Все работает кроме бародатчика. Чего не так могу делать ?

Или она изначально со старыми платами нефунциклирует ?

PS При этом обычная 2.2 работает…

Leon11t
flygreen:

Народ, попробовал в Криус 2.0 SE залить base 2.1 от Маховика

А вы прочтите пару последних абзацов и все станет понятно 😃)

Dhole
flygreen:

Или она изначально со старыми платами нефунциклирует ?

Гриш, Саша ваял свою прошивку под All in One, а там иной баро, нежели в SE.
И спецыяльно отмечено, что с иными вариациями MultiWii прошивка может работать криво, например.

Хотя - работает ))

Если охота поиметь все плюшки, то надлежит брать AOIP.

mataor

для старого баро есть файлик ИМУ с пометкой бмп085, но такого резултата как с мс5611 недобьетесь, будет в пределах метра-полутора бултыхаться
там разница и в коде, и в пидах

ну и оба варианта на мпу6050 рассчитаны соответственно