|
1 | | -# The MIT License (MIT) |
| 1 | +# SPDX-FileCopyrightText: 2017 Dean Miller for Adafruit Industries |
2 | 2 | # |
3 | | -# Copyright (c) 2017 Dean Miller for Adafruit Industries |
4 | | -# |
5 | | -# Permission is hereby granted, free of charge, to any person obtaining a copy |
6 | | -# of this software and associated documentation files (the "Software"), to deal |
7 | | -# in the Software without restriction, including without limitation the rights |
8 | | -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
9 | | -# copies of the Software, and to permit persons to whom the Software is |
10 | | -# furnished to do so, subject to the following conditions: |
11 | | -# |
12 | | -# The above copyright notice and this permission notice shall be included in |
13 | | -# all copies or substantial portions of the Software. |
14 | | -# |
15 | | -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
16 | | -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
17 | | -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
18 | | -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
19 | | -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
20 | | -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
21 | | -# THE SOFTWARE. |
| 3 | +# SPDX-License-Identifier: MIT |
| 4 | + |
22 | 5 | """ |
23 | 6 | `adafruit_ina219` |
24 | 7 | ==================================================== |
@@ -244,9 +227,9 @@ def power(self): |
244 | 227 |
|
245 | 228 | def set_calibration_32V_2A(self): # pylint: disable=invalid-name |
246 | 229 | """Configures to INA219 to be able to measure up to 32V and 2A of current. Counter |
247 | | - overflow occurs at 3.2A. |
| 230 | + overflow occurs at 3.2A. |
248 | 231 |
|
249 | | - ..note :: These calculations assume a 0.1 shunt ohm resistor is present |
| 232 | + ..note :: These calculations assume a 0.1 shunt ohm resistor is present |
250 | 233 | """ |
251 | 234 | # By default we use a pretty huge range for the input voltage, |
252 | 235 | # which probably isn't the most appropriate choice for system |
@@ -325,9 +308,9 @@ def set_calibration_32V_2A(self): # pylint: disable=invalid-name |
325 | 308 |
|
326 | 309 | def set_calibration_32V_1A(self): # pylint: disable=invalid-name |
327 | 310 | """Configures to INA219 to be able to measure up to 32V and 1A of current. Counter overflow |
328 | | - occurs at 1.3A. |
| 311 | + occurs at 1.3A. |
329 | 312 |
|
330 | | - .. note:: These calculations assume a 0.1 ohm shunt resistor is present""" |
| 313 | + .. note:: These calculations assume a 0.1 ohm shunt resistor is present""" |
331 | 314 | # By default we use a pretty huge range for the input voltage, |
332 | 315 | # which probably isn't the most appropriate choice for system |
333 | 316 | # that don't use a lot of power. But all of the calculations |
@@ -407,9 +390,9 @@ def set_calibration_32V_1A(self): # pylint: disable=invalid-name |
407 | 390 |
|
408 | 391 | def set_calibration_16V_400mA(self): # pylint: disable=invalid-name |
409 | 392 | """Configures to INA219 to be able to measure up to 16V and 400mA of current. Counter |
410 | | - overflow occurs at 1.6A. |
| 393 | + overflow occurs at 1.6A. |
411 | 394 |
|
412 | | - .. note:: These calculations assume a 0.1 ohm shunt resistor is present""" |
| 395 | + .. note:: These calculations assume a 0.1 ohm shunt resistor is present""" |
413 | 396 | # Calibration which uses the highest precision for |
414 | 397 | # current measurement (0.1mA), at the expense of |
415 | 398 | # only supporting 16V at 400mA max. |
@@ -490,9 +473,9 @@ def set_calibration_16V_400mA(self): # pylint: disable=invalid-name |
490 | 473 |
|
491 | 474 | def set_calibration_16V_5A(self): # pylint: disable=invalid-name |
492 | 475 | """Configures to INA219 to be able to measure up to 16V and 5000mA of current. Counter |
493 | | - overflow occurs at 8.0A. |
| 476 | + overflow occurs at 8.0A. |
494 | 477 |
|
495 | | - .. note:: These calculations assume a 0.02 ohm shunt resistor is present""" |
| 478 | + .. note:: These calculations assume a 0.02 ohm shunt resistor is present""" |
496 | 479 | # Calibration which uses the highest precision for |
497 | 480 | # current measurement (0.1mA), at the expense of |
498 | 481 | # only supporting 16V at 5000mA max. |
|
0 commit comments