Skip to content

Commit 065b33a

Browse files
Dirk Rudolphrsmeral
Dirk Rudolph
authored andcommitted
fix: await i2cWrite promise
1 parent 81bd7cb commit 065b33a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const integerToUint16 = (value: number): Buffer => {
1515
export const booleanToUint16 = (value: boolean): Buffer => integerToUint16(value ? 1 : 0);
1616

1717
export const write = async (bus: PromisifiedBus, buf: Buffer): Promise<void> => {
18-
bus.i2cWrite(SCD30_ADDRESS, buf.length, buf);
18+
await bus.i2cWrite(SCD30_ADDRESS, buf.length, buf);
1919
};
2020

2121
export const read = async (bus: PromisifiedBus, length: number): Promise<Buffer> => {

0 commit comments

Comments
 (0)