• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rwaldron / johnny-five / 2582 / 1
92%
master: 92%

Build:
DEFAULT BRANCH: master
Ran 21 Apr 2017 05:17PM UTC
Files 55
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Apr 2017 05:02PM UTC coverage: 91.735% (-0.001%) from 91.736%
NO_SERIALPORT_INSTALL=1

push

travis-ci

rwaldron
Fix Piezo.prototype.note() (#1328)

* Fix Piezo.prototype.note()

The `note()` method was passing a frequency (Hz) to the `tone()` method, which is expecting to receive a duty cycle (μs), leading to the wrong note being played.  The solution is for `note()` to call `frequency()` instead, which will do the appropriate conversion.

Since it took me a while to understand the relationships between `tone`, `frequency` and `note` I've added some documentation to those methods to clear things up for the next person.  I've also made some unit tests more aggressive about checking that values are converted appropriately as they're passed around, and commented note-frequency-duty equivalencies to help the test read nicer.

* Fix lint error

* Address review feedback

- Test that `note()` is case-insensitive
- Better description of default octave
- One-line Piezo.prototype.note
- s/frequncy/frequency
- Note tests demonstrate the difference between note letter and octave number better

2790 of 3257 branches covered (85.66%)

7237 of 7889 relevant lines covered (91.74%)

181.12 hits per line

Source Files on job 2582.1 (NO_SERIALPORT_INSTALL=1)
  • Tree
  • List 0
  • Changed 20
  • Source Changed 1
  • Coverage Changed 20
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 2582
  • Travis Job 2582.1
  • 001f27f2 on github
  • Prev Job for NO_SERIALPORT_INSTALL=1 on master (#2581.9)
  • Next Job for NO_SERIALPORT_INSTALL=1 on master (#2584.10)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc