Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0bb059b3408d
Choose a base ref
...
head repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7ca765bb5e8a
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Dec 31, 2019

  1. Copy the full SHA
    7ca765b View commit details
Showing with 4 additions and 0 deletions.
  1. +4 −0 software/glasgow/applet/sensor/bmp280/__init__.py
4 changes: 4 additions & 0 deletions software/glasgow/applet/sensor/bmp280/__init__.py
Original file line number Diff line number Diff line change
@@ -161,6 +161,9 @@ async def _read_reg24(self, reg):
self._logger.log(self._level, "BMP280: reg=%#04x raw=%#06x read=%d", reg, raw, value)
return value

async def reset(self):
await self._write_reg8(REG_RESET, BIT_RESET)

async def identify(self):
id = await self._read_reg8(REG_ID)
if id != BIT_ID:
@@ -318,6 +321,7 @@ def add_interact_arguments(cls, parser):
DataLogger.add_subparsers(p_log)

async def interact(self, device, args, bmp280):
await bmp280.reset()
await bmp280.identify()

await bmp280.set_mode("sleep")