Conversation
|
I approve this pull request. |
PieFilling
left a comment
There was a problem hiding this comment.
The sensor functions and returns adequate values with this code.
WattsUp
left a comment
There was a problem hiding this comment.
See feedback. Only have one location of the function headers. In the source file. Member variables don't need doxygen comments
CISLibrary/drivers/T6713/T6713.h
Outdated
| * DEFAULT_T6713_SLAVE_ADDRESS | ||
| */ | ||
| T6713(I2C & i2c, uint8_t addr = DEFAULT_T6713_SLAVE_ADDRESS) : | ||
| i2c(i2c), addr(addr) {}; |
There was a problem hiding this comment.
Why is the constructor defined here and not the source?
CISLibrary/drivers/T6713/T6713.h
Outdated
| * @brief The slave address of the sensor to which the I2C should read/write | ||
| * | ||
| */ | ||
| uint8_t addr; |
There was a problem hiding this comment.
Is the address configurable? If so, make it an enum class of the allowable values, if not make it a static const member.
CISLibrary/drivers/T6713/T6713.h
Outdated
| // T6713 CO2 Sensor I2C default slave address | ||
| const uint8_t DEFAULT_T6713_SLAVE_ADDRESS = 0x15 << 1; | ||
| // Same command found in the T67XX CO2 Sensor Module documentation, see pg. 29 | ||
| static const char READ_CO2_COMMAND[5] = {0x04, 0x13, 0x8B, 0x00, 0x01}; |
There was a problem hiding this comment.
Have these as part of the class instead of the default namespace
CISLibrary/drivers/T6713/T6713.h
Outdated
| * @return mbed_error_status_t MBED_SUCCESS if the reading was successful, | ||
| * otherwise the error status of the reading | ||
| */ | ||
| mbed_error_status_t readPPM(int & outValue); |
There was a problem hiding this comment.
Use uint32_t for unsigned 32b integers. Aka specify the number of bits
|
@WattsUp I'm not sure what you mean when you say
Does this mean the function headers (in this case, just |
This branch contains just the files for the T6713 class, which acts as a driver for reading PPM values from the T6713 CO2 sensor.
Everything that needs to be documented in the code should have already been documented using the Doxygen format, which means documentation may be automatically generated using the Doxygen software.
I have also tested to make sure the class works properly with the sensor using Bradley's setup as seen in Payload's channel on Slack.