eeros_architecture:hal:feature_functions
                Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| eeros_architecture:hal:feature_functions [2017/04/30 10:14] – graf | eeros_architecture:hal:feature_functions [2021/05/16 09:33] (current) – [List of Feature Function for Hardware Wrapper Libraries] ursgraf | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| void callInputFeature(InputInterface *obj, std::string featureName, | void callInputFeature(InputInterface *obj, std::string featureName, | ||
| </ | </ | ||
| + | The parameter are as follows: | ||
| + | - OutputInterface / InputInterface: | ||
| + | - featureName: | ||
| + | - args: arguments to this function | ||
| + | |||
| + | The following example shows how to set the frequency of a pulse width modulated output. This | ||
| + | is usually done just once. After this you can release the object. | ||
| + | <code cpp> | ||
| + | HAL& hal = HAL:: | ||
| + | eeros:: | ||
| + | hal.callOutputFeature(pwm, | ||
| + | hal.releaseOutput(" | ||
| + | </ | ||
| + | |||
| + | ===== Accessing Feature Functions from the Control System ===== | ||
| + | The control system defines a peripheral output objects which is connected to our HAL object. The control system will usually periodically write to this output and set the duty cycle. | ||
| + | However, if you wish to change the frequency of the signal you must again use the feature function as follows: | ||
| + | <code cpp> | ||
| + | PeripheralOutput< | ||
| + | motorSpeed.callOutputFeature(" | ||
| + | </ | ||
| + | |||
| + | ===== List of Feature Function for Hardware Wrapper Libraries ===== | ||
| + | ^library^type^function^Parameter^Description^ | ||
| + | |bbblue-eeros|AnalogOut|freeSpin|channel|Puts a motor into a zero-throttle state allowing it to spin freely. Motor channel (1-4) or 0 for all channels. Make sure, that the peripheral output driving the motor does not run, else the set function will reenable the H-bridge.| | ||
| + | |::: | ||
| + | |::: | ||
| + | |::: | ||
| + | |flink-eeros|Fqd|resetFqd| |Sets the encoder position to zero. This can be useful for homing.| | ||
| + | |::: | ||
| + | |::: | ||
| + | |::: | ||
| + | |::: | ||
| + | |||
| + | |||
| + | |||
| + | |||
eeros_architecture/hal/feature_functions.1493540053.txt.gz · Last modified: 2017/04/30 10:14 (external edit)
                
                