@@ -30,62 +30,12 @@ class Adafruit_INA237;
3030/* *************************************************************************/
3131class WipperSnapper_I2C_Driver_INA237 : public WipperSnapper_I2C_Driver {
3232public:
33- /* ******************************************************************************/
34- /* !
35- @brief Constructor for a INA237 sensor.
36- @param i2c
37- The I2C interface.
38- @param sensorAddress
39- The 7-bit I2C address of the sensor.
40- */
41- /* ******************************************************************************/
4233 WipperSnapper_I2C_Driver_INA237 (TwoWire *i2c, uint16_t sensorAddress);
43-
44- /* ******************************************************************************/
45- /* !
46- @brief Destructor for an INA237 sensor.
47- */
48- /* ******************************************************************************/
4934 ~WipperSnapper_I2C_Driver_INA237 ();
5035
51- /* ******************************************************************************/
52- /* !
53- @brief Initializes the INA237 sensor and begins I2C.
54- @returns True if initialized successfully, False otherwise.
55- */
56- /* ******************************************************************************/
5736 bool begin ();
58-
59- /* ******************************************************************************/
60- /* !
61- @brief Reads a voltage sensor and converts the
62- reading into the expected SI unit.
63- @param voltageEvent
64- voltage sensor reading, in volts.
65- @returns True if the sensor event was obtained successfully, False
66- otherwise.
67- */
68- /* ******************************************************************************/
6937 bool getEventVoltage (sensors_event_t *voltageEvent);
70-
71- /* *
72- * @brief Get the current sensor event.
73- *
74- * @param currentEvent Pointer to the current sensor event.
75- *
76- * @returns True if the sensor event was obtained successfully, False
77- * otherwise.
78- */
7938 bool getEventCurrent (sensors_event_t *currentEvent);
80-
81- /* *
82- * @brief Get the raw (power) sensor event.
83- *
84- * @param powerEvent Pointer to the power sensor event.
85- *
86- * @returns True if the sensor event was obtained successfully, False
87- * otherwise.
88- */
8939 bool getEventRaw (sensors_event_t *powerEvent);
9040
9141protected:
0 commit comments