Page 3 of 4

Re: Setup of RC receiver and another question

PostPosted: Thu Nov 11, 2010 10:09 am
by Tom
Did you do a "Read"? If the servos are moving correctly, than the neutral value must be correct as well.

Re: Setup of RC receiver and another question

PostPosted: Mon Nov 15, 2010 5:48 am
by TheBoD
Tom, thanks. I did the read but still no sign of servo readings on the servo tab.

Do you plan to post the changes in the source code that you made to allow the PWM inputs to work ?

I installed the hex output OK but I will try and trace the problem when I get some time next week. I did order a new GPS module from Sparkfun as per your recommendation.

I also notice that you have released a new version of the config tool (V0.5.1) - do you suggest that I download this and try it ?

Thanks for your help.

Re: Setup of RC receiver and another question

PostPosted: Wed Nov 17, 2010 7:01 pm
by Tom
Yes you can download the latest gluonconfig, but the old version should work fine too.

If you can move the servos normally in manual mode, than the neutral values in Servos should be around 1500. I don't know how it otherwise could work :-)

Let us know when you had some time to figure things out!

Re: Setup of RC receiver and another question

PostPosted: Thu Nov 18, 2010 8:51 pm
by Jippieee
Thanks for the update! I also had some strange problems with my pcm inputs (sometimes working, sometimes not) until I put in a delay on gluon strartup. I have an old "non micro controller" receiver so it surprised me a bit that a delay was necessary in this case.

Re: Setup of RC receiver and another question

PostPosted: Thu Nov 18, 2010 10:11 pm
by Tom
Thanks for the update!
How long was the update you needed? Should I increase it in the current code?

Re: Setup of RC receiver and another question

PostPosted: Mon Nov 22, 2010 3:31 pm
by Jippieee
I used a "vTaskDelay( 500 );" in control_init().

I guess your solution 0.5.1 by checking the input signals is better and does not cause startup delay.

Code: Select all
void control_init()
{
   int i;
   
   //ppm_in_open(); MOVED TO MAIN
   
   // Manual trim mode: the servo's neutral settings are defined by the RC-transmitters trim settings. See wiki.
   if (1/*config.control.manual_trim*/)
   {   
      
        for (i = 0; i < 6; i++)
         config.control.servo_neutral[i] = 1500;
         
      // The current position of the sticks on the RC-transmitter are
      // saved as the neutral values
      
        vTaskDelay( 500 );

        for (i = 0; i < 8; i++)
         config.control.channel_neutral[i] = ppm.channel[i];



Re: Setup of RC receiver and another question

PostPosted: Fri Nov 26, 2010 3:07 am
by TheBoD
Tom, I have now installed the LS GPS unit and it works fine. I have also bought a new 2.4Ghz radio control system as my original one was very old. This works fine and I can read the receiver values and run the servos OK via the Gluon module - however I still get no max/min/neutral values on the Servo tab page of the Config tool.

When I look at the C# source code for the Servo tab page I notice that you have the following code installed in the file ConfigurationModel.cs

// Due to an annoying bug
_model.ServoMin = new int[6];
_model.ServoMax = new int[6];
_model.ServoNeutral = new int[6];

for (int i = 0; i < 6; i++)
{
_model.ServoMin[i] = ac.servo_min[i];
_model.ServoMax[i] = ac.servo_max[i];
_model.ServoNeutral[i] = ac.servo_neutral[i];

}

You also have the following comment in the configuration tab page

if (_model.ServoMin != null) // EXTREMELY ANNOYING BUG
{
_tb_servo1_min.Text = _model.ServoMin[0].ToString();
_tb_servo2_min.Text = _model.ServoMin[1].ToString();

Why are these comments there ?

Thanks

Re: Setup of RC receiver and another question

PostPosted: Fri Nov 26, 2010 9:50 am
by Tom
The "annoying bug" I refer to has to do with the Model I use. The Model is needed by the GUI to show data on the screen. For some reason Visual Studio saves a serialized model in the resources file of this GUI. So instead of just creating a new one on creation on the GUI, it loads the model from the resource file.

What I understand is that the gluonconfig works OK, but the Servo's tab doesn't show any values?

Re: Setup of RC receiver and another question

PostPosted: Sat Nov 27, 2010 12:29 am
by TheBoD
Tom, just to let you know I have solved why I cannot see the servo max/min/neutral values in the config tool. The reason is that I am using XBee modules(running at 115200) for the communication but when I switch to the FTDI cable connection the serno max/min/neutral readings are there after I run the READ command.

I think the reason is that the configuration upload string beginning "CA" is more than 256 characters long so it overruns the input buffer on the XBee module so the entire string is deleted. I noticed this because when I ran the read command the input string in the bottom box of the Gluonconfig page was blank.

I will see if I can get the Xbee module to handle more than 256 characters in one block but I suspect this is a built in limit. The alternative is for me to fix the C code on the Gluonpilot and the C# code on the Gluonconfig tool to transmit the config data in two packets with a short delay in between to allow the Xbee to get the data across the link.

By the way the C# code in the Gluonconfig tool is well written and easy to follow .

Re: Setup of RC receiver and another question

PostPosted: Sat Nov 27, 2010 11:58 am
by Mitch
That's a good find. I expect the xbee buffer is 256 characters.