mirror of
https://github.com/okalachev/flix.git
synced 2026-06-28 05:56:44 +00:00
Fix working with parameters in pyflix examples
PITCH_P parameter was renamed to CTL_P_P
This commit is contained in:
+3
-3
@@ -23,11 +23,11 @@ print('> imu')
|
||||
print(flix.cli('imu'))
|
||||
|
||||
print('=== Get parameter...')
|
||||
pitch_p = flix.get_param('PITCH_P')
|
||||
print('PITCH_P = ', pitch_p)
|
||||
pitch_p = flix.get_param('CTL_P_P')
|
||||
print('CTL_P_P = ', pitch_p)
|
||||
|
||||
print('=== Set parameter...')
|
||||
flix.set_param('PITCH_P', pitch_p)
|
||||
flix.set_param('CTL_P_P', pitch_p)
|
||||
|
||||
print('=== Wait for gyro update...')
|
||||
print('Gyro: ', flix.wait('gyro'))
|
||||
|
||||
@@ -117,8 +117,8 @@ Full list of events:
|
||||
Get and set firmware parameters using `get_param` and `set_param` methods:
|
||||
|
||||
```python
|
||||
pitch_p = flix.get_param('PITCH_P') # get parameter value
|
||||
flix.set_param('PITCH_P', 5) # set parameter value
|
||||
pitch_p = flix.get_param('CTL_P_P') # get parameter value
|
||||
flix.set_param('CTL_P_P', 5) # set parameter value
|
||||
```
|
||||
|
||||
Execute console commands using `cli` method. This method returns the command response:
|
||||
|
||||
Reference in New Issue
Block a user