forked from paparazzi/paparazzi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
if_calib.[ch] -----> rc_settings.[ch]
- Loading branch information
Pascal Brisset
committed
May 17, 2006
1 parent
b16a6c4
commit 2a63c57
Showing
13 changed files
with
77 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** \file rc_settings.h | ||
* \brief Variable setting though the radio control | ||
* | ||
* The <rc_control> section of a XML flight plan allows the user to change the | ||
* value of an autopilot internal variable through the rc transmitter. | ||
* C code is generated from this XML code (var/AC/inflight_calib.h). This | ||
* module handles the control of this setting mode. | ||
* | ||
* Note that this functionnality is deprecated since datalink use is a lot more | ||
* easier (<dl_settings> section) | ||
*/ | ||
|
||
#ifndef RC_SETTINGS_H | ||
|
||
#include "std.h" | ||
#include "radio.h" | ||
|
||
#define RC_SETTINGS_MODE_NONE 0 | ||
#define RC_SETTINGS_MODE_DOWN 1 | ||
#define RC_SETTINGS_MODE_UP 2 | ||
|
||
#if defined RADIO_CALIB && defined RADIO_CONTROL_SETTINGS | ||
|
||
#define RcSettingsOff() (rc_settings_mode==RC_SETTINGS_MODE_NONE) | ||
|
||
#define RC_SETTINGS_MODE_OF_PULSE(pprz) (pprz < TRESHOLD1 ? RC_SETTINGS_MODE_UP : \ | ||
(pprz < TRESHOLD2 ? RC_SETTINGS_MODE_NONE : \ | ||
RC_SETTINGS_MODE_DOWN)) | ||
|
||
#define RcSettingsModeUpdate(_rc_channels) \ | ||
ModeUpdate(rc_settings_mode, RC_SETTINGS_MODE_OF_PULSE(_rc_channels[RADIO_CALIB])) | ||
|
||
extern uint8_t rc_settings_mode; | ||
void rc_settings(bool_t mode_changed); | ||
|
||
|
||
#else /* RADIO_CALIB && defined RADIO_CONTROL_SETTINGS */ | ||
|
||
#define RcSettingsOff() TRUE | ||
|
||
#endif /* ! (RADIO_CALIB && defined RADIO_CONTROL_SETTINGS) */ | ||
|
||
#endif // RC_SETTINGS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters