Skip to content

Commit

Permalink
actionified, formatted and doxy'd
Browse files Browse the repository at this point in the history
  • Loading branch information
siddacious committed Mar 25, 2020
1 parent 2bdafac commit 08806a0
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 36 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/githubci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Arduino Library CI

on: [pull_request, push, repository_dispatch]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: adafruit/ci-arduino
path: ci

- name: pre-install
run: bash ci/actions_install.sh

- name: test platforms
run: python3 ci/build_platform.py main_platforms

- name: clang
run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r .

- name: doxygen
env:
GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }}
PRETTYNAME : "Adafruit INA219 Arduino Library"
run: bash ci/doxy_gen_and_deploy.sh
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

9 changes: 4 additions & 5 deletions Adafruit_INA219.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ void Adafruit_INA219::setCalibration_32V_2A() {
// setting the VBUS_MAX to 16V instead of 32V, etc.

// VBUS_MAX = 32V (Assumes 32V, can also be set to 16V)
// VSHUNT_MAX = 0.32 (Assumes Gain 8, 320mV, can also be 0.16, 0.08, 0.04)
// RSHUNT = 0.1 (Resistor value in ohms)
// VSHUNT_MAX = 0.32 (Assumes Gain 8, 320mV, can also be 0.16, 0.08,
// 0.04) RSHUNT = 0.1 (Resistor value in ohms)

// 1. Determine max possible current
// MaxPossible_I = VSHUNT_MAX / RSHUNT
Expand Down Expand Up @@ -161,14 +161,13 @@ void Adafruit_INA219::powerSave(bool on) {
wireReadRegister(INA219_REG_CONFIG, &current);
uint8_t next;
if (on) {
next = current | INA219_CONFIG_MODE_POWERDOWN;
next = current | INA219_CONFIG_MODE_POWERDOWN;
} else {
next = current & ~INA219_CONFIG_MODE_POWERDOWN;
next = current & ~INA219_CONFIG_MODE_POWERDOWN;
}
wireWriteRegister(INA219_REG_CONFIG, next);
}


/*!
* @brief Configures to INA219 to be able to measure up to 32V and 1A
* of current. Each unit of current corresponds to 40uA, and each
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Adafruit INA219 Library [![Build Status](https://travis-ci.com/adafruit/Adafruit_INA219.svg?branch=master)](https://travis-ci.com/adafruit/Adafruit_INA219)
# Adafruit INA219 Library [![Build Status](https://github.com/adafruit/Adafruit_INA219/workflows/Arduino%20Library%20CI/badge.svg)](https://github.com/adafruit/Adafruit_INA219/actions)

<a href="https://www.adafruit.com/products/904"><img src="assets/board.jpg" width="500px" /></a>

Expand Down
3 changes: 2 additions & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name=Adafruit INA219
version=1.0.6
version=1.0.7
author=Adafruit
maintainer=Adafruit <info@adafruit.com>
sentence=INA219 Current Sensor
paragraph=INA219 Current Sensor
category=Sensors
url=https://github.com/adafruit/Adafruit_INA219
architectures=*
depends=Adafruit NeoPixel, Adafruit GFX Library, Adafruit SSD1306

0 comments on commit 08806a0

Please sign in to comment.