google / cyanobyte

Machine-readable datasheets
https://cyanobyte.dev
Apache License 2.0
79 stars 31 forks source link

Update macros.jinja2 #222

Closed osterwood closed 4 years ago

osterwood commented 4 years ago

There is an off by one error in this macro. Start / end bits of (4:1) would create 0b0000000000001111 instead of 0b0000000000011110. If start and end bits were both 0, no 1 appears in the output mask at all.

google-cla[bot] commented 4 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

osterwood commented 4 years ago

@googlebot I signed it!

Fleker commented 4 years ago

Thanks for finding this fix! Right now unit tests python3 -m unittest discover test are failing due to the MCP4725 examples needing to be updated to use the correct mask. Can you make those changes as well?

osterwood commented 4 years ago

I believe this commit fixes all failing tests.

FYI - your automatic build system results aren't visible (see image), I had to run all tests locally to determine what tests were failing.

Screen Shot 2020-08-05 at 9 11 40 PM

Fleker commented 4 years ago

Thanks for making this change!

Yes, the CI system has some access restrictions that can't be avoided right now, which can be inconvenient to external pull requests.