Создание моделей для прошивки DeviationTX
Вы просматриваете редакцию с названием "Создание моделей для прошивки Deviation", сохраненную 16.02.2017 в 11:30 в Night_Ghost |
---|
первоначально это задумывалось как перевод этой статьи,
Введение.Давайте сначала отвлечемся от техники. Что особенного в прошивке DeviationTx? Стандартный (standard) режим микшера вовсе ничего особенного. Во всяком случае, он даже кажется немного менее мощным по сравнению с фирменной прошивкой передатчика. А вот расширенный (advanced) режим микшеров намного сложнее настроить, потому что вы должны понимать, как желаемое поведение управления дроном выражается через значения выходных каналов, а также как использовать микшеры (mixers) для получения таких значений выходов. Зато этот режим обеспечивает прямой доступ к внутренней работе микшеров, что делает его невероятно мощным. Что в этом документеПосле этого вводного материала и обзора устройства конфигурации модели, этот документ проведет вас через полную установку для современного коптера и самолета с использованием режима Advanced. Начиная с базовой конфигурации - четыре канала плюс канал выбора режима полета, которые есть у всех современных полетных контроллеров. После небольшого введения, объясняющего как выяснить привязки канала, когда они не известны, речь пойдет об использовании расширенных функций deviationTx. По пути будет рассмотрено как настроить конфигурацию канала, основную конфигурацию страницы, автоматически изменяя выходные значения, и все остальное, что по моему опыту может оказаться полезным. Как бонус, будет раздел, рассказывающий про все вещи, которые можно сделать с помощью кнопок Тримов, кроме как использовать их в качестве триммеров. Предполагаемая аудиторияЭтот документ предназначен для опытных RC-пилотов. По правде говоря, я сейчас не верю что прошивка DeviationTx подходит для начинающих, хотя прогресс в этой области есть. Из-за этой целевой аудитории стандартный режим не будет рассмотрен. Возврат долга это обязанностьСообщество DeviationTx является особенным. Они свободно обмениваются конфигурациями моделей и трюками микшеров в форумах. Информация в данном документе происходит почти исключительно из этих форумов. Некоторые небольшие его кусочки именно мои, но большая его часть поступила из форумов, хотя я и изложил это собственными словами. Про некоторые моменты я могу вспомнить где нашел, но далеко не про все. Так что вместо того чтобы рисковать пропустить кого-то, кто заслуживает упоминания, я буду благодарить сообщество в целом. Мои благодарность и уважение каждому в этой великой группы. Обзор главЭто введение в различные переменные, которые имеются в модели deviationTx. Эта информация из руководства по deviationTx, но я повторю ее здесь для вашего удобства. Значения входов и выходов обычно работают от 100% до -100%, что означает переход от полного значения в одном направлении до полного значения в другом, но также и от включенного к выключенному. Так как все значения в процентах, знак % будет использоваться или нет в зависимости от контекста. Многие переменные могут принимать значения до 150, а не 100, а максимальные и минимальные значения выходных сигналов можно задать явно. ВыходыСердцем прошивки deviationTx являются микшеры (Mixers) - сущности, позволяющие вычислить значения канала по определенному закону из входных значений. Конечная цель всех микшеров - получить определенное поведение для выходов передатчика, которые появятся на входе контроллера вашего дрона. Итак, давайте перейдем к ним в первую очередь. Каналы передатчикаВыходные каналы передатчика это те значения, которые он передает. Их число обычно соответствует количеству каналов на приемнике, и может варьироваться от всего лишь 1 до 12. Виртуальные каналыОдна из необычных особенностей deviationTx является наличие 10 виртуальных каналов. Они могут использоваться так же, как каналы передатчика, за одним исключением - они не передаются на приемник. Они полезны для создания промежуточных значений для использования в других микшерах. Вы увидите, как они используются при создании конфигураций модели. ВходыВходы включают в себя все элементы управления на передатчике, а также некоторые внутренние значения. Я не буду описывать физические элементы управления в деталях, так как они различаются в зависимости от модели передатчика, и вы уже скорее всего знакомы с ними. СтикиДве ручки управления, являющиеся основой передатчика радиоуправления. Они также имеют пару триммеров, располагающихся сбоку и снизу стика. В прошивке deviationTx они называются ELE (elevator, управление рулем высоты), AIL (aileron, элероны), THR (throttle, дроссель) и RUD (rudder, руль направления). Крутилки и слайдерыНекоторые пульты также имеют аналоговые ручки или ползунки, используемые в качестве входных данных. Они обозначены AUX #, где # цифра от 2 до 7. ТриммерыТриммеры обозначены как TRIM**D, где ** это его место: LH это левый горизонтальный (Left Horizontal), RV это правый вертикальный (Right Vertical) и так далее, или для крайних верхних _L для левого и _R для правого. Значение D это направление триммера: "+" для увеличения значения или "-" для уменьшения. КаналыЭто либо каналы передатчика либо виртуальные каналы. Можно использовать значение любого канала как входное значение микшера. Но на самом деле это предыдущее значение канала, так что можно использовать значение канала для микшера этого же канала, что позволяет создавать такие вещи, как каналы, удерживающие свое значение, а не фиксированное значение, или изменять значение по определенному закону ПереключателиЕсть разные штуки, которые могут быть использованы в качестве переключателя в deviationTx. Обычно они имеют значения 100% если включены и -100% когда выключены. Физические переключатели Как и любой современный передатчик, серия Devo имеет набор переключателей. Они отмечены наподобие GEAR#, MIX# and FMOD# где # это цифра, указывающая позицию переключателя. Она может быть 0 или 1 для двухпозиционного переключателя, для переключателя на три положения добавится 2. Каждый из них имеет значение, равное 100%, когда переключатель находится в соответствующем названию положении, и -100% в остальных случаях. Это использование очень удобно, но это не означает, что FMOD0 и! FMOD1 одно и то же: в положении FMOD2 значением FMOD0 будет -100% а значением ! FMOD1 будет 100%. Каналы в роли переключателей Все каналы могут быть использованы в роли переключателей. В таком случае любое значение больше 0 означает "Включено" а любое значение меньше или равное 0 - "выключено". Кнопочные выключатели Любые кнопки передатчика, включая те что используются для управления самим передатчиком, могут использоваться как виртуальные переключатели. Это требует настройки их как триммеров для виртуального канала, и использования этого канала в роли переключателя. Про это будет в оследней главе. PPMИ наконец, можно использовать DSC (он же тренерский разъем) передатчика для ввода PPM-сигнала. Это можно использовать для подключения к передатчику всего, что может выводить PPM. Типичные примеры это подключение второго пульта в роли ученика, и FPV очки с трекером. Такие каналы обозначены PPM #, где # это номер входного канала с 1 по 8. Обзор микшеровА теперь обзор микшеров deviationTx. Опять же, эта информация есть в руководстве deviationTx, но я включил ее для вашего удобства. Его величество МикшерМикшер принимает значение со входа, изменяет его каким-либо образом, а затем смешивает его в выходом предыдущего микшера, если есть. Каждый микшер имеет по меньшей мере четыре различных параметра, которые вы можете задать. Наиболее важным является Src - значение входа для этого микшера. Он может быть любым из всех тех источников, что перечислены в разделе Входы выше.
СмешиваниеСмешивание это последовательность микшеров. Они рассчитываются по порядку, смешивая входное значение, возможно измененное заданной кривой, смещается и масштабируется выход предыдущего микшера, как указано настройкой параметра MUX. Это новый параметр, который контролирует, как значение предыдущего микшера и выход этого микшера будут объединены. Доступны следующие настройки:
Для первого микшера в цепочке в роли выхода предыдущего микшера выступает предыдущее значение канала. Поэтому вы должны установить тип смешивания MUX первого микшера в состояние replace (заменить), за исключением особых случаев.Даже если вы хотите использовать это старое значение, лучше сделать это явно, подав на вход Src первого микшера значение этого канала и включив режим замены значения. Делая это, вы можете обработать значение при помощи кривой перед использованием, что невозможно при неявном использовании. Еще один новый параметр это Switch (переключатель). Если он в положении None, то микшер включен всегда. Если же переключатель задан то микшер активен только когда переключатель включен, иначе он выключен, и на выходе будет значение с выхода предыдущего микшера. А еще можно установить переключатель в состояния Trim и No Trim. В состоянии Trim значения триммеров этого канала будет добавлено к выходу микшера. Загрузка файлов .iniНаверное вы уже заметили, что нет иллюстраций настройки передатчика, которые обычно приводятся в инструкциях. Это потому, что различные типы передатчиков имеют радикально различный внешний вид, несмотря на то, что они предназначены для одной цели. Если вы хотите иллюстраций вашего передатчика, то прочитайте руководство по deviationTx для него.
Описание моделиКак можно предположить по расширению ".ini", файлы модели используют формат файлов настройки (.ini) Windows. Он разделен на секции, начинающиеся с заголовка секции в квадратных скобках, и последующих строк формата Переменная=Значение (name=value) Однако первая часть не имеет имени секции, и описывает глобальные настройки модели. Пример файла, который мы немного начали настраивать:
Так что это настройка для Blade 200 QX, режим микшеров Advanced (расширенный), и используется значок MINIQUAD.bmp. Как напоминание, режим микшеров не меняет содержимого файла, а лишь способ отображения настроек на экране пульта.
Секция radio просто описывает настройки протокола радиосвязи. Будучи из семейства Blade, квадрик использует протокол DSMX. Это довольно простая модель, и использует только 5 каналов. Это типично для многих мультикоптеров, так как они используют 4 канала для управления положением и один канал для полетных режимов. Далее, мы имеем:
Что задает режим работы протокола без телеметрии, поскольку приемник не поддерживает ее. Первый пример микшераОтносительно простой микшер для канала 1 мог бы выглядеть так:
Строка 1 говорит нам что это настройки для канала 1. Строка 2 говорит нам, что будет отображаться шаблон Expo & DR, задавая интерфейс передатчика. Строка 3 начинает секцию первого микшера. Строка 4 устанавливает вход (Src) для этого микшера на вход AIL (стик элеронов). Строка 4 это деталь реализации, просто показывает для какого канала данный микшер. Кривая, масштаб, смещение, переключатель и триммеры (Curve, Scale, Offset, Switch, Trim) не заданы, поэтому принимают значения по умолчанию 1-1, 100, 0, None и 1 (включено) по порядку. Это типичная настройка двух скоростей, переключающая канал 1 от 100% до 70% от входа AIL с помощью переключателя AIL DR. Пример микшера с использованием Кривой (Curve)Микшер с кривой мог бы выглядеть так:
В строке 4 задается тип кривой (Curve type) Экспонента (Expo). В строке 5 задается параметр кривой, точки (points). В данном случае применяется экспонента "35" к обеим половинам кривой. Последние настройки микшераПоследние настройки, которые можно увидеть в параметрах микшера это mux - тип смешивания микшера, и usetrim - принимающий значение 0 для отключения триммеров (режим No Trim), или отсутствует по умолчанию если триммеры используются (режим Trim). Помимо шаблона для микшера, существуют и другие настройки каналов, которые отображаются в разделе канала. Рассмотрим их в следующем разделе. Оснвная настройка моделиIn this section, we’re going to create a model.ini file for a simple five channel aircraft - the Blade 200QX. This is a four channel model with an on-board flight mode set by the fifth channel. That fifth channel gives me a chance to show a simple switch setup. As such, it should work for most four channel aircraft if you just ignore the section about the flight mode control. The first step is to configure the model. Go to the Model->Setup menu, change the name, select the protocol and the number of channels. Unless you’re flying a helicopter, set the model type to Plane or Multi (if it’s available and appropriate). Change the icon if you want to. Unless you know the model has telemetry, make sure it is off by selecting the protocol selector and changing it. After doing that for a Blade 200QX, I have the following in my model.ini file:
Simple mixersThe default configuration sets up the first four channels as simple mixers for the controls they are normally used for in that protocol. For now, we’ll assume that it’s right. So the first four channels in the model.ini file look like:
Channel 5 isn’t listed, because it’s not configured by default, even though there are five channels in the model. Only the first four channels are configured. As you can see, they are each a Simple mix with a 1-1 Curve with a Scale of 100 and an Offset of 0. While it’s possible to fly in this configuration, that’s not optimal. It’s normal to set up as second rate and possibly some expo, so let’s do that now. Expo&DR mixersI started with my normal ‘copter dual rates, using 35% expo on a 100% rate for the high rates, and a linear curve with 70% rates for the low rate. This is only applied to aileron and elevator, and both are toggled by the AIL DR switch. On the Mixer page, select one of those two mixes and set the type to Expo&DR. On the High-Rate mixer set the Curve to EXPO, select that and set the Value to 35. Set the Mid-Rate Switch to AIL DR1, and then set the Scale to 70. Now do the same for the other cyclic channel. The results for channels 2 and 3 are:
The two mixes are pretty much identical, and we’ve seen it before. So - no surprises so far. Setting up flight modesNow we need to control the flight mode. The 200QX uses the fifth channel for that, which is labeled GEAR. The relevant values or 100/0/-100 for the beginner, intermediate and expert flight modes. To enable that, you can use an Expo&DR mix. The High-Rate Curve is Fixed, with a Scale of -100. The Mid-Rate Switch is FMOD1. It stays Linked with a Scale of 0. For Low-Rate, the Switch is FMOD0 and the Scale is 100. The resulting channel is:
This should be obvious by now: in flight modes 1 and 2, the resulting mixer is enabled and it’s output replaces whatever was there. In flight mode 0, neither happens, so the first mixer’s output of 100 is used. However, you can use a switch as a source and do this with two mixers and mostly default values. So change the mix type to Complex with 2 Mixers. Set the first mixer to a Fixed Curve with a Scale of 0. Set the second mixer to a Min/Max Curve with a Source of FMOD0 and a Switch of !FMOD1. To do that, change the Switch selector to FMOD1 then select it to invert the switch. Make sure the Scale is set to 100. If you changed the previous Expo&DR mix, you’ll have to fix that. Now the channel looks like:
Much simpler than before. Now, in flight mode 1, the first mixers output of 0 is used. Otherwise, the second mixer is enabled, and it’s output is used. That is either 100 in flight mode 0, or -100 in any other flight mode. Since the only other flight mode where this mixer is enabled is flight mode 2, that’s the only one that gets the -100 value. These two techniques cover all switch configurations that use a single channel. Channel configurationWe’re almost ready to fly. We just need to tweak a few more things. Throttle holdThere’s one last thing that needs to be done to complete a model before I’d fly it. It needs a Throttle Hold switch. Since the engine is the primary source of energy in the aircraft, shutting the throttle down will minimize damage to everything involved in a crash. Your aircraft is always involved, but there may be property or even people as well, so killing the engine not only potentially saves you money, but is a good idea for safety reason. On most aircraft that can fly inverted, simply lowering the throttle won’t shut the engine down. For that matter, it won’t on many multirotors, including the 200 QX. Since you want this action to be as reflexive as possible, putting it on a switch means you do the same thing on every model, so we’ll do that. Setting up a safety switch is easy. Go to the Mixer menu, and then select the button with the THR label on it. Use the Safety selector to select the switch you want. In this case, we’re going to use Virt1 as a switch, for reasons I’ll explain shortly. Then set the Safe Val to -125. On most models, you should set that value to -100 initially, and only lower it if that’s not enough to properly stop the engines. Some ESC’s may assume that the less-than-100 value you start with is actually 100, and adjust their behavior appropriately. The 200QX doesn’t have that problem, but I found that at -100 it doesn’t shut itself off as expected. Channel 1 now looks like:
It just adds the values we changed from their defaults. Other channel configurationThe other things you might want to change on the channel configuration page are Reverse, Fail-safe, and the two Scale’s, though Reverse is by far the most common one. Reverse does just what it sounds like - it reverses the channel so that as the output from the mix goes from -100 to 100, the value sent to the receiver goes from 100 to -100. Even on aircraft and radios from the same company, this is sometimes necessary. While you could do this by negating the scale for every mixer in a mix, it’s easier to do it once on the channel configuration page. It also means you can work on the mix without having to invert your thinking. Similarly, the Scale’s act as a Scale on the output from the entire mix, and you would do it here for much the same reasons. It’s similar to the travel setting found on some proprietary transmitters. Fail-safe sets the failsafe value in the receiver. This only works for the Devo protocol. If you’re not familiar with it, it’s the value the receiver will output on this channel if it loses contact with the transmitter. Other nicetiesIf the THR Safety switch were a real switch, and not an unconfigured virtual channel, the model would be fine to fly now. So let’s fix that channel, and add a few other things that will make flying safer and more fun. Sticky throttle holdLet’s start with virtual channel 1, which I chose for the throttle hold switch. We’re going to create a sticky switch, that only goes off if the throttle output is actually 0. This means that you won’t turn off the hold thinking the throttle is off when it’s not, only to have the props start spinning - and the aircraft start flying - when you aren’t expecting it. This also handles cases where other switches may need to be in the right setting for the throttle output to be zero. So now on the Mixer page, find Virt1. Select that, and change the name to something like T Hold. Naming the virtual channels makes them a lot easier to deal with. Now back to the Mixer page, and edit the mix proper. Set the type to Complex and Mixers to 3. Set the first mixer - Page 1 - so the Src is T Hold, and the Curve is Min/Max. This reads the old value of the channel, and outputs -100 if the switch was off, and 100 if it was on. This normalizes the value, as we’ll be mangling it pretty badly soon. Go the the second mixer - Page 2 - and set the mux to add, the Src to THR, the Curve to 1-1, and the Offset to -1. So, the output from this channel will run from -1 to 199 if the switch was on before, so the switch would only go 0ff if the throttle output is -100 or -99, which is close enough for every model I’ve tried. If the switch was off, the output will go from -201 to -1, and the switch will stay off no matter what the throttle does. Finally, the third mixer - Page 3 - is a simple switch setup. Set the switch to RUD DR0, and the Curve to Fixed. The mux should already be replace. This mixer throws out the previous mixer output if the RUD DR switch is in position 0, and passes that previous value through if the switch is in position 1. Our virtual channel should look like this:
So now RUD DR0 turns on the throttle hold, and RUD DR1 won’t turn allow it to be turned off until the throttle output goes to -99 or -100. A sticky throttle hold. Ok, now it’s time to deal with the different transmitters. If you have a Devo 8, 10 or 12, you can use the switches I’m going to use. If you have a Devo 6, you’ll have to pick different ones, but it’s actually got better names for this configuration. You can, for instance, use HOLD1 for the hold switch. If you have a Devo 7e - well, it can be made to work. If you have extra switches installed, you can use those by changing the names. If not, you’ll want to look through the last section - on Trim buttons - to get everything set up. A simple mixThe 200QX, like many quadcopters, tends to lose lift when it starts moving sideways. This is something that is normally compensated for with a mix in proprietary software. Personally, I don’t like doing this, but it’s a matter of taste. So I’ll show you how to add compensation in the throttle mix. Please note that I have not flown with this mix in place, so you’ll want to test it yourself! Go the Mixer page, and open the mix for THR. Change it from a Simple to a Complex mixer. If you look through the first mixer, you’ll see that it’s still the same mixer you had in the simple mix. This is generally the case. Changing the mix type won’t change the mixes, at least if they are all still there. Now set Mixers to 3. Go the the second Page, and set the Src to AIL, the Curve to ABSVAL, the mux to add, and the Scale to 20. The ABSVAL Curve means the offset of the AIL will be used, not the actual value. The Scale is a guess for what percentage of the aileron offset we need to add to the throttle. Now repeat the process on Page 3 with ELE as the Src. Your new throttle channel should look like:
Note that No Trim was also on in the new mixers. Also, if you start moving on a diagonal, both aileron and elevator inputs will be added to your throttle, which may not be desirable. But you’ll have to tune this yourself. TimersIf you’ve looked at the main page and played around some, you may have figured out that the top number on the left is the throttle output. But the other two haven’t moved. Those are timers, and we’re going to set them up now. Since the motors turn whenever throttle hold is off, I want the timers to run when throttle hold is off, as that means the motors are running. For many aircraft, setting the Switch to THR will be a better timer, as it runs when the throttle output is above -100. However, running when it’s above -100 also means that the T Hold channel, which works fine as a switch for the throttle Safety, won’t work as a switch for a timer. So we need a new channel. So, back to Mixer page, pick another virtual channel, and set the type to Simple, the Src to !T Hold, and the Curve to Min/Max. Give it a name like DT Hold (for Display Throttle Hold). Note that you can’t use !DT Hold as the switch and not invert the Src. This is a bug in the timer code, but should be fixed in the next release. Go to the Model menu, and then the Timers page. Set Timer1 to a countdown timer, Switch to DT Hold, Reset sw to ELE DR1, and Start to 9:00. The Switch setting will cause the timer to only run when the throttle is not held. When first setting up a model, you should probably set this Timer1 to stopwatch. After you’ve flown a few times and gotten a feel for how long the batteries last, change it back to countdown. The transmitter alarm will then go off 30 seconds before the timer runs out, and every 10 seconds after that to warn you that it’s time to land. Those two times can both be set on the Transmitter config page, under Timer settings. Now go down to Timer2, and set it to permanent. Again, set the switch to DT Hold or THR, whichever you used for Timer1. so it runs whenever Timer1 is running. This timer always counts up, and is saved between flights. It will record the total flight time on the model. If your model needs regularly scheduled maintenance, this is the timer to use for that. If you now go back to the main page and tick the throttle up, both timers should start running. Here’s what my timer config looks like in the model.in file:
Channel monitorGo to the Model menu, and then Main page config. If you have a color touch screen, select the plus sign at the top. On either display, find the Menu 1 item and change it’s value from Telemetry monitor to Channel monitor. Now a long-press on the UP button will bring up the channel monitor, which is useful for checking your mixer. Toggle iconsOne - well, three - last things to do, and then we’re ready to fly. These really are just display tweaks, and won’t affect the flight at all. I have to apologize in advance - here is one of the few places where the different transmitters configuration is radically differently. How you set these up, which ones are on by default, and what icons are available are different depending on the transmitter. Go to the Main page config. If you have a black and with display, find Toggle1, and use the source selector next to it to select T Hold. Now select the Toggle1 button, use the Down button to select Pos 1, and then the Left button to select an icon to indicate throttle hold. If you have a color touch screen, select the box labelled Pos 1, and then select the wrench icon. Now change the RUD DR source to T Hold, select Edit, select Pos 1 and then a throttle hold icon. If there is a toggle using ELE DR as a source, change the source to FMODE Otherwise, pick an unused toggle and set it’s source to FMODE. When you edit it, you will see that it has POS 0, POS 1 and POS 2 unless you’re using a Devo 7e. Change the icons for all three to something appropriate for the flight modes that switch enables. Finally, edit the icons used in the AIL DR toggle and set position 1 to a low rate indicator. Going back to the main page now, you’ll see that your selected throttle hold icon goes on when the throttle is held, the low rate indicator goes on when you are in low rates, and the flight mode is displayed on the screen. While I don’t recommend looking at the transmitter when you’re flying, it’s nice to be able to check these things before you take off. Finding RTF & BNF channel mappingsThe techniques used for basic model setup will work on most kits and RTF and BNF models from the companies that created the protocols. But they don’t always work with off-brand RTF and BNF models, since some of those companies don’t sell transmitters except as replacement parts for specific models, and will change the protocols and channel mappings seemingly at random. So if you’ve got one of those, you may have to work out what channels actually do what. This problem doesn’t arise with proprietary firmware - you either fly the manufacturer's models or models that license their protocol, and normally can’t change protocols. If you can, it’s only to that manufacturer’s protocols. And even if you could get an unlicensed model to bind, the firmware isn’t designed to let you change the channel mapping. Since this problem is unique to open source firmware, we’ll take a detour to talk about how to handle it when you set up a model. The best way to find the channel mapping for a model is to search the web for it. rcgroups.com is a good source, but not the only one, so you might search google as well. But if that doesn’t turn anything up, you’re going to have to experiment with things yourself. Experimenting to find the channelsThis is a simple idea - just try things and see what they do. This should be done in deviationTx’s advanced mixer mode, since you can’t change the channel source in standard mixer mode. But there are some precursors you’ll need to deal with. First things first: Take all the propellers off the aircraft! This is a critical safety step, as it may go to half or even full throttle the first time you bind it. Some RTF aircraft - especially the toy-grade ones - may require some stick input to bind. Normally, that’s going to full throttle and back down. If so, you’ll have to try each channel in turn to see if the aircraft binds. Once you get it to bind, You know where the throttle channel is. ThrottleIf you didn’t find the throttle in the bind process, watch the control surfaces when you bind. If the throttle doesn’t go on when you bind it, then the throttle is correct. If the throttle goes on, try raising the throttle stick and see what response you get. If the throttle output changes - especially if it goes down - you’ve find the throttle. If nothing happens, then one of the other channels is probably the throttle. Try them one at a time until you figure out which is the throttle, and then if necessary rearrange your channels so the throttle stick controls the throttle on your aircraft Other control surfacesThe other control surfaces are simple after that. Just try them, and see what responds. If the wrong thing moves, you’ll want to rearrange your channels. Rearranging channelsWhile doing this experimentation, you may need to rearrange the flight control channels to be different from the default settings. This is easiest to do if you just swap the control with the channel it should be on. When you look at the mixer settings, the first few channels will have a button with a label that looks like #-????. The # will be the channel number, and the ???? will be the usual usage for that channel and protocol. There is also a button labelled Simple, which is the type of the mix, and a label which initially matches the ???? on the button, which is the current input source for that channel. If the elevator stick currently controls the aileron, you’ll want to swap those. So find the two channels that currently have the labels ELE and AIL not on a button. Those are the two you want to swap. To change the input used by a channel, select the Simple button. Then find the Src selector, and move it to the input you want to control that channel. The four controls are always in the same order, no matter what protocol you use: AIL, ELE, THR, RUD. Finally, select Save and you’re done with that channel. Other controlsAt this point, you’ve got the basic controls working right, so you need to figure out any other channels that may exist. They come in four basic flavors. Toggles. Channel high gets one behavior, channel low gets a different one. Like lights on and off. Multi-value toggles. Like toggles, but with more than one behavior and output values. Like flight modes in the 200QX config we just finished. Edge-triggered. Usually on a button. Causes something to happen when the channel goes from high to low or vice versa. Like taking a picture. Analog. Uses a range of values like a flight control. Like a camera gimbals position or speed control. For toggles and edge-triggered controls, assign a switch as the source for the suspected output channels, and just try them one at a time. If nothing happens, throw the switch the other way to see if it changes. If it’s a toggle, you can change the sense of the switch by inverting the source in the mixer - see the section on fine tuning below. If you want an actual button, you can use the deviationTx grim button switch features. See the last section for how to set these up. For multi-value toggles, you either need some indication from the aircraft when it changes mode, or documentation on what ranges do what. If you get an indicator, then use an analog input as a Src for the suspect channels. Go to the Channel monitor page on your controller. Now adjust the analog control, and when you get the indicator you want, note the value for that channel on the monitor. Later, you can set things up on switches as described for the 200QX flight mode controls. If you don’t have any spare analog inputs, you can use an trim buttons to create a full-range analog control. Details are in the last section. WLtoys channel hacks.Just a warning. The older WLToys aircraft - anything using the FlySky protocol - use a hack to simulate extra channels. And I mean hack in the sense invoked by the phrase “repairing furniture with an axe”. The protocol is still a four channel protocol. However, the controller will use values in one of the existing channels well outside the normal range. The flight control board will strip these values off, and treat it as an extra channel. The WLToys option in the deviationTx implementation of this protocol uses channels 5–8 as switches to control those extra high values - at least as they were in the v9x9 quadcopters. Later aircraft apparently use the same hack, but not quite the same way. In particular, some of the implemented version create a throttle value way above the normal range, and later WLToys aircraft will try and use that value for the throttle. This is not a good thing. Reversing a channelIf the throttle starts at full when you bind with the throttle stick down, or a control works backwards, you need to reverse the channel. This is something that also happens with proprietary firmware, so you may be familiar with it. The best way to reverse a channels output is to select the channel button - the one with the channel number and control on it for the ones we’re talking about. Then select the button that says Normal so it says Reversed, and select Ok and you’re done. There are other ways to reverse a simple channel, but this is the one that always reverses the output, and won’t require more work with a more advanced configuration Throttle safetyIf you’ve had to change the throttle channel, there’s one last thing to do. When you first load a model, either by turning the controller on or using the model load menu, deviationTx will not try and bind until the throttle is at a safe level. If you’ve changed the throttle this will check the wrong channel, meaning you could bind with the throttle up, and will probably have to clear the warning about the wrong channel every time you use this config. While you can set all of these levels, they aren’t editable on the controller. So, the first step is to plug your controller into a USB port on your computer. Then turn the controller on while holding the ENT button. This is the same thing you did to install the file system when you installed deviationTx on the controller. In the disk that this puts on your computer, you want to edit the file models/model#.ini, the file corresponding to the model number for your aircraft. Any text editor should do, but check the deviationTx forums if you have problems. Find the [safety] section. It should have one line in it, that says Auto=min. Change that to be Ch#=min, where # is the channel number that controls the throttle. This will cause deviationTx to check that channel instead of the default throttle channel for this protocol. If you are getting warnings about Ch3 being the wrong value, this means that Auto isn’t working right for some reason. Changing this to be your throttle channel as above will clear that up. Advanced model setupOk, we’ve set up a simple model. But so far, we’ve not done anything that good proprietary firmware can’t do. Even modest firmware should be able to do everything but the sticky throttle hold. So now it’s time to get serious about this. A panic switchThe Blade 200 SRX has a Panic switch that changes the flight mode to beginner mode, and disables the cyclic inputs. While I’m not sure if that’s a good idea, it’s easy to implement with deviaitonTx. In the AIL and ELE channel configurations, set GEAR1 as the Safety, and set the Safe Val to 0. For channel five, the Safety is again GEAR1, but the Safe Val is 100. We’ll look at the gear channel in a second. The aileron channel is now:
As you can see, all we’ve done is changed it so the GEAR1 switch disables the cyclic inputs. Since it also switches the flight mode to beginner, the 200QX will auto-level. While we’re doing this, it might be a good idea to add an icon to the main page to indicate that it’s on. So back to the Main page config. and get to the list of toggles. Pick an unused toggle, set it to GEAR, and then edit it to set an appropriate icon for Pos 1. Stagility modeStagility mode was invented by someone using proprietary firmware. They did it by mixing the cyclic controls on a Blade 350QX into the flight mode channel to kick it from Stability to Agility mode - or Intermediate to Expert mode on the 200QX. We can duplicate that, and do it better by not mixing into the flight mode channel, but using the mix as a switch that changes the flight mode channel properly. First warning: “stagility mode” on the 200QX is not supported by Blade or Horizon Hobby, and the flight controller on the 200QX has been known to become disoriented by rapidly changing the flight mode. So use this mode at your own risk. Second warning: The 200QX version 2 firmware in 3d mode has an intermediate flight mode that has stagility-like behavior. Using this mode there is pointless, and not recommended at all. The first step is to create a channel that will be an on switch with enough cyclic input, and off otherwise. There are a number of options for doing this, but let’s set up what I use and then talk about the others. Pick an unused virtual channel on the Mixer page. Change the name to Stagility. Now edit the mix. Change it’s type to Complex (what else?) and set up 3 Mixers. The first mixer will have a Src of AIL, and a Curve of ABSVAL. The second will have a Src of ELE, Curve of ABSVAL and a mux of max. So we now have the output of the second mixer being the larger offset of the two cyclic controls. Other alternatives include a mux of add, or being mathematically accurate and multiplying each cyclic by itself and then adding them. However, taking the max works well in practice. This means we now have a value between 0 (no cyclic) and 100 (one or the other at full cyclic). The third mixer is going to provide the offset to make this so the switch will sometimes go off. If you leave off the third mixer, flight mode 1 would just be expert mode. So we’re going to add a Fixed Curve with a Scale of -80 and a mux of add. This means one of your cyclics will have to be 80% of the way to the edge to trigger the switch to expert mode. The gear channel also needs a minor tweak. Change the first mixer Curve to Min/Max, the Src to Stagility, the Scale and Offset to -50. We’re repeating the technique used in the second mixer, only this time with the Stagility switch. Using Min/Max here means the output values will be 0 and -100. Well, after applying the Scale and Offset to the initial value of -100 and 100, they’ll be 0 and 100. So our Gear channel with the updated mix and Safety now looks like:
Much the same as before: if the FMOD switch is not in position 1, we output -100 and 100 depending on whether or not it’s in position 0. If it’s in position 1, instead of just outputting 0, we output either 0 or -100 depending on the sticks and that third mixer in the Stagility channel. Dialable stagility modeThe downside to all this is that changing the stagility behavior means you have to change the mix, which is clumsy. There ought to be an easier way. And sure enough, there is. Instead of using a Fixed curve for the third mixer in the Stagility channel, let’s pick an analog input source. I’m using a Devo10, so I can just pick AUX5. if you don’t have a convenient dial or slider, see the last section on tricks with trim buttons to see how to turn a trim into an analog input. So, back to the Mixer page, and then the third mixer in the Stagility channel. Set the Src to AUX5 or whatever you are using for your analog input. Set the Curve to 1-1, the Scale to 50 and the Offset to -55. This means that as AUX5 goes from -100 to 100, what gets subtracted from the cyclic offset - and hence how much offset is needed to trigger expert mode - will go from 101 to -99. So when AUX5 is all the way down, you just have stock intermediate mode. Dialed all the way up to 100, then the slightest motion off center will turn on agility mode. And of course, you can get all the behaviors in between. Now that we’re done with it, here’s the Stagility channel:
The difference between this and the non-dialable version is only the third mixer, which had a Fixed curve. Of course, the reality is that you may want to adjust the Offset here to make sure that you actually get a blue light when in flight mode 1 with AUX5 dialed to +100. Stick calibration, trim, and who knows what might be enough to kick it up to turning on expert mode. Given how important AUX5 has become, let’s put it on the main page. Unfortunately, you can’t do that directly - we need to make it available in an output channel. So to the Mixer page, and pick an unused virtual channel. Name it St Dial or something similar for “stagillity dial”. Set the type to Simple, the Src to AUX5, the Curve to 1-1, the Scale to -50 and the Offset to 51. This makes the output value goe from 101% to 1% as AUX5 goes from -100% to 100%. It’s now how much you have to offset the cyclic sticks to switch to agility mode. To display it, go to the Main page config page, and find the unused box. Or add one if you need to, and position it where you want it. I put it underneath the timers and above the rudder trim indicator on my Devo 10. Set the input to St Dial, and you’re done. I could add the St Dial channel here, but I don’t think you need it. One last thing you might do is create a safety for AUX5, just to remind you to set it when you load this model. I know I like having that. So plug your transmitter into the USB port on your computer, hold down the ENT key, and power it on. In the disk that this puts on your computer, you want to edit the file models/model#.ini, the file corresponding to the model number for your aircraft. Any text editor should do, but check the deviationTx forums if you have problems. Find the [safety] section. It should have one line in it, that says Auto=min. Below that, add a line that says AUX5=min. That will cause deviationTx to check that input as well as the throttle channel when this model is loaded. If it’s not in the position where the sticks don’t change modes, it reminds you to correct it. Initialize the flight controllerOk, one last tweak that you can’t do with most proprietary controllers. Right now, you have to do a stick dance to initialize the flight controller. We’re going to automate that, so that turning off throttle hold initializes the flight controller. First, we need a moving value just to start with. The Delay mux setting gives us that. So choose a virtual channel, give it the name Delay, and set Mixers to 2. The first mixer should have a source of T Hold and a Curve of Min/Max. If you remember, the output of T Hold covers a wide range. Using a Min/Max curve causes it to go back to -100 to 100. Now add the delay. Literally. Set the second mixer Curve to Fixed, and the mux to delay. Set the Scale to 3 to start with. You’ll want to experiment with that, though. Here’s the resulting Delay channel.
We now need to use this moving value to make the rudder channel cycle as required by the 200QX. So change it from a Simple mix to a Complex mix. Leave the first mixer as is, and change the second one to have a Src of Delay, a mux of add, and a 5 Point Curve. Select the Curve button so you can set the points in the curve. You want them to be 0, 100, 0, -100 and 0 in order. We are going to be adding either the first or last value to the rudder all the time it’s not initializing, so they need to be 0. In between, you need to have a 100 and a -100 in that order. I put the extra 0 in the middle because I like symmetry, but it could be at either end as well. I now have:
You will want to experiment with the Scale value on the Delay channel. I can set it to 2 and things still work, but they don’t if I set it to 1. I also know it works at 5, and presumably 4. I set it to 3 because I want to avoid possible boundary problems from it being 2. Advanced Flight Mode SettingsWhile the 200QX is a great multirotor, it’s an older flight controller and only has 3 flight modes, which works very well with the 3-position switches on Devo transmitters. However, modern flight controllers have 5 or more flight modes, and the ability to use a single channel to set them. Four or five flight modes with two switches are both easy, you just need to set up a three position switch for three flight modes, then add a mix that’s switched on a second switch, and outputs either a fixed value or the value of one of the other switch positions. Here’s a five-way switch on FMODE and MIX. MIX0 causes FMODE to control the ouput for vlues of 100, 50, 0, and then MIX1 outputing 50 and MIX2 100.
The first two mixers are the same as the previous flight mode selection, except that the scalar and offset move it to the values we want. The last mixer is similar to the second one: when MIX0 is not on, disable this mix, so we use the value selected by FMODE. Otherwise, use the value selected by MIX1 and MIX2, again with a scalar and offset to get the desired values. This clearly doesn’t work with if you need six flight modes. In this case,a 2-position switch and the Mult mux type can be used, like so:
This uses the GEAR switch to toggle between positive and negative values based on FMODE. For GEAR1, FMODE goes from 10o to 67 to 33, and GEAR1 negates those values. The add mux type can be used to do something similar. Set up a three-positions switch to output values of 100, 67, 33, and then use a final mix enabled by the second switch with an add mux type, fixed curve type, and a scalar of -100. Tricks with trim buttonsNormally, trim values are associated with an output channel, and the trim value is added to the channel after the mix value is calculated. But deviationTx has an incredibly flexible trim support, and can do a lot more than that. Not only can trims be used to create a variety of different kinds of switch behaviors, the configuration buttons can also be used as trim buttons. This lets you create controls that aren’t available on your transmitter. Of course, these means you get no feedback on their value like you do with a real switch. Toggle icons on the main page can help with that. Because of their use as normal trim buttons, these extra controls interact oddly with output channels. If you want to use one as a Src in some mixer, you have to make sure there is No Trim on that mixer, otherwise the trim will get added twice, making the output go from -200 to 200. This means it has to be in a Complex mix so you can set No Trim. If you want to use an output channel as the switch instead of a virtual channel as described below, then you have to make sure you have No Trim instead of Trim, otherwise it’ll be added twice. Of course, this also means the mix configuration doesn’t really matter, so long as the output is always 0. But this usage isn’t documented, so the behavior may change in the future. I again recommend sticking with virtual channels unless you’ve run out. As a final note, the navigation buttons only work on the main page. If you’re not on the main page, they don’t do anything. For the non touch-screen transmitters, this means that the ENT button can’t be used, because you use it to start configuration! It works fine on the touch-screen transmitters, though. Similarly, you want to be careful about using the UP and DOWN buttons as momentary switches, as holding them down will cause you to jump to the shortcut page, which will disable changes on it and leave it on. A momentary buttonNone of the Devo transmitters have any kind of momentary button. There’s really no good way to simulate them with switches. When configured, these buttons provide a 1 when the button is down, and a 0 otherwise. For the 200QX config, you could use one to reset the timers. Momentary buttons are also great for edge-triggered controls, like the WLToys cameras. I use one for changing flight modes on the Blade NanoQX. So let’s create one. Go to the Mixer page, and pick an unused virtual channel. Rename it to Reset. Set the mix type to Complex with 1 Mixers. Set that mixer to have a Src of Reset, a Curve of 1-1 and a Scale 0f 0. Make sure the Trim is on. Your channel should like like this:
Now got to the Trims page. Choose an unused trim, and set the Input to Reset, and the Trim Step to Momentary. The Momentary setting, like the other switch settings, is to the left of the 0.1 value in the Trim Step selector. Finally, set the Trim + to Exit. In the model.ini file, you get:
You now have a switch that will be on when you’re holding down the EXT button, and off otherwise. A toggle buttonIf you use the above configuration except set the Trim Step to Toggle, the channel value will toggle between -100 and 100 every time you press that button. They are great for things that you can see the effect of on the aircraft, especially if they are cosmetic in nature. Turning lights on and off, for instance. In the 200QX model, you could use one as the switch for the last mixer in the T Hold channel, but the possibility of bumping it and shutting down the motors while in flight makes me a bit leary of that. One interesting use of these is for tracking an edge-triggered control’s state. You can set up a second virtual channel and a second virtual switch that uses the same button for Trim +, but has a Trim step of Toggle instead of Momentary. If you set up a main page toggle to use this switch, it will change the icon every time you press the button. So you can use it as a flight mode icon on the NanoQX, or to note when video is recording on a camera that uses that button for start and stop. The channel setup is identical to the momentary button, except you probably want to use a name like Lights. As state, the Trim Step is Toggle. Here’s a model.ini showing a pair of trims providing a momentary and toggle on the TRIM_L+ button on the Devo 10:
Note that value settings in the model.ini file. It’s the last value of this trim. Like any other trim value, it is saved between sessions. You’ll want to watch out for that if you depend on it being in the right state when you first load the model. A switchThe toggle switch above has the problem that you need to know the current state in order to know what state you’ll get when you push it. If you instead configure it with an On/Off Trim Step, you get to use one button to turn it on, and a second to turn it off. This makes a nice way to create an extra two-way switch on a transmitter that doesn’t have enough of them. On the 200QX config, one might make a nice panic switch, or you could use one for dual rates. Of course, it does require two buttons, so I recommend using the ones that are already paired. The throttle trims are available on all transmitters, and unused in most models. Some transmitters have extra pairs of trim buttons. And they all have Left/Right and Up/Down button pairs. Again, the configuration is pretty much the same as before, except that Trim Step is now On/Off, and you have to configure the Trim - button as well. So here’s what the model.ini looks like for an On/Off trim pair:
Adding an analog inputAgain, this doesn’t add a new capability, but provides an extra control should your transmitter run out. For the 200QX config here, you could use this for the Stagility dial. The channel setup is the same as for the switches above. Either a virtual channel with a 1-1 Curve, 0 Scale and Trim, or an output channel with an output of 0 and No Trim. But for these, we are going to use the numeric steps of the trim buttons, not the ones below .1. You get 100 steps in each direction. So if you set the Trim Step to 1, the trim value will go from -100 to 100. If you want a shorter range, you can set the Trim step to less than 1. If you want a longer range that -100 to 100, that’s a bit more work. You can’t get it directly, no matter what you set the Trim step to. Even using an output channel with Trim on the mix won’t work. You can use the virtual channel as a Src and leave Trim on in the mix. But in that case it’s probably better to just set the Scale instead. These are still trim values. As such, the have features common to all trim values:
And here’s a model.ini example with a 1.0 step using the Left and Right buttons, with MIX as a switch:
In this case, the step value has a meaning. The Trim Step will be one tenth of this value. A three position switchAs a special case of the above, you can create a three position switch. Unfortunately, it won’t show up with three positions in the various switch and source settings in the configuration. You’ll need to use two more virtual channels to get those. For the 200QX, this could provide a flight mode switch on a transmitter that doesn’t have a three position switch. Star by setting up the virtual channel as usual. Let’s call it FMODE0. As a switch, it will only be true in the -100 position. The trim configuration is just the analog input as above with FMODE0 as Input, except set the Trim step to 100. It now moves between the three values -100, 0 and 100 as you use the up and down buttons. Now set up a second virtual channel. It’s going to be FMODE1. It’s a Complex mix, with 1 Mixers. That mixer has a FMODE0 as the Src, an ABSVAL Curve, Scale is -1, and offset is 1. No Trim, of course. And now the third, as FMODE2. Another Complex mix with 1 Mixers. Src is again FMODE0 (make sure you use the virtual channel, not the switch if you already have one!), Curve is 1-1 and Scale is -1. And again, No Trim. These three virtual channels, when used as switches, will follow the trim values as expected. FMODE2 will be on and the others off when the trim value is 100. FMODE1 when it’s 0, and FMODE0 when it’s -100. Here’s what you get in model.ini with all of them together:
|
Свежие комментарии
Очень красиво!
Много подобных фонарей, видел в китайском магазине Алиэкспресс. Я там часто покупаю… »
Это бесполезно :( Если мне доводится проезжать мимо, то набираю по 6-10 картофельных мешков… »
clopman16:
Да, я понимаю. Они и тушенку выбрасывают, не открыв даже.. и газовые баллоны почти полные.… »
clopman16:К слову говоря -в одиночку спускаться через эту расщелину с лодкой и тактическим рюкзачком… »
Night_Ghost:
про расщелину ту я высказался еще тогда когда мы вместе в ту сторону шли. В дождь с грузом… »
clopman16:
кстати от блюдца влево на сумган (теперь правда не блюдца а куска профнастила) - дорога… »
Night_Ghost:
В начале прошлого года еще читалась, хотя и плохо, но идти по ней проблем не было. Похоже… »
clopman16:
над каким бревном?
Night_Ghost:
над одним из бревен через Атышку мы протянули канат для удобства перехода. Но судя по… »
clopman16:
веревок точно не видел, мест для пересечения Атышки было три. Сразу после спуска - лежало… »
Night_Ghost:
мы шли с другой стороны - от Атыша, веревку вешали на втором дереве, ну да, где-то 20см… »
Прям-таки "свидетельства выживших", блин. О том как в +10 и дождь от переохлаждения погибла… »
clopman16:
Не слышал. Можно подробнее? Разумеется после такой вылазки были внесены изменения в… »
Night_Ghost:
Когда писАл графоманию про Перевал Дятлова, перерыл пол-интернета на тему ЧП в походах, и… »
clopman16:
я чтото помню лет 5-7 назад группа школьников при переходе на Атыш от 71км, вляпалась в… »
Night_Ghost:
Любой выход из города с легкостью превращается в треш и кошмар, стОит чему-то пойти не так.… »
clopman16:
Классен Вадим.
на Зубчатках..
Night_Ghost:
Земля пухом...
Но я не о персоналиях, а о том что в противостоянии "один человек против… »
Как непосредственный участник вышеописанных безобразий, внесу свои 5 копеек.
1. Фонарь был… »
clopman16:
Хм, а у меня четко отложились воспоминания -что дорогу приходилось "запоминать". Наверное… »
clopman16:Мне в прошлом году пришлось двигаться по Лемезе (подходили к Атышу) тоже в около-ночное… »
Night_Ghost:
Тут от тумана зависит. Если можно поднять фонарь так чтобы он вышел из дымки, либо опустить… »
clopman16:
смотрю что китайские монокли, ночного видения неприлично дешевы, интересно как они в таких… »
Night_Ghost:
Тут только пробовать. Разница температуры воды и воздуха может дать засветку.
Я кажется… »
clopman16:
В 2015 у меня был момент когда с наступлением темноты, последние 5 км навигации по Большому… »
Night_Ghost:
Это очень рисковано. Река живет своей жизнью, немного меняя русло каждый год во время… »
clopman16:
кстати а что тогда все таки утонуло?)
Night_Ghost:
Не понял вопроса. Мой навигатор, например, ну и я по плечи почти при причаливании. Что… »