Commit graph

8 commits

Author SHA1 Message Date
rbaron
e1f385adbd Fixes #if PRST_HAS_LDR check in ble.c 2021-09-22 22:39:19 +02:00
rbaron
d8aea1d4ef Introduces version-specific config & condition BLE lux encoding
In the BLE service data payload, one of the reserved bits is now used to
indicate whether or not the ambient lux value is encoded in the packet.
Bit 0 of the first byte is now the `has_lux` bit. If it is set, bytes
16-17 in the service data will contain the ambient lux. If `has_lux` is
not set, bytes 16-17 may not exist (for compatibility with older
firmwares) or may hold meaningless values.

This commit also introduces version-specific configuration in
prst_config.h. Photoresistor config, for example, is only meaninful for
version 1.1.x.
2021-09-22 22:39:11 +02:00
rbaron
d2daefaf46 Updates ambient brightness estimation code
Also renames the `lux` field from `photo_read_t` to the more generic `brightness`.
2021-09-22 22:38:30 +02:00
rbaron
be366d5c3c Updates BLE packet payload documentation
Adds the new ambient light values.
2021-09-22 22:38:30 +02:00
Jan-Henrik Bruhn
05efd7474c Fix typo in code readme 2021-09-02 20:02:24 +02:00
Jan-Henrik Bruhn
1aa07b4d74 Add platforms to readme 2021-09-02 15:45:33 +02:00
rbaron
795fc46849 Updates docs for data encoding in the BLE advertisement packet 2021-05-02 20:20:39 +02:00
rbaron
3b0e2043f2 Mass cleanup 2021-04-01 14:45:35 +02:00