Fixes #if PRST_HAS_LDR check in ble.c
This commit is contained in:
parent
d8aea1d4ef
commit
e1f385adbd
2 changed files with 11 additions and 11 deletions
|
|
@ -31,8 +31,8 @@ Sensor data is encoded in unsigned 16 bits (2 bytes), and whenever multiple
|
|||
bytes are used to represent a single value, the encoding is big-endian.
|
||||
|
||||
| Byte index | Description |
|
||||
|------------|-----------------------------------------------------------------|
|
||||
| 0 | Protocol version (4 bits) + reserved (3 bits) + has_lux* (1 bit)|
|
||||
|------------|-------------------------------------------------------------------|
|
||||
| 0 | Protocol version (4 bits) + reserved (3 bits) + `has_lux`* (1 bit)|
|
||||
| 1 | Reserved (4 bits) + increasing, wrap-around counter (4 bits) |
|
||||
| 2-3 | Battery voltage in millivolts |
|
||||
| 4-5 | Temperature in millidegrees Celcius |
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ void prst_ble_update_adv_data(uint16_t batt_millivolts,
|
|||
service_data[8] = soil_moisture >> 8;
|
||||
service_data[9] = soil_moisture & 0xff;
|
||||
|
||||
#ifdef PRST_HAS_LDR
|
||||
#if PRST_HAS_LDR
|
||||
service_data[16] = brightness >> 8;
|
||||
service_data[17] = brightness & 0xff;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue