Skip to content

Commit a886182

Browse files
authored
bump version 0.3.1 (#18)
- Bump version after Fix #17, Kudos to ChrisRed255
1 parent 8fec7e3 commit a886182

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88

9+
## [0.3.1] - 2024-04-22
10+
- Bump version after Fix #17, Kudos to ChrisRed255
11+
12+
913
## [0.3.0] - 2024-03-15
1014
- Fix #14, change round to truncate.
1115
- update GitHub actions to v4

INA219.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// FILE: INA219.h
22
// AUTHOR: Rob Tillaart
3-
// VERSION: 0.3.0
3+
// VERSION: 0.3.1
44
// DATE: 2021-05-18
55
// PURPOSE: Arduino library for INA219 voltage, current and power sensor
66
// URL: https://github.com/RobTillaart/INA219
@@ -40,7 +40,7 @@ INA219::INA219(const uint8_t address, TwoWire *wire)
4040
{
4141
_address = address;
4242
_wire = wire;
43-
// not calibrated values by default.
43+
// no calibrated values by default.
4444
_current_LSB = 0;
4545
_maxCurrent = 0;
4646
_shunt = 0;
@@ -75,7 +75,7 @@ uint8_t INA219::getAddress()
7575
float INA219::getShuntVoltage()
7676
{
7777
uint16_t value = _readRegister(INA219_SHUNT_VOLTAGE);
78-
return value * 1e-5; // fixed 10 uV
78+
return value * 1e-5; // fixed 10 uV
7979
}
8080

8181

@@ -85,16 +85,16 @@ float INA219::getBusVoltage()
8585
uint8_t flags = value & 0x03;
8686
// math overflow handling
8787
if (flags & 0x01) return -100;
88-
// if flags && 0x02 ==> convert flag; not handled
89-
float voltage = (value >> 3) * 4e-3; // fixed 4 mV
88+
// if flags && 0x02 ==> convert flag; not handled
89+
float voltage = (value >> 3) * 4e-3; // fixed 4 mV
9090
return voltage;
9191
}
9292

9393

9494
float INA219::getPower()
9595
{
9696
uint16_t value = _readRegister(INA219_POWER);
97-
return value * _current_LSB * 20;
97+
return value * (_current_LSB * 20); // fixed 20 Watt
9898
}
9999

100100
// TODO CHECK
@@ -129,7 +129,7 @@ bool INA219::reset()
129129
uint16_t config = _readRegister(INA219_CONFIGURATION);
130130
config |= 0x8000;
131131
uint16_t wrrv = _writeRegister(INA219_CONFIGURATION, config);
132-
// reset calibration
132+
// reset calibration
133133
_current_LSB = 0;
134134
_maxCurrent = 0;
135135
_shunt = 0;

INA219.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22
// FILE: INA219.h
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.3.0
4+
// VERSION: 0.3.1
55
// DATE: 2021-05-18
66
// PURPOSE: Arduino library for INA219 voltage, current and power sensor
77
// URL: https://github.com/RobTillaart/INA219
@@ -13,7 +13,7 @@
1313
#include "Wire.h"
1414

1515

16-
#define INA219_LIB_VERSION (F("0.3.0"))
16+
#define INA219_LIB_VERSION (F("0.3.1"))
1717

1818

1919
class INA219

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"type": "git",
1616
"url": "https://github.com/RobTillaart/INA219.git"
1717
},
18-
"version": "0.3.0",
18+
"version": "0.3.1",
1919
"license": "MIT",
2020
"frameworks": "*",
2121
"platforms": "*",

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=INA219
2-
version=0.3.0
2+
version=0.3.1
33
author=Rob Tillaart <[email protected]>
44
maintainer=Rob Tillaart <[email protected]>
55
sentence=Arduino library for INA219 voltage, current and power sensor.

0 commit comments

Comments
 (0)