1
0
mirror of https://github.com/mjg59/python-broadlink.git synced 2024-11-14 03:20:14 +01:00
Commit Graph

9 Commits

Author SHA1 Message Date
Felipe Martins Diel
12fdf01631 Improve code quality (#572)
* Improve typing

* Use better names

* Clean up switch.py

* Remove unused import

* Run black

* Remove unnecessary comments

* Clean up climate.py
2021-04-26 17:57:02 -03:00
Felipe Martins Diel
67b674859f Segregate CRC16.get_table() from CRC16.calculate() (#567) 2021-04-26 17:57:02 -03:00
Felipe Martins Diel
4e1e690762 Encapsulate crc16() to avoid global (#566) 2021-04-26 17:57:02 -03:00
Felipe Martins Diel
86b5d0727c Improve CRC-16 function (#565)
* Rename calculate_crc16 to crc16

* Apply PEP-8 naming conventions

* Remove unnecessary import

* Accept any sequence type

* Remove unnecessary conversions

* Expose polynomial and initial value as kwargs

* Remove unnecessary bitwise operations

* Store the CRC-16 table for performance

* Add missing type hints

* Update docstring

* General improvements
2021-04-26 17:57:02 -03:00
Felipe Martins Diel
28fa72f962
Make bind() optional and implement a generator for device discovery (#427) 2020-09-23 07:43:56 +02:00
Felipe Martins Diel
5ef4124491 Remove legacy byte conversions 2020-09-20 17:11:14 -07:00
Felipe Martins Diel
76012c6cd4 Add annotations for parameters 2020-09-20 02:10:18 -07:00
Felipe Martins Diel
20d1d63fc3 Create a SDKException for DNS errors 2020-09-16 14:05:07 -07:00
Felipe Martins Diel
5af3a81264 Restore VPN support 2020-09-16 14:05:07 -07:00