Skip to content

Commit

Permalink
Make Spell-check workflow happy 😊 (#121)
Browse files Browse the repository at this point in the history
* docs: spelling fixes

* docs: `Commander.py` spelling fixes

* ci: update ignored word list

* docs: Add pres to ignored word list

* ci: change words to lower case

* ci: add `ser` to ignored word list

* fix: add missing `.` to `.codespellrc`

* docs: fix more spelling

* docs: replace `colour` with US spelling `color`
  • Loading branch information
aliphys authored Nov 28, 2023
1 parent ca3fbc8 commit 22a1f2b
Show file tree
Hide file tree
Showing 23 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion codespellrc → .codespellrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See: https://github.com/codespell-project/codespell#using-a-config-file
[codespell]
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
ignore-words-list = ,
ignore-words-list = pevent, ot, oce, pres, ser
skip = ./.git,./.licenses,__pycache__,node_modules,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock
builtin = clear,informal,en-GB_to_en-US
check-filenames =
Expand Down
4 changes: 2 additions & 2 deletions Arduino_BHY2/docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This library allows the Nicla Sense ME to interface with the onboard 6-axis IMU
- Easy access to data from Nicla Sense ME sensors using sensor ID
- Wrapper for [Bosch BHY2-Sensor-API](https://github.com/BoschSensortec/BHY2-Sensor-API)
- DFU (Device Firmware Update) of the ANNA-B112 and the BHI260AP
- All functionality avaliable over both ESLOV and BLE
- All functionality available over both ESLOV and BLE

## Usage

Expand Down Expand Up @@ -35,7 +35,7 @@ For additional information on the Arduino_BHY2 library (including a list of Sens
- [App](https://github.com/arduino-libraries/Arduino_BHY2/blob/main/examples/App/App.ino) : Control Nicla Sense ME from an external device acting as a host via I2C or ESLOV
- [AppLowDelay](https://github.com/arduino-libraries/Arduino_BHY2/blob/main/examples/AppLowDelay/AppLowDelay.ino) : Control Nicla Sense ME from an external device acting as a host via I2C or ESLOV with a lower delay
- [BHYFirmwareUpdate](https://github.com/arduino-libraries/Arduino_BHY2/tree/main/examples/BHYFirmwareUpdate) : Update BHI260 firmware to latest version. Can also be used to upload custom firmware binary.
- [Fail_Safe_flasher](https://github.com/arduino-libraries/Arduino_BHY2/blob/main/examples/Fail_Safe_flasher/Fail_Safe_flasher.ino) : Fail Safe flashing of a RGB blink sketch. Writes binary file to the SPI flash, then peforms CRC to ensure successful writing of binary file to flash memory.
- [Fail_Safe_flasher](https://github.com/arduino-libraries/Arduino_BHY2/blob/main/examples/Fail_Safe_flasher/Fail_Safe_flasher.ino) : Fail Safe flashing of a RGB blink sketch. Writes binary file to the SPI flash, then performs CRC to ensure successful writing of binary file to flash memory.
- [ReadSensorConfiguration](https://github.com/arduino-libraries/Arduino_BHY2/blob/main/examples/ReadSensorConfiguration/ReadSensorConfiguration.ino) : Send sample rate, latency and range for accelerator, gyroscope, rotation, temperature and gas sensor over Serial
- [ShowSensorList](https://github.com/arduino-libraries/Arduino_BHY2/blob/main/examples/ShowSensorList/ShowSensorList.ino) : List sensors of the Nicla Sense ME board
- [Standalone](https://github.com/arduino-libraries/Arduino_BHY2/blob/main/examples/Standalone/Standalone.ino) : Read motion, temperature and gas data and send over Serial
Expand Down
2 changes: 1 addition & 1 deletion Arduino_BHY2/examples/BHYFirmwareUpdate/conv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ -f "$1" ] ; then
echo const > fw.h && xxd -i BHI260AP_NiclaSenseME-flash.fw >> fw.h
else
echo "Usage: $0 <bhy_fw_bin_filename>"
echo "\t<bhy_fw_bin_filename> ususally has a pattern: xxxx-flash.fw"
echo "\t<bhy_fw_bin_filename> usually has a pattern: xxxx-flash.fw"
echo "\tExample:"
echo "\t\t$0 ./BHI260AP_NiclaSenseME_basic+bsec-flash.fw"
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* This sketch shows how the Nicla board could be used to scan / classify certian gases of interest
* This sketch shows how the Nicla board could be used to scan / classify certain gases of interest
* using the on-board BME688 4-in-1 evnironmental sensor cluster
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class BSEC2DataLogConverter():
# sometimes you may want to add an offset to the converted data in situations such as reset of the board, this way
# the converted data contains timestamp that will succeed eariler log files,
# the converted data contains timestamp that will succeed earlier log files,
# otherwise, there will be overlap of timestamp ranges among the converted data which might confuse the AI studio software
def __init__(self, log_file_name, gas_label, bmeconfig_file, timestamp_offset_ms = 0, dbg=False):
self.log_file_name = log_file_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# It waits for user input to control the data acquisition operations and the
# connection to the Arduino board and to save the received data to a CSV file.
#
# It establish a serial communication to the board and uses COBS as enconding and
# It establish a serial communication to the board and uses COBS as encoding and
# reliable transport protocol.
#
# The main thread will always wait for user input while a second one is created
Expand Down Expand Up @@ -35,7 +35,7 @@


# The main serial object
# Initialise later
# initialize later
ser = serial.Serial()

# The function to be run in the Arduino-facing thread
Expand Down Expand Up @@ -96,7 +96,7 @@ def receiver(cmd_q, uart, name, tag):
# The main thread
if __name__ == '__main__':

# Parse arugments
# Parse arguments
# - port == Arduino Serial Port
# - name == Filename
# - tag == Custom tag to append to filename
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
This example shows how to use MbedOS-native Storage APIs
- https://os.mbed.com/docs/mbed-os/v6.15/apis/data-storage.html
C/C++ storage APIs are supporte too
C/C++ storage APIs are supported too
- C-based STDIO: https://en.cppreference.com/w/cpp/header/cstdio
- Stream-based: https://en.cppreference.com/w/cpp/io
*/
Expand Down Expand Up @@ -58,7 +58,7 @@ void setup()
}
Serial.println(" done.");

Serial.print("Initialising the sensors... ");
Serial.print("Initializing the sensors... ");
BHY2.begin();

accel.begin();
Expand Down
4 changes: 2 additions & 2 deletions Arduino_BHY2/src/Arduino_BHY2.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ enum NiclaWiring {
*
*/
enum NiclaConfig {
NICLA_I2C = 0x1, /*!< I2C Configuration, relavent for both ESLOV and Shield configurations */
NICLA_I2C = 0x1, /*!< I2C Configuration, relevant for both ESLOV and Shield configurations */
NICLA_BLE = 0x2, /*!< Bluetooth via the onboard ANNA-B112 module */
NICLA_BLE_AND_I2C = NICLA_I2C | NICLA_BLE,/*!< Enable I2C (ESLOV/Shield) and BLE simultaneously */
NICLA_STANDALONE = 0x4 /*!< Operate in standalone, without external data transfer */
Expand Down Expand Up @@ -81,7 +81,7 @@ class Arduino_BHY2 {

// Necessary API. Update function should be continuously polled
/**
* @brief Initialise the BHY2 functionality for the Nicla Sense ME, for a given @ref NiclaSettings configuration.
* @brief initialize the BHY2 functionality for the Nicla Sense ME, for a given @ref NiclaSettings configuration.
*
* @note When called without input parameters, I2C and BLE are enabled by default. I2C communication is over ESLOV.
*
Expand Down
4 changes: 2 additions & 2 deletions Arduino_BHY2/src/BLEHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class BLEHandler {
virtual ~BLEHandler();

/**
* @brief Set advertised local name and initialise BLE advertising for DFU and sensor data transfer
* @brief Set advertised local name and initialize BLE advertising for DFU and sensor data transfer
*
* @return true Successful initialisation of BLE device
* @return true Successful initialization of BLE device
*/
bool begin();
/**
Expand Down
2 changes: 1 addition & 1 deletion Arduino_BHY2/src/BoschParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class BoschParser {

private:
/**
* @brief The Arduino_BHY2 class can accces both private and public methods of BoschParser
* @brief The Arduino_BHY2 class can access both private and public methods of BoschParser
*
*/
friend class Arduino_BHY2;
Expand Down
16 changes: 8 additions & 8 deletions Arduino_BHY2/src/BoschSensortec.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ extern "C"
*
*/
enum SensorAckCode {
SensorAck = 0x0F, /*!< Acknowledgement */
SensorNack = 0x00 /*!< Negative Acknowledgement */
SensorAck = 0x0F, /*!< Acknowledgment */
SensorNack = 0x00 /*!< Negative Acknowledgment */
};

/**
Expand All @@ -55,7 +55,7 @@ class BoschSensortec {
/**
* @brief Setup SPI interface between BHI260 and ANNA-B112
*
* @return true successful initialisation of SPI interface
* @return true successful initialization of SPI interface
*/
bool begin();
/**
Expand Down Expand Up @@ -107,15 +107,15 @@ class BoschSensortec {
bool hasSensor(uint8_t sensorId);

/**
* @brief Return available size of avaliable sensor data
* @brief Return available size of available sensor data
*
* @return uint8_t size of avaliable sensor data
* @return uint8_t size of available sensor data
*/
uint8_t availableSensorData();
/**
* @brief Return available size of avaliable long sensor data
* @brief Return available size of available long sensor data
*
* @return uint8_t size of avaliable sensor long data
* @return uint8_t size of available sensor long data
*/
uint8_t availableLongSensorData();
/**
Expand Down Expand Up @@ -165,7 +165,7 @@ class BoschSensortec {

private:
/**
* @brief The Arduino_BHY2 class can accces both private and public methods of BoschSensortec
* @brief The Arduino_BHY2 class can access both private and public methods of BoschSensortec
*
*/
friend class Arduino_BHY2;
Expand Down
8 changes: 4 additions & 4 deletions Arduino_BHY2/src/DFUManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ enum DFUType {
};

/**
* @brief Acknowledgement handler for the DFU
* @brief Acknowledgment handler for the DFU
*
*/
enum DFUAckCode {
DFUAck = 0x0F, /*!< Acknowledgement */
DFUNack = 0x00 /*!< Negative Acknowledgement */
DFUAck = 0x0F, /*!< Acknowledgment */
DFUNack = 0x00 /*!< Negative Acknowledgment */
};

/**
Expand Down Expand Up @@ -104,7 +104,7 @@ class DFUManager {

private:
/**
* @brief The Arduino_BHY2 class can accces both private and public methods of DFUManager
* @brief The Arduino_BHY2 class can access both private and public methods of DFUManager
*
*/
friend class Arduino_BHY2;
Expand Down
4 changes: 2 additions & 2 deletions Arduino_BHY2/src/EslovHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class EslovHandler {
/**
* @brief Start I2C communication over ESLOV
*
* @return true I2C communication initialised successfully.
* @return true I2C communication initialized successfully.
*/
bool begin();
/**
Expand Down Expand Up @@ -89,7 +89,7 @@ class EslovHandler {

private:
/**
* @brief The Arduino_BHY2 class can accces both private and public methods of EslovHandler
* @brief The Arduino_BHY2 class can access both private and public methods of EslovHandler
*
*/
friend class Arduino_BHY2;
Expand Down
2 changes: 1 addition & 1 deletion Arduino_BHY2/src/sensors/DataParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct DataBSEC {
uint16_t iaq_s; //iaq value for stationary use cases
float b_voc_eq; //breath VOC equivalent (ppm)
uint32_t co2_eq; //CO2 equivalent (ppm) [400,]
float comp_t; //compensated temperature (celcius)
float comp_t; //compensated temperature (celsius)
float comp_h; //compensated humidity
uint32_t comp_g; //compensated gas resistance (Ohms)
uint8_t accuracy; //accuracy level: [0-3]
Expand Down
2 changes: 1 addition & 1 deletion Arduino_BHY2Host/src/Arduino_BHY2Host.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Arduino_BHY2Host {
void configureSensor(SensorConfigurationPacket& config);
void configureSensor(uint8_t sensorId, float sampleRate, uint32_t latency);
/**
* @brief Recieve acknowledgement from Nicla board over ESLOV
* @brief Receive Acknowledgment from Nicla board over ESLOV
*
* @return uint8_t One byte of data read from the I2C bus.
*/
Expand Down
2 changes: 1 addition & 1 deletion Arduino_BHY2Host/src/BLEHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class BLEHandler {
BLEHandler();
virtual ~BLEHandler();
/**
* @brief Initialise BLE for DFU and sensor data transfer and connect to Nicla device
* @brief initialize BLE for DFU and sensor data transfer and connect to Nicla device
*
* @return true successful connection to Nicla over BLE
*
Expand Down
12 changes: 6 additions & 6 deletions Arduino_BHY2Host/src/EslovHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class EslovHandler {
/**
* @brief Start I2C communication over ESLOV between host board and Nicla
*
* @return true I2C communication initialised successfully.
* @return true I2C communication initialized successfully.
*/
bool begin(bool passthrough);
/**
Expand Down Expand Up @@ -91,30 +91,30 @@ class EslovHandler {
/**
* @brief Requests an acknowledgment packet from the Nicla over ESLOV.
*
* @return uint8_t acknowledge packet recieved from the Nicla over ESLOV
* @return uint8_t acknowledge packet Received from the Nicla over ESLOV
*/
uint8_t requestPacketAck();
/**
* @brief Change `EslovState` of Nicla to `ESLOV_AVAILABLE_SENSOR_STATE` and wait for the interrupt pin to go high. Then read the avaliable sensor data over I2C.
* @brief Change `EslovState` of Nicla to `ESLOV_AVAILABLE_SENSOR_STATE` and wait for the interrupt pin to go high. Then read the available sensor data over I2C.
*
* @return uint8_t Number of available sensor data packets.
*/
uint8_t requestAvailableData();
/**
* @brief Change `EslovState` of Nicla to `ESLOV_AVAILABLE_SENSOR_STATE` and wait for the interrupt pin to go high. Then read the avaliable long sensor data over I2C.
* @brief Change `EslovState` of Nicla to `ESLOV_AVAILABLE_SENSOR_STATE` and wait for the interrupt pin to go high. Then read the available long sensor data over I2C.
*
* @return uint8_t Number of available long sensor data packets.
*/
uint8_t requestAvailableLongData();
/**
* @brief Change `EslovState` of Nicla to `ESLOV_READ_SENSOR_STATE` and wait for the interrupt pin to go high. Then read the avaliable sensor data over I2C.
* @brief Change `EslovState` of Nicla to `ESLOV_READ_SENSOR_STATE` and wait for the interrupt pin to go high. Then read the available sensor data over I2C.
*
* @param sData data packet containing sensorID, payload size and data payload
* @return true Successful request of sensor data
*/
bool requestSensorData(SensorDataPacket &sData);
/**
* @brief Change `EslovState` of Nicla to `ESLOV_READ_SENSOR_STATE` and wait for the interrupt pin to go high. Then read the avaliable long sensor data over I2C.
* @brief Change `EslovState` of Nicla to `ESLOV_READ_SENSOR_STATE` and wait for the interrupt pin to go high. Then read the available long sensor data over I2C.
*
* @param sData data packet containing sensorID, payload size and data payload
* @return true Successful request of sensor data
Expand Down
2 changes: 1 addition & 1 deletion Arduino_BHY2Host/src/sensors/DataParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct DataBSEC {
uint16_t iaq_s; //iaq value for stationary use cases
float b_voc_eq; //breath VOC equivalent (ppm)
uint32_t co2_eq; //CO2 equivalent (ppm) [400,]
float comp_t; //compensated temperature (celcius)
float comp_t; //compensated temperature (celsius)
float comp_h; //compensated humidity
uint32_t comp_g; //compensated gas resistance (Ohms)
uint8_t accuracy; //accuracy level: [0-3]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,5 @@ Then, Nicla will reset and the firmware will be updated.
- Execute the command `./bhy dfu -p YOUR_PORT -t TARGET -bin BIN_FILE`
* Replace `YOUR_PORT` with the serial port used by the arduino board
* Replace `TARGET` with `nicla` or `bhi`
* Replace `BIN_FILE` with the path of the binary file to bu uploaded
* Replace `BIN_FILE` with the path of the binary file to be uploaded
- Nicla will reset and the firmware will be updated
4 changes: 2 additions & 2 deletions bootloader/examples/Blink_Unisense/Blink_Unisense.ino
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void setup() {

// init
writeByte(IS31FL3194_ADDRESS, IS31FL3194_OP_CONFIG, 0x01); // normal operation in current mode
writeByte(IS31FL3194_ADDRESS, IS31FL3194_OUT_CONFIG, 0x07); // enable all three ouputs
writeByte(IS31FL3194_ADDRESS, IS31FL3194_OUT_CONFIG, 0x07); // enable all three outputs
writeByte(IS31FL3194_ADDRESS, IS31FL3194_CURRENT_BAND, 0x00); // 10 mA max current
writeByte(IS31FL3194_ADDRESS, IS31FL3194_HOLD_FUNCTION, 0x00); // hold function disable

Expand All @@ -48,7 +48,7 @@ void setup() {
}

void loop() {
//cycle through LED colour configurations
//cycle through LED color configurations
ledBlink(green, 1000);
delay(1000);
ledBlink(blue, 1000);
Expand Down
2 changes: 1 addition & 1 deletion bootloader/src/BQ25120A.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#define BQ25120A_ADDRESS 0x6A

// Regsiter Map
// Register Map
// https://www.ti.com/lit/ds/symlink/bq25120a.pdf?ts=1610608851953&ref_url=https%253A%252F%252Fwww.startpage.com%252F
#define BQ25120A_STATUS 0x00
#define BQ25120A_FAULTS 0x01
Expand Down
2 changes: 1 addition & 1 deletion bootloader/src/IS31FL3194.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef IS31FL3194_h
#define IS31FL3194_h

// Regsiter Map
// Register Map
// http://www.issi.com/WW/pdf/IS31FL3194.pdf
#define IS31FL3194_PRODUCT_ID 0x00 // should return 0xCE
#define IS31FL3194_OP_CONFIG 0x01
Expand Down
2 changes: 1 addition & 1 deletion bootloader/src/led_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void IS31FL3194::powerUp()
void IS31FL3194::init()// configure rgb led function
{
writeByte(IS31FL3194_ADDRESS, IS31FL3194_OP_CONFIG, 0x01); // normal operation in current mode
writeByte(IS31FL3194_ADDRESS, IS31FL3194_OUT_CONFIG, 0x07); // enable all three ouputs
writeByte(IS31FL3194_ADDRESS, IS31FL3194_OUT_CONFIG, 0x07); // enable all three outputs
writeByte(IS31FL3194_ADDRESS, IS31FL3194_CURRENT_BAND, 0x00); // 10 mA max current
writeByte(IS31FL3194_ADDRESS, IS31FL3194_HOLD_FUNCTION, 0x00); // hold function disable
}
Expand Down

0 comments on commit 22a1f2b

Please sign in to comment.