<commit_before>package i2c

import (
	"bytes"
	"encoding/binary"
	"time"

	"gobot.io/x/gobot"
)

const bmp180Address = 0x77

const bmp180RegisterAC1MSB = 0xAA

const bmp180RegisterCtl = 0xF4
const bmp180CmdTemp = 0x2E
const bmp180RegisterTempMSB = 0xF6
const bmp180CmdPressure = 0x34
const bmp180RegisterPressureMSB = 0xF6

// BMP180Driver is the gobot driver for the Bosch pressure sensor BMP180.
// Device datasheet: https://cdn-shop.adafruit.com/datasheets/BST-BMP180-DS000-09.pdf
type BMP180Driver struct {
	name       string
	connection I2c
	interval   time.Duration
	gobot.Eventer
	calibrationCoefficients *calibrationCoefficients
}

// BMP180OversamplingMode is the oversampling ratio of the pressure measurement.
type BMP180OversamplingMode uint

const (
	// BMP180UltraLowPower is the lowest oversampling mode of the pressure measurement.
	BMP180UltraLowPower BMP180OversamplingMode = iota
	// BMP180Standard is the standard oversampling mode of the pressure measurement.
	BMP180Standard
	// BMP180HighResolution is a high oversampling mode of the pressure measurement.
	BMP180HighResolution
	// BMP180UltraHighResolution is the highest oversampling mode of the pressure measurement.
	BMP180UltraHighResolution<commit_msg>Remove the unused attributes<commit_after>package i2c

import (
	"bytes"
	"encoding/binary"
	"time"

	"gobot.io/x/gobot"
)

const bmp180Address = 0x77

const bmp180RegisterAC1MSB = 0xAA

const bmp180RegisterCtl = 0xF4
const bmp180CmdTemp = 0x2E
const bmp180RegisterTempMSB = 0xF6
const bmp180CmdPressure = 0x34
const bmp180RegisterPressureMSB = 0xF6

// BMP180Driver is the gobot driver for the Bosch pressure sensor BMP180.
// Device datasheet: https://cdn-shop.adafruit.com/datasheets/BST-BMP180-DS000-09.pdf
type BMP180Driver struct {
	name       string
	connection I2c
	calibrationCoefficients *calibrationCoefficients
}

// BMP180OversamplingMode is the oversampling ratio of the pressure measurement.
type BMP180OversamplingMode uint

const (
	// BMP180UltraLowPower is the lowest oversampling mode of the pressure measurement.
	BMP180UltraLowPower BMP180OversamplingMode = iota
	// BMP180Standard is the standard oversampling mode of the pressure measurement.
	BMP180Standard
	// BMP180HighResolution is a high oversampling mode of the pressure measurement.
	BMP180HighResolution
	// BMP180UltraHighResolution is the highest oversampling mode of the pressure measurement.
	BMP180UltraHighResolution
{'fraction_non_alphanumeric': 0.05172413793103448, 'fraction_numerical': 0.07307060755336617, 'mean_word_length': 5.1077694235588975, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6618014', 'n_tokens_mistral': 945, 'n_tokens_neox': 780, 'n_words': 225}