Skip to content

Commit d061516

Browse files
committed
docs: add flex getter example
1 parent eee869e commit d061516

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/OPERATION.md

+12
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,18 @@ E.g. `-X "n=doorbell,m=OOK_PWM,s=400,l=800,r=7000,g=1000,match={24}0xa9878c,repe
256256
- the data needs to contain the `match` of 24 bits `0xa9878c`
257257
- the data needs to `repeat` at least 3 times
258258

259+
To extract some bits:
260+
261+
Example: `get=battery:@4:{1}:[0:Ok 1:Empty]`
262+
Using colon separated keys:
263+
- name (`battery`)
264+
- at which bit to start (`@4`)
265+
- how many bits to read (`{1}`)
266+
- optional mapping (map `0` to `Full`, map `1` to `Empty`)
267+
- or an optional format specifier (`%x`)
268+
269+
A key starting with `%` is a format specifier for the KV output, in practice it will be something like `%x`, `%X`, `%04x`.
270+
259271
See the [`conf`](https://github.com/merbanan/rtl_433/tree/master/conf) folder for some examples of flex specs.
260272

261273
## Analysis

0 commit comments

Comments
 (0)