#ifndef ALTIMETER_H #define ALTIMETER_H #include #include /** * @brief Pin number for the I2C data line (SDA). */ #define SDA_PIN (16) /** * @brief Pin number for the I2C clock line (SCL). */ #define SCL_PIN (17) /** * @brief The Altimiter class represents an altimeter device. * * This class provides a singleton instance of the altimeter and * methods to manage its functionality. * * @author Zheludchenko Yehor (17.04.2024) */ #define RANGEFINDER_SF30_MAX_DISTANCE (20000) class Altimiter { public: /** * @brief Default constructor for the Altimiter class. */ Altimiter() {} /** * @brief Destructor for the Altimiter class. */ ~Altimiter() {} /** * @brief Task function for handling altimeter data reception. * * This function is intended to be run as a task to handle altimeter data reception. * * @param pvParameters Pointer to task parameters. */ static void AltimiterRxTask(void *pvParameters); /** * @brief Variable to store the distance measured by the altimeter. * * This variable stores the distance measured by the altimeter device. */ static double distance; private: /** * @brief I2C address of the altimeter device. */ static uint8_t address; /** * @brief Scan method to check if the altimeter device is present on the I2C bus. */ bool scan(byte adress); }; #endif // ALTIMETER_H