Skip to content

Commit

Permalink
feat(BMP280): Add optional address argument
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroHerr committed Dec 30, 2018
1 parent b02a42e commit d3b180f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/BMP280.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {
} from './helpers';
import { extractValue } from './utils';

export default function BMP280({ bus }: { bus: BusInterface }): BMP280Interface {
export default function BMP280({ address = ADDRESS, bus }: { address?: number; bus: BusInterface }): BMP280Interface {
const temperatureCorrection = [0, 0, 0];
const pressureCorrection = [0, 0, 0, 0, 0, 0, 0, 0, 0];

return {
...Device({ address: ADDRESS, bus }),
...Device({ address, bus }),

async init({
temperatureOversampling = 'x1',
Expand Down

0 comments on commit d3b180f

Please sign in to comment.