setup aux command from code not gui

This forum is dedicated to all issues and questions related to your individual setups and configurations
Post Reply
Archit
Posts: 4
Joined: Thu Jul 23, 2020 10:21 pm

setup aux command from code not gui

Post by Archit »

Hi guys, I am using a custom made board with atmega328p and want to use a ublox neo 6m gps serial module.
Since I don't want to use and I2C lcd for configuring and GUI can't access serial with serial_gps I want to know how can I set gps_hold to be activated at AUX2=2000 .I am using Arduino ide .I want to just upload the code whilst preset for aux2 to activate gps hold. :!:

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: setup aux command from code not gui

Post by PatrikE »

At boot the code will check if the gps is connected otherwise it will be setup as a regular serial port.
So you can connect the ftdi and configure the settings in the Gui.
Then plug the GPS and reboot for flight.

Otherwise you need to find where gps hold is activated by AUX in mwii.cpp.
You will also need to set Alt hold and Mag hold boxes too.

/PatrikE

Archit
Posts: 4
Joined: Thu Jul 23, 2020 10:21 pm

Re: setup aux command from code not gui

Post by Archit »

PatrikE wrote:
Fri Jul 24, 2020 12:21 pm
At boot the code will check if the gps is connected otherwise it will be setup as a regular serial port.
So you can connect the ftdi and configure the settings in the Gui.
Then plug the GPS and reboot for flight.
/PatrikE
Atfirst I also thought the same but sadly it doesn't work that way, once gps_serial is defined config won't work . :roll:
PatrikE wrote:
Fri Jul 24, 2020 12:21 pm
Otherwise you need to find where gps hold is activated by AUX in mwii.cpp.
You will also need to set Alt hold and Mag hold boxes too.
I tried that but its too much stuff hence i thought someone may be knowing how that gets done like the developers.
Thanks anyways (I thought no one will reply as multiwii is old and no more developed so no one on forum)

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: setup aux command from code not gui

Post by Hamburger »

if it was configurable via the desktop gui in the aux* section, you could also add something like this to your config.h

Code: Select all

    for(uint8_t i=0;i<CHECKBOXITEMS;i++) {conf.activate[i] = 0;}
    conf.activate[BOXHORIZON]  = 0x05; // aux1 Low oder high
    conf.activate[BOXVARIO]    = 0x02<<((4-1)*3); // aux4 M +
    conf.activate[BOXBEEPERON] = 0x04<<((4-1)*3); // aux4 H
    conf.activate[BOXBARO] = 0x04<<((2-1)*3); // high aux2
not your actual code but you get the idea

Post Reply