diff --git a/src/shared/sensors/ADS1118/ADS1118.h b/src/shared/sensors/ADS1118/ADS1118.h index 7a945166bf926962aed19263291d1b4c174e4e8e..dfdb2bab87f1431518c45a121c4540fde5aac831 100644 --- a/src/shared/sensors/ADS1118/ADS1118.h +++ b/src/shared/sensors/ADS1118/ADS1118.h @@ -44,21 +44,21 @@ namespace Boardcore * value while writing the configuration. * * Data rate between 8Hz and 860Hz can be programmed and an internal - * programmable gain aplifier can be set with a sensitivity range from ±0.256V + * programmable gain amplifier can be set with a sensitivity range from ±0.256V * to ±6.144V (note that the inputs must remain between VCC or GND). * * The data rate should be choosen as low as possible to allow the delta-sigma * adc to average the input voltage (this allows a less noisy reading). * * The device can work in two modes: - * - CONTIN_CONV_MODE: Continuosly read the last configured channel, when you - * make a read you'll obtain the lates reading + * - CONTINUOUS_CONV_MODE: Continuously read the last configured channel, when + * you make a read you'll obtain the lates reading * - SINGLE_SHOT_MODE: A single conversion is performed when the configuration * is written * * The ADS1118 is a simple device, it has a single data register where it can * store the reading, therefore it can sample a single input at a time. sample() - * cylces through the enabled channels one at a time and writes it's + * cycles through the enabled channels one at a time and writes it's * configuration while reading the value of the previous written one. * * As an example if you need to read 4 inputs at 50Hz you should set all the @@ -95,9 +95,9 @@ public: enum ADS1118Mode { - CONTIN_CONV_MODE = 0x0, ///< Continuous-conversion mode - SINGLE_SHOT_MODE = 0x1 ///< Power-down and single-shot mode (default) - }; ///< Conversione mode values + CONTINUOUS_CONV_MODE = 0x0, ///< Continuous-conversion mode + SINGLE_SHOT_MODE = 0x1 ///< Power-down and single-shot mode (default) + }; ///< Conversion mode values enum ADS1118DataRate { @@ -115,7 +115,7 @@ public: { ADC_MODE = 0x0, ///< ADC mode (default) TEMP_SENSOR_MODE = 0x1 ///< Temperature sensor mode - }; ///< Temeprature or ADC mode values + }; ///< Temperature or ADC mode values enum ADS1118PullUp { @@ -166,7 +166,7 @@ public: static constexpr int8_t INVALID_CHANNEL = -1; /** - * @brief Construct a new ADS1118 object specifing spi bus, spi config and + * @brief Construct a new ADS1118 object specifying spi bus, spi config and * cs pin as well as device configuration. */ ADS1118(SPIBusInterface &bus, miosix::GpioPin cs, ADS1118Config config_, @@ -302,7 +302,7 @@ private: void readChannel(int8_t nextChannel, int8_t prevChannel); /** - * @brief Reads on the fly the speficied channel. + * @brief Reads on the fly the specified channel. */ void readChannel(int8_t channel); @@ -341,7 +341,7 @@ private: /** * This masks excludes 2 bits from the configuration, the reserved bit and - * the sigle shot bit + * the single shot bit. */ static constexpr uint16_t CONFIG_MASK = 0xFE7F; }; diff --git a/src/shared/sensors/MAX31855/MAX31855.h b/src/shared/sensors/MAX31855/MAX31855.h index 89aa3484f0dc2e589c35f96329bfac0536d22896..4eb7368651024fc5490404ee61a65835559384ee 100644 --- a/src/shared/sensors/MAX31855/MAX31855.h +++ b/src/shared/sensors/MAX31855/MAX31855.h @@ -29,7 +29,7 @@ namespace Boardcore { /** - * @brief MAX31855 termocouple sensor driver. + * @brief MAX31855 thermocouple sensor driver. */ class MAX31855 : public Sensor<TemperatureData> { @@ -54,9 +54,9 @@ public: bool init(); /** - * @brief Checks wheter the termocouple is open. + * @brief Checks whether the thermocouple is open. * - * @return True if the termocouple is connected. + * @return True if the thermocouple is connected. */ bool selfTest(); diff --git a/src/shared/sensors/SensorInfo.h b/src/shared/sensors/SensorInfo.h index 2fc741efec5baaf58f12ec0d862dd16fcb11d3a2..804c0b0a863adfd8b97003e5563613e5d3716b6c 100644 --- a/src/shared/sensors/SensorInfo.h +++ b/src/shared/sensors/SensorInfo.h @@ -33,7 +33,7 @@ namespace Boardcore * * This structure contains the sampling period of a sensor, * the function to be called after the sampling (callback) and - * oneboolean indicating if the sensor has to be sampled (is enabled). + * one boolean indicating if the sensor has to be sampled (is enabled). */ struct SensorInfo { diff --git a/src/shared/sensors/SensorManager.h b/src/shared/sensors/SensorManager.h index 3f6cd41900795f9ebcee5c4a26ca9b0891598177..abfd8be6409634e8095cf18152d50cb95813729d 100644 --- a/src/shared/sensors/SensorManager.h +++ b/src/shared/sensors/SensorManager.h @@ -101,14 +101,14 @@ public: const vector<TaskStatsResult> getSamplersStats(); private: - SensorManager(const SensorManager&) = delete; + SensorManager(const SensorManager&) = delete; SensorManager& operator=(const SensorManager&) = delete; /** * @brief Initializes samplers vector and sensorsMap with the given sensors * map, giving incremental IDs to SensorSampler objects. * - * In case a TaskScheduler was passed in the costructor, the SensorManager + * In case a TaskScheduler was passed in the constructor, the SensorManager * will assign to SensorSamplers incremental IDs starting from the maximum * among the tasks already existing in the TaskScheduler. * diff --git a/src/shared/sensors/UBXGPS/UBXGPSSerial.cpp b/src/shared/sensors/UBXGPS/UBXGPSSerial.cpp index 3c63ac353610543a18299cbfedf5739986b268ab..c709c9d97a390a2dc555fbbbed16443c1b8f621c 100644 --- a/src/shared/sensors/UBXGPS/UBXGPSSerial.cpp +++ b/src/shared/sensors/UBXGPS/UBXGPSSerial.cpp @@ -162,13 +162,13 @@ bool UBXGPSSerial::setSerialCommunication() // Close the gps file if already opened devFs->remove(serialPortName); - // Open the serial port device with the default boudrate + // Open the serial port device with the default baudrate if (!devFs->addDevice(serialPortName, intrusive_ref_ptr<Device>(new STM32Serial( serialPortNumber, defaultBaudrate)))) { LOG_ERR(logger, - "[gps] Failed to open serial port {0} with baudrate {1} as " + "Failed to open serial port {0} with baudrate {1} as " "file {2}", serialPortNumber, defaultBaudrate, serialPortName); return false; @@ -181,7 +181,7 @@ bool UBXGPSSerial::setSerialCommunication() return false; } - // Change boudrate + // Change baudrate if (!setBaudrate()) { return false; @@ -203,7 +203,7 @@ bool UBXGPSSerial::setSerialCommunication() } } - // Reopen the serial port with the configured boudrate + // Reopen the serial port with the configured baudrate if (!devFs->addDevice(serialPortName, intrusive_ref_ptr<Device>( new STM32Serial(serialPortNumber, baudrate)))) @@ -247,11 +247,11 @@ bool UBXGPSSerial::setDynamicModelToAirborne4g() { uint8_t payload[] = { 0x01, 0x00, // Parameters bitmask, apply dynamic model configuration - 0x08, // Dynamic model = airbone 4g + 0x08, // Dynamic model = airborne 4g 0x00, // Fix mode 0x00, 0x00, 0x00, 0x00, // Fixed altitude for 2D mode 0x00, 0x00, 0x00, 0x00, // Fixed altitude variance for 2D mode - 0x00, // Minimun elevation for a GNSS satellite to be used + 0x00, // Minimum elevation for a GNSS satellite to be used 0x00, // Reserved 0x00, 0x00, // Position DOP mask to use 0x00, 0x00, // Time DOP mask to use diff --git a/src/tests/sensors/calibration/test-calibration-stats.cpp b/src/tests/sensors/calibration/test-calibration-stats.cpp index 40aa29ad31fb57621dc67c00d6c83193c4b6d30b..4fee619509453ac66db22b0a01756dbecbf49dc4 100644 --- a/src/tests/sensors/calibration/test-calibration-stats.cpp +++ b/src/tests/sensors/calibration/test-calibration-stats.cpp @@ -128,7 +128,7 @@ int main() const char* yLabel = humanFriendlyDirection[(uint8_t)orientations[i].yAxis]; - printf(" %d. X towards %s, Y towards %s (%d samples)", i, + printf(" %d. X towards %s, Y towards %s (%ld samples)", i, xLabel, yLabel, xAxis[i].getStats().nSamples); if (selected == i) @@ -146,7 +146,7 @@ int main() printf("Current orientation is: X towards %s, Y towards %s\n", xLabel, yLabel); - printf("You took %d samples for each axis on this orientation.\n", + printf("You took %ld samples for each axis on this orientation.\n", xAxis[selected].getStats().nSamples); } else if (!strncmp("onext", input, 5)) @@ -292,7 +292,7 @@ int main() } else if (!strncmp("samples", input, 7)) { - printf("Taken %d samples on the current orientation.\n", + printf("Taken %ld samples on the current orientation.\n", xAxis[selected].getStats().nSamples); } else