User Tools

Site Tools


eeros_architecture:hal:feature_functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eeros_architecture:hal:feature_functions [2017/06/22 11:55] – [Feature Functions] grafeeros_architecture:hal:feature_functions [2021/05/16 09:33] (current) – [List of Feature Function for Hardware Wrapper Libraries] ursgraf
Line 12: Line 12:
  
 The following example shows how to set the frequency of a pulse width modulated output. This  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. Later the control system defines a peripheral output objects which is connected to our HAL object. The control system will then periodically write to this output and set the duty cycle.+is usually done just once. After this you can release the object. 
 <code cpp> <code cpp>
   HAL& hal = HAL::instance();   HAL& hal = HAL::instance();
Line 18: Line 18:
   hal.callOutputFeature(pwm, "setPwmFrequency", 100.0);   hal.callOutputFeature(pwm, "setPwmFrequency", 100.0);
   hal.releaseOutput("pwm1");   hal.releaseOutput("pwm1");
-  ...+</code> 
 + 
 +===== Accessing Feature Functions from the Control System ===== 
 +The control system defines a peripheral output objects which is connected to our HAL objectThe 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<double> motorSpeed("pwm1");   PeripheralOutput<double> motorSpeed("pwm1");
   motorSpeed.callOutputFeature("setPwmFrequency", 200.0);   motorSpeed.callOutputFeature("setPwmFrequency", 200.0);
-  ... 
 </code> </code>
  
-===== Accessing Feature Functions from the Control System ===== +===== List of Feature Function for Hardware Wrapper Libraries ===== 
-coming soon+^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.| 
 +|:::|:::|brake|channel|Connects the motor terminal pairs together which makes the motor fight against its own back EMF turning it into a brake resisting rotation. 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.| 
 +|:::|Fqd|resetFqd| |Sets the encoder position to zero. This can be useful for homing.| 
 +|:::|:::|setFqdPos|position|Sets the encoder position to a given value. This can be useful for homing.| 
 +|flink-eeros|Fqd|resetFqd| |Sets the encoder position to zero. This can be useful for homing.| 
 +|:::|Pwm|setPwmFrequency|frequency|Sets the pwm frequency (Hz).| 
 +|:::|:::|setPwmDutyCycle|duty cycle|Sets the pwm duty cycle (0.0 .. 1.0).| 
 +|:::|Watchdog|resetWatchdog| |Resets the watchdog.| 
 +|:::|:::|setWatchdogTimeout|timeout|Sets the watchdog timeout (s).| 
 + 
 + 
  
eeros_architecture/hal/feature_functions.1498125339.txt.gz · Last modified: 2017/06/22 11:55 (external edit)