Skip to content

Added support for Bmp280 thermometer-barometer sensor#450

Open
Max-Ogorodnik2006 wants to merge 1 commit intoAdaCore:masterfrom
Max-Ogorodnik2006:bmp280_1
Open

Added support for Bmp280 thermometer-barometer sensor#450
Max-Ogorodnik2006 wants to merge 1 commit intoAdaCore:masterfrom
Max-Ogorodnik2006:bmp280_1

Conversation

@Max-Ogorodnik2006
Copy link

No description provided.

@Max-Ogorodnik2006 Max-Ogorodnik2006 changed the title Added support for Bmp2890 thermometer-barometer sensor Added support for Bmp280 thermometer-barometer sensor Jan 2, 2026
Copy link

@pat-rogers pat-rogers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done.
But the type names with suffix "_Type" are inconsisrtent with the ADL naming scheme. For example, these are well named:
type Pressure is delta 0.0001 range 300.0 .. 1100.0; -- hPa
type Temperature is delta 0.01 range -40.0 .. 85.0; -- °C
(although I think Barometric_Pressure would be more descriptive),
whereas these are not very helpful to the reader:
type Status_Type is private;
type Power_Mode_Type is (Sleep, Forced, Normal) with Size => UInt2'Size;
type Precision_Type is

For example, maybe Power_Mode_Type could be Power_Modes which is what the datasheet uses. Then the formal parameter name could just be Mode, which wouldn't be confusing because the procedure is named Set_Power_Mode.

Even BMP280_Device could be BMP280_Pressure_Sensor since that's the term the datasheet uses, and then the reader would know what the device actually is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants