pylgbst icon indicating copy to clipboard operation
pylgbst copied to clipboard

Make pylgbst compatible with Control + Hub

Open wobeix opened this issue 5 years ago • 3 comments

wobeix avatar Jul 11 '20 17:07 wobeix

Codecov Report

Merging #73 into master will decrease coverage by 2.90%. The diff coverage is 53.26%.

Impacted file tree graph

@@            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 data Powered by Codecov. Last update c733115...90b2a22. Read the comment docs.

codecov-commenter avatar Jul 11 '20 17:07 codecov-commenter

This looks very nice. Couple of comments:

  1. It would be great to cover the new class with unit tests.
  2. 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 your Accelerometer class, 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's describe_possible_modes here, just for the record. Maybe other unknown devices' too, for possible ideas of their nature.

undera avatar Jul 11 '20 19:07 undera

@undera, oh, here it is! I'll try to dust this off, rebase, and see if I can work on this.

natikgadzhi avatar Jan 24 '22 01:01 natikgadzhi