pylgbst
pylgbst copied to clipboard
Make pylgbst compatible with Control + Hub
Codecov Report
Merging #73 into master will decrease coverage by
2.90%. The diff coverage is53.26%.
@@ Coverage Diff @@
## master #73 +/- ##
==========================================
- Coverage 75.76% 72.86% -2.91%
==========================================
Files 18 20 +2
Lines 2080 2362 +282
==========================================
+ Hits 1576 1721 +145
- Misses 504 641 +137
| Impacted Files | Coverage Δ | |
|---|---|---|
| pylgbst/comms/cgattlib.py | 0.00% <0.00%> (ø) |
|
| setup.py | 0.00% <ø> (ø) |
|
| pylgbst/comms/cbluepy.py | 67.81% <25.00%> (ø) |
|
| pylgbst/hub.py | 70.97% <25.25%> (-23.73%) |
:arrow_down: |
| pylgbst/comms/cgatt.py | 42.55% <50.00%> (-2.13%) |
:arrow_down: |
| pylgbst/peripherals.py | 74.38% <50.00%> (-1.07%) |
:arrow_down: |
| pylgbst/comms/cbleak.py | 51.96% <51.96%> (ø) |
|
| pylgbst/__init__.py | 34.09% <62.50%> (+6.59%) |
:arrow_up: |
| tests/test_cbleak.py | 97.82% <97.82%> (ø) |
|
| pylgbst/comms/__init__.py | 38.31% <100.00%> (+1.22%) |
:arrow_up: |
| ... and 12 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update c733115...90b2a22. Read the comment docs.
This looks very nice. Couple of comments:
- It would be great to cover the new class with unit tests.
- Using this piece of code
print(hub.peripherals[MoveHub.PORT_C].describe_possible_modes()), you can get a ton of information about peripheral, its possible modes etc. With that info, you can improve yourAccelerometerclass, providing class constants for known modes. Also it helps understanding how to decode properly sensor data. I'd ask you also to share output of the accelerometer'sdescribe_possible_modeshere, just for the record. Maybe other unknown devices' too, for possible ideas of their nature.
@undera, oh, here it is! I'll try to dust this off, rebase, and see if I can work on this.