The rationale behind these patches are pretty much in the source comments. MSVC issues with:
*) "Variable Length Arrays"
*) 'restrict` keyword.
*) And '<strings.h>'.
This is a simple fix for MSVC where I get this warning:
stdlib.h(1300): warning C4005: 'max': macro redefinition
RTL_433\include\util.h(20): note: see previous definition of 'max'
stdlib.h(1301): warning C4005: 'min': macro redefinition
RTL_433\include\util.h(23): note: see previous definition of 'min'
Some cosmetic fixes pointed out by GDT
- missed battery low change in verbose field.
- Note: since sensor_id isn't outputting hex as intended:
- 5-n-1: change to int in order to keep it stable.
- tower: id and sensor_id are currently redundant, left sensor_id as "hex" for now as a test case.
Note: this includes changes that might break parsers
- 6045 Lightning sensor:
- ID is really 14 bits not 12. (IDs > 12 bits will change)
- TXR temperature/humidity sensor:
- remove status field, (actually a fixed message type)
- correct battery field label from "battery" to "battery_low",
Regularize the comemnts about the Acurite 6045M, in both formatting
and more importantly in listing bitmasks for every field, including
unknown fields. While there is almost no semantic change, hoist the
current understanding of the "uknown strike status bit" from code to
also be in the comments.
* got data_make working with the 6045m
* Enabled the Acurite protocol now the 6045m uses data_make
* cleaned up sensor_id usage after looking at weewx-sdr
* Acurite 06045M structured (data_make) ID and Battery
* mlfreeman2's changes from mlfreeman2:data_make_6045
* Change sensor_id -> id, output as decimal int for consistency
* Fix ID definition, byte[2] is not part of the ID
* Currently assuming ID is 12 bits, byte[0] & 0x0f << 8 | byte[1]
* Add battery flag, using current convention for now.
* Update comments to more accurately reflect message contents.
* Acurite 06045M decoding of additional status bits.
* Added Active, RFI, and unknown strike status bit.
* Added raw message and exception flag as an aid for further analysis
Paho changed the signature of on_connect to require 4 arguments as
of v1.3.0 (https://github.com/eclipse/paho.mqtt.python/issues/197)
Remove the "/#" from the subscription since it wouldn't match the
example topic which didn't include anything after rtl_433.