possible problem in fw/datalink

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

possible problem in fw/datalink

agressiva
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
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: possible problem in fw/datalink

Gautier Hattenberger-3
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"

Gautier

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
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel