diff --git a/docs/images/grovegas.jpeg b/docs/images/grovegas.jpeg deleted file mode 100644 index fdc0f8bd..00000000 Binary files a/docs/images/grovegas.jpeg and /dev/null differ diff --git a/docs/images/mq2-5.jpeg b/docs/images/mq2-5.jpeg new file mode 100644 index 00000000..40d3b468 Binary files /dev/null and b/docs/images/mq2-5.jpeg differ diff --git a/docs/images/mq3-9.jpeg b/docs/images/mq3-9.jpeg new file mode 100644 index 00000000..a96403fc Binary files /dev/null and b/docs/images/mq3-9.jpeg differ diff --git a/docs/images/mq9.jpeg b/docs/images/mq9.jpeg deleted file mode 100644 index e782a73e..00000000 Binary files a/docs/images/mq9.jpeg and /dev/null differ diff --git a/src/gas/README.txt b/src/gas/README.txt index fab9cf4a..4eeab52b 100644 --- a/src/gas/README.txt +++ b/src/gas/README.txt @@ -1,6 +1,6 @@ -Grove - Gas Sensor(MQ-2):Combustible Gas Smoke [middle sensitivity] -Grove - Gas Sensor(MQ-3):Alcohol and Benzine [HIGH sensitivity] Long warmup +Grove - Gas Sensor(MQ-2):Combustible Gas Smoke [medium sensitivity] +Grove - Gas Sensor(MQ-3):Alcohol and Benzine [high sensitivity] Long warm-up Grove - Gas Sensor(MQ-5):LPG, Natural Gas, Town Gas [high sensitivity] Grove - Gas Sensor(MQ-9):LPG, CO, CH4 [low sensitivity] -Note - Gas sensor need to be heated, first minute the data is incorrect. +Note - Gas sensors need to be heated, first minute the data is incorrect. diff --git a/src/gas/gas.cxx b/src/gas/gas.cxx index 5ae91f1d..64415f1d 100644 --- a/src/gas/gas.cxx +++ b/src/gas/gas.cxx @@ -55,7 +55,7 @@ Gas::getSampledWindow (unsigned int freqMS, unsigned int numberOfSamples, return 0; } - // too much samples + // too many samples if (numberOfSamples > 0xFFFFFF) { return 0; } diff --git a/src/gas/gas.h b/src/gas/gas.h index 18ce111f..b32647c4 100644 --- a/src/gas/gas.h +++ b/src/gas/gas.h @@ -36,13 +36,17 @@ struct thresholdContext { namespace upm { /** - * @brief gas sensor library + * @brief Gas Sensor Library + * + * Sensor Library for air quality and gas detecting sensors. Base class Gas provides buffered + * sampling, threshold checking, a basic printing function and a standard read function. + * * @defgroup gas libupm-gas */ class Gas { public: /** - * Instanciates a Gas object + * Instantiates a Gas object * * @param gasPin pin where gas is connected */ @@ -57,9 +61,9 @@ class Gas { * Get samples from gas sensor according to provided window and * number of samples * - * @param freqMS time between each sample (in microseconds) + * @param freqMS time between each sample (in milliseconds) * @param numberOfSamples number of sample to sample for this window - * @param buffer bufer with sampled data + * @param buffer buffer with sampled data */ virtual int getSampledWindow (unsigned int freqMS, unsigned int numberOfSamples, uint16_t * buffer); @@ -70,12 +74,12 @@ class Gas { * @param ctx threshold context * @param threshold sample threshold * @param buffer buffer with samples - * @param len bufer len + * @param len buffer length */ virtual int findThreshold (thresholdContext* ctx, unsigned int threshold, uint16_t * buffer, unsigned int len); /** - * Return avarage data for the sampled window + * Return average data for the sampled window * * @param ctx threshold context */ diff --git a/src/gas/mq2.h b/src/gas/mq2.h index f1c1078e..b9619147 100644 --- a/src/gas/mq2.h +++ b/src/gas/mq2.h @@ -34,18 +34,18 @@ namespace upm { * The Grove - Gas Sensor (MQ2) module is useful for gas leakage detecting * (in home and industry). It can detect LPG, i-butane, methane, alcohol, * Hydrogen, smoke and other combustible gases. It's a medium sensitivity - * sensor with a detect concentration of 300-10000ppm. + * sensor with a detect concentration of 300-10000 ppm. * * @ingroup gas analog * @snippet mq2.cxx Interesting - * @image html grovegas.jpeg + * @image html mq2-5.jpeg */ class MQ2 : public Gas { public: /** * MQ2 constructor * - * @param gasPin analog pin where sensor connected + * @param gasPin analog pin where sensor is connected */ MQ2 (int gasPin); diff --git a/src/gas/mq3.h b/src/gas/mq3.h index 55f33546..49cefe05 100644 --- a/src/gas/mq3.h +++ b/src/gas/mq3.h @@ -33,19 +33,19 @@ namespace upm { * * The Grove MQ3 Gas Sensor module is useful for gas leakage detecting (in * home and industry). It can detect Alcohol Vapour and Benzine. It's - * highly sensitive but has a long warmup time of about 1minute. It's - * detect rate is of 0.04-4mg/L Alcohol. + * highly sensitive but has a long warm-up time of about 1 minute. It's + * detect rate is of 0.04-4 mg/L Alcohol. * * @ingroup gas analog * @snippet mq3.cxx Interesting - * @image html grovegas.jpeg + * @image html mq3-9.jpeg */ class MQ3 : public Gas { public: /** * MQ3 constructor * - * @param gasPin analog pin where sensor connected + * @param gasPin analog pin where sensor is connected */ MQ3 (int gasPin); diff --git a/src/gas/mq5.h b/src/gas/mq5.h index 2a517272..5adf7d0e 100644 --- a/src/gas/mq5.h +++ b/src/gas/mq5.h @@ -34,18 +34,18 @@ namespace upm { * The Grove - Gas Sensor (MQ5) module is useful for gas leakage detecting * (in home and industry). It can detect LPG, natural gas, town gas and so * on. It is highly sensitive and has a detection concentration of - * 300-10000ppm. + * 300-10000 ppm. * * @ingroup gas analog * @snippet mq5.cxx Interesting - * @image html grovegas.jpeg + * @image html mq2-5.jpeg */ class MQ5 : public Gas { public: /** * MQ5 constructor * - * @param gasPin analog pin where sensor connected + * @param gasPin analog pin where sensor is connected */ MQ5 (int gasPin); diff --git a/src/gas/mq9.h b/src/gas/mq9.h index e167fc1f..3e2145ab 100644 --- a/src/gas/mq9.h +++ b/src/gas/mq9.h @@ -33,18 +33,18 @@ namespace upm { * * The Grove MQ9 Gas Sensor module is useful for gas leakage detecting (in * home and industry). It can detect Carbon Monoxide, Coal Gas and - * Liquefied Gas. It's sensitivty is 10-1000ppmCO 100-10000PPm Gas. + * Liquefied Gas. It's sensitivity is 10-1000 ppm CO, 100-10000 ppm Gas. * * @ingroup gas analog * @snippet mq9.cxx Interesting - * @image html mq9.jpeg + * @image html mq3-9.jpeg */ class MQ9 : public Gas { public: /** * Jhd1313m1 constructor * - * @param gasPin analog pin where sensor connected + * @param gasPin analog pin where sensor is connected */ MQ9 (int gasPin);