[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] possible problem in fw/datalink

From: Gautier Hattenberger
Subject: Re: [Paparazzi-devel] possible problem in fw/datalink
Date: Thu, 02 Apr 2015 00:53:35 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

DlSetting refers to a macro generated in the settings.h file based on the xml settings file. So this part is correct. Only the comment is wrong, it should be "no dl_settings section in settings files"


Le 02/04/2015 00:45, Eduardo lavratti a écrit :
Well, analyzing the firmware/fixedwing/datalink.c i see this peace of code:

#ifdef DlSetting
            if (msg_id == DL_SETTING && DL_SETTING_ac_id(dl_buffer) == AC_ID) {
              uint8_t i = DL_SETTING_index(dl_buffer);
              float val = DL_SETTING_value(dl_buffer);
              DlSetting(i, val);
              DOWNLINK_SEND_DL_VALUE(DefaultChannel, DefaultDevice, &i, &val);
            } else if (msg_id == DL_GET_SETTING && DL_GET_SETTING_ac_id(dl_buffer) == AC_ID) {
              uint8_t i = DL_GET_SETTING_index(dl_buffer);
              float val = settings_get_value(i);
              DOWNLINK_SEND_DL_VALUE(DefaultChannel, DefaultDevice, &i, &val);
            } else
#endif /** Else there is no dl_settings section in the flight plan */

I think the correct is #ifdef DLSETTING instead of #ifdef DlSetting in the first line ! right ?

BTW, what means "there is no dl_settings section in the flight plan" ?

I think this code is used to get/send config values by the ground station.

Paparazzi-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]