diff --git a/README.md b/README.md index cb68c9609..3c31dd174 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Please submit PR's using 'dev' as the base branch! For minor changes just submit your PR and I'll try to review it, but for anything more 'impactful' please open an Issue first and start a discussion. Is better to sound out what it is you want to achieve first, and try to come to a consensus on what the best approach is, especially when it impacts the structure or architecture of this codebase. Here are some general principals you should try to adhere to: -* Keep it simple. Please, don't think like a high-level lang programmer. Think embedded, and keep code concise, without any unecessary layers. +* Keep it simple. Please, don't think like a high-level lang programmer. Think embedded, and keep code concise, without any unnecessary layers. * No dynamic memory allocation, except during setup/begin functions. * Use the same brace and indenting style that's in the core source modules. (A .clang-format is prob going to be added soon, but please do NOT retroactively re-format existing code. This just creates unnecessary diffs that make finding problems harder) @@ -106,7 +106,7 @@ There are a number of fairly major features in the pipeline, with no particular - [ ] Core + Apps: support for LZW message compression - [ ] Core: dynamic CR (Coding Rate) for weak vs strong hops - [ ] Core: new framework for hosting multiple virtual nodes on one physical device -- [ ] V2 protocol spec: discussion and concensus around V2 packet protocol, including path hashes, new encryption specs, etc +- [ ] V2 protocol spec: discussion and consensus around V2 packet protocol, including path hashes, new encryption specs, etc ## 📞 Get Support diff --git a/arch/stm32/Adafruit_LittleFS_stm32/src/Adafruit_LittleFS.cpp b/arch/stm32/Adafruit_LittleFS_stm32/src/Adafruit_LittleFS.cpp index 0c9c97b5b..601cd05d0 100644 --- a/arch/stm32/Adafruit_LittleFS_stm32/src/Adafruit_LittleFS.cpp +++ b/arch/stm32/Adafruit_LittleFS_stm32/src/Adafruit_LittleFS.cpp @@ -64,7 +64,7 @@ bool Adafruit_LittleFS::begin (struct lfs_config * cfg) _lockFS(); bool ret; - // not a loop, just an quick way to short-circuit on error + // not a loop, just a quick way to short-circuit on error do { if (_mounted) { ret = true; break; } if (cfg) { _lfs_cfg = cfg; } @@ -102,7 +102,7 @@ bool Adafruit_LittleFS::format (void) int err = LFS_ERR_OK; bool attemptMount = _mounted; - // not a loop, just an quick way to short-circuit on error + // not a loop, just a quick way to short-circuit on error do { // if already mounted: umount first -> format -> remount diff --git a/arch/stm32/Adafruit_LittleFS_stm32/src/littlefs/README.md b/arch/stm32/Adafruit_LittleFS_stm32/src/littlefs/README.md index 623ba0ae4..d8387cec9 100644 --- a/arch/stm32/Adafruit_LittleFS_stm32/src/littlefs/README.md +++ b/arch/stm32/Adafruit_LittleFS_stm32/src/littlefs/README.md @@ -21,7 +21,7 @@ storage on disk is always kept in a valid state. **Wear leveling** - Since the most common form of embedded storage is erodible flash memories, littlefs provides a form of dynamic wear leveling for systems -that can not fit a full flash translation layer. +that cannot fit a full flash translation layer. ## Example @@ -123,7 +123,7 @@ integrity. If your storage caches writes, make sure that the provided `sync` function flushes all the data to memory and ensures that the next read fetches the data -from memory, otherwise data integrity can not be guaranteed. If the `write` +from memory; otherwise, data integrity cannot be guaranteed. If the `write` function does not perform caching, and therefore each `read` or `write` call hits the memory, the `sync` function can simply return 0. @@ -139,7 +139,7 @@ with all the nitty-gritty details. Can be useful for developing tooling. ## Testing The littlefs comes with a test suite designed to run on a PC using the -[emulated block device](emubd/lfs_emubd.h) found in the emubd directory. +[emulated block device](https://github.com/littlefs-project/littlefs/blob/master/bd/lfs_emubd.h). The tests assume a Linux environment and can be started with make: ``` bash @@ -174,4 +174,4 @@ handy. [littlefs-js](https://github.com/geky/littlefs-js) - A javascript wrapper for littlefs. I'm not sure why you would want this, but it is handy for demos. -You can see it in action [here](http://littlefs.geky.net/demo.html). +You can [see it in action](http://littlefs.geky.net/demo.html). diff --git a/arch/stm32/Adafruit_LittleFS_stm32/src/littlefs/lfs.c b/arch/stm32/Adafruit_LittleFS_stm32/src/littlefs/lfs.c index f9d9ce344..7d42c8d8d 100644 --- a/arch/stm32/Adafruit_LittleFS_stm32/src/littlefs/lfs.c +++ b/arch/stm32/Adafruit_LittleFS_stm32/src/littlefs/lfs.c @@ -438,7 +438,7 @@ static int lfs_dir_alloc(lfs_t *lfs, lfs_dir_t *dir) { static int lfs_dir_fetch(lfs_t *lfs, lfs_dir_t *dir, const lfs_block_t pair[2]) { - // copy out pair, otherwise may be aliasing dir + // copy out pair; otherwise, may be aliasing dir const lfs_block_t tpair[2] = {pair[0], pair[1]}; bool valid = false; @@ -482,7 +482,7 @@ static int lfs_dir_fetch(lfs_t *lfs, valid = true; - // setup dir in case it's valid + // set up dir in case it's valid dir->pair[0] = tpair[(i+0) % 2]; dir->pair[1] = tpair[(i+1) % 2]; dir->off = sizeof(dir->d); @@ -2328,7 +2328,7 @@ static int lfs_pred(lfs_t *lfs, const lfs_block_t dir[2], lfs_dir_t *pdir) { return 0; } - // iterate over all directory directory entries + // iterate over all directory entries int err = lfs_dir_fetch(lfs, pdir, (const lfs_block_t[2]){0, 1}); if (err) { return err; @@ -2357,7 +2357,7 @@ static int lfs_parent(lfs_t *lfs, const lfs_block_t dir[2], parent->d.tail[0] = 0; parent->d.tail[1] = 1; - // iterate over all directory directory entries + // iterate over all directory entries while (!lfs_pairisnull(parent->d.tail)) { int err = lfs_dir_fetch(lfs, parent, parent->d.tail); if (err) { @@ -2396,7 +2396,7 @@ static int lfs_moved(lfs_t *lfs, const void *e) { return err; } - // iterate over all directory directory entries + // iterate over all directory entries lfs_entry_t entry; while (!lfs_pairisnull(cwd.d.tail)) { err = lfs_dir_fetch(lfs, &cwd, cwd.d.tail); @@ -2484,7 +2484,7 @@ int lfs_deorphan(lfs_t *lfs) { lfs_dir_t pdir = {.d.size = 0x80000000}; lfs_dir_t cwd = {.d.tail[0] = 0, .d.tail[1] = 1}; - // iterate over all directory directory entries + // iterate over all directory entries for (lfs_size_t i = 0; i < lfs->cfg->block_count; i++) { if (lfs_pairisnull(cwd.d.tail)) { return 0; diff --git a/arch/stm32/Adafruit_LittleFS_stm32/src/littlefs/lfs.h b/arch/stm32/Adafruit_LittleFS_stm32/src/littlefs/lfs.h index 9c3174e7d..52f31f96e 100644 --- a/arch/stm32/Adafruit_LittleFS_stm32/src/littlefs/lfs.h +++ b/arch/stm32/Adafruit_LittleFS_stm32/src/littlefs/lfs.h @@ -94,7 +94,7 @@ enum lfs_open_flags { LFS_F_DIRTY = 0x10000, // File does not match storage LFS_F_WRITING = 0x20000, // File has been written since last flush LFS_F_READING = 0x40000, // File has been read since last flush - LFS_F_ERRED = 0x80000, // An error occured during write + LFS_F_ERRED = 0x80000, // An error occurred during write }; // File seek flags @@ -111,25 +111,25 @@ struct lfs_config { // information to the block device operations void *context; - // Read a region in a block. Negative error codes are propogated + // Read a region in a block. Negative error codes are propagated // to the user. int (*read)(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, void *buffer, lfs_size_t size); // Program a region in a block. The block must have previously - // been erased. Negative error codes are propogated to the user. + // been erased. Negative error codes are propagated to the user. // May return LFS_ERR_CORRUPT if the block should be considered bad. int (*prog)(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, const void *buffer, lfs_size_t size); // Erase a block. A block must be erased before being programmed. // The state of an erased block is undefined. Negative error codes - // are propogated to the user. + // are propagated to the user. // May return LFS_ERR_CORRUPT if the block should be considered bad. int (*erase)(const struct lfs_config *c, lfs_block_t block); // Sync the state of the underlying block device. Negative error codes - // are propogated to the user. + // are propagated to the user. int (*sync)(const struct lfs_config *c); // Minimum size of a block read. This determines the size of read buffers. @@ -484,7 +484,7 @@ int lfs_dir_rewind(lfs_t *lfs, lfs_dir_t *dir); // Returns a negative error code on failure. int lfs_traverse(lfs_t *lfs, int (*cb)(void*, lfs_block_t), void *data); -// Prunes any recoverable errors that may have occured in the filesystem +// Prunes any recoverable errors that may have occurred in the filesystem // // Not needed to be called by user unless an operation is interrupted // but the filesystem is still mounted. This is already called on first diff --git a/build.sh b/build.sh index f21279417..a2924141c 100755 --- a/build.sh +++ b/build.sh @@ -46,7 +46,7 @@ get_pio_envs() { echo $(pio project config | grep 'env:' | sed 's/env://') } -# $1 should be the string to find (case insensitive) +# $1 should be the string to find (case-insensitive) get_pio_envs_containing_string() { shopt -s nocasematch envs=($(get_pio_envs)) @@ -57,7 +57,7 @@ get_pio_envs_containing_string() { done } -# $1 should be the string to find (case insensitive) +# $1 should be the string to find (case-insensitive) get_pio_envs_ending_with_string() { shopt -s nocasematch envs=($(get_pio_envs)) diff --git a/docs/faq.md b/docs/faq.md index 66a942a4a..f5e58c4d2 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -27,7 +27,7 @@ author: https://github.com/LitBomb - [3.3. Q: What is the password to administer a repeater or a room server?](#33-q-what-is-the-password-to-administer-a-repeater-or-a-room-server) - [3.4. Q: What is the password to join a room server?](#34-q-what-is-the-password-to-join-a-room-server) - [3.5. Q: Can I retrieve a repeater's private key or set a repeater's private key?](#35-q-can-i-retrieve-a-repeaters-private-key-or-set-a-repeaters-private-key) - - [3.6. Q: The first byte of my repeater's public key collides with an exisitng repeater on the mesh. How do I get a new private key with a matching public key that has its first byte of my choosing?](#36-q-the-first-byte-of-my-repeaters-public-key-collides-with-an-exisitng-repeater-on-the-mesh--how-do-i-get-a-new-private-key-with-a-matching-public-key-that-has-its-first-byte-of-my-choosing) + - [3.6. Q: The first byte of my repeater's public key collides with an existing repeater on the mesh. How do I get a new private key with a matching public key that has its first byte of my choosing?](#36-q-the-first-byte-of-my-repeaters-public-key-collides-with-an-existing-repeater-on-the-mesh--how-do-i-get-a-new-private-key-with-a-matching-public-key-that-has-its-first-byte-of-my-choosing) - [3.7. Q: My repeater maybe suffering from deafness due to high power interference near my mesh's frequency, it is not hearing other in-range MeshCore radios. what can I do?](#37-q-my-repeater-maybe-suffering-from-deafness-due-to-high-power-interference-near-my-meshs-frequency-it-is-not-hearing-other-in-range-meshcore-radios--what-can-i-do) - [3.8 Q: How do I make my repeater an observer on the mesh](#38-q-how-do-i-make-my-repeater-an-observer-on-the-mesh) - [4. T-Deck Related](#4-t-deck-related) @@ -158,7 +158,7 @@ A room server can be remotely administered using a T-Deck running the MeshCore f When a client logs into a room server, the client will receive the previously 32 unseen messages. -Although room server can also repeat with the command line command `set repeat on`, it is not recommended nor encouraged. A room server with repeat set to `on` lacks the full set of repeater and remote administration features that are only available in the repeater firmware. +Although room server can also repeat with the command line command `set repeat on`, it is neither recommended nor encouraged. A room server with repeat set to `on` lacks the full set of repeater and remote administration features that are only available in the repeater firmware. The recommendation is to run repeater and room server on separate devices for the best experience. @@ -277,14 +277,14 @@ You can get the latitude and longitude from Google Maps by right-clicking the lo Reboot the repeater after `set prv.key ` command for the new private key to take effect. -### 3.6. Q: The first byte of my repeater's public key collides with an exisitng repeater on the mesh. How do I get a new private key with a matching public key that has its first byte of my choosing? +### 3.6. Q: The first byte of my repeater's public key collides with an existing repeater on the mesh. How do I get a new private key with a matching public key that has its first byte of my choosing? **A:** You can generate a new private key and specific the first byte of its public key here: https://gessaman.com/mc-keygen/ ### 3.7. Q: My repeater maybe suffering from deafness due to high power interference near my mesh's frequency, it is not hearing other in-range MeshCore radios. what can I do? -**A:** This may be due to the SX1262 radio's auto gain control feature. You can use this command to preiodically reset its AGC. +**A:** This may be due to the SX1262 radio's auto gain control feature. You can use this command to periodically reset its AGC. `set agc.reset.interval ` @@ -450,7 +450,7 @@ In the case if users are moving around frequently, and the paths are breaking, t ### 5.4. Q: How does a node discovery a path to its destination and then use it to send messages in the future, instead of flooding every message it sends like Meshtastic? -Routes are stored in sender's contact list. When you send a message the first time, the message first gets to your destination by flood routing. When your destination node gets the message, it will send back a delivery report to the sender with all repeaters that the original message went through. This delivery report is flood-routed back to you the sender and is a basis for future direct path. When you send the next message, the path will get embedded into the packet and be evaluated by repeaters. If the hop and address of the repeater matches, it will retransmit the message, otherwise it will not retransmit, hence minimizing utilization. +Routes are stored in sender's contact list. The first time you send a message, the message first gets to your destination by flood routing. When your destination node gets the message, it will send back a delivery report to the sender with all repeaters that the original message went through. This delivery report is flood-routed back to you the sender and is a basis for future direct path. When you send the next message, the path will get embedded into the packet and be evaluated by repeaters. If the hop and address of the repeater matches, it will retransmit the message; otherwise, it will not retransmit, hence minimizing utilization. [Source](https://discord.com/channels/826570251612323860/1330643963501351004/1351279141630119996) @@ -518,10 +518,10 @@ Andy also has a video on how to build using VS Code: ### 5.10. Q: Are there other MeshCore related open source projects? -**A:** [Liam Cottle](https://liamcottle.net)'s MeshCore web client and MeshCore Javascript library are open source under MIT license. +**A:** [Liam Cottle](https://liamcottle.net)'s MeshCore web client and MeshCore JavaScript library are open source under MIT license. Web client: https://github.com/liamcottle/meshcore-web -Javascript: https://github.com/liamcottle/meshcore.js +JavaScript: https://github.com/liamcottle/meshcore.js ### 5.11. Q: Does MeshCore support ATAK **A:** ATAK is not currently on MeshCore's roadmap. @@ -733,7 +733,7 @@ Allow the browser user on it: 3. From the MeshCore app, login remotely to the repeater you want to update with admin privilege 4. Go to the Command Line tab, type `start ota` and hit enter. 5. you should see `OK` to confirm the repeater device is now in OTA mode -6. Run the DFU app,tab `Settings` on the top right corner +6. Run the DFU app, tab `Settings` at the top right corner 7. Enable `Packets receipt notifications`, and change `Number of Packets` to 10 for RAK, 8 for T114. 8 also works for RAK. 9. Select the firmware zip file you downloaded 10. Select the device you want to update. If the device you want to update is not on the list, try enabling`OTA` on the device again @@ -804,7 +804,7 @@ Edit WIFI_SSID and WIFI_PWD in `./variants/heltec_v3/platformio.ini` and then fl ### 7.7. Q: I have a Station G2, or a Heltec V4, or an Ikoka Stick, or a radio with a EByte E22-900M30S or a E22-900M33S module, what should their transmit power be set to? **A:** -For companion radios, you can set these radios' transmit power in the smartphone app. For repeater and room server radios, you can set their transmit power using the command line command `set tx`. You can get their current value using command line comand `get tx` +For companion radios, you can set these radios' transmit power in the smartphone app. For repeater and room server radios, you can set their transmit power using the command line command `set tx`. You can get their current value using command line command `get tx` > ### ⚠️ **WARNING: Set these values at your own risk. Incorrect power settings can permanently damage your radio hardware.** diff --git a/docs/payloads.md b/docs/payloads.md index f86a70bc4..9b9565af5 100644 --- a/docs/payloads.md +++ b/docs/payloads.md @@ -16,7 +16,7 @@ Inside of each [meshcore packet](./packet_structure.md) is a payload, identified This document defines the structure of each of these payload types. -NOTE: all 16 and 32-bit integer fields are Little Endian. +NOTE: all 16 and 32-bit integer fields are Little-Endian. ## Important concepts: @@ -58,7 +58,7 @@ Appdata Flags # Acknowledgement -An acknowledgement that a message was received. Note that for returned path messages, an acknowledgement can be sent in the "extra" payload (see [Returned Path](#returned-path)) instead of as a separate ackowledgement packet. CLI commands do not cause acknowledgement responses, neither discrete nor extra. +An acknowledgement that a message was received. Note that for returned path messages, an acknowledgement can be sent in the "extra" payload (see [Returned Path](#returned-path)) instead of as a separate acknowledgement packet. CLI commands do not cause acknowledgement responses, neither discrete nor extra. | Field | Size (bytes) | Description | |----------|--------------|------------------------------------------------------------| @@ -78,7 +78,7 @@ Returned path, request, response, and plain text messages are all formatted in t ## Returned path -Returned path messages provide a description of the route a packet took from the original author. Receivers will send returned path messages to the author of the original message. +Returned path messages provide a description of the route that a packet took from the original author. Receivers will send returned path messages to the author of the original message. | Field | Size (bytes) | Description | |-------------|--------------|----------------------------------------------------------------------------------------------| diff --git a/examples/companion_radio/DataStore.cpp b/examples/companion_radio/DataStore.cpp index 00e25cb2a..158bcefe6 100644 --- a/examples/companion_radio/DataStore.cpp +++ b/examples/companion_radio/DataStore.cpp @@ -522,7 +522,7 @@ bool DataStore::putBlobByKey(const uint8_t key[], int key_len, const uint8_t src uint32_t pos = 0, found_pos = 0; uint32_t min_timestamp = 0xFFFFFFFF; - // search for matching key OR evict by oldest timestmap + // search for matching key OR evict by oldest timestamp BlobRec tmp; file.seek(0); while (file.read((uint8_t *) &tmp, sizeof(tmp)) == sizeof(tmp)) { diff --git a/examples/companion_radio/MyMesh.cpp b/examples/companion_radio/MyMesh.cpp index 09d866c9e..97ca63862 100644 --- a/examples/companion_radio/MyMesh.cpp +++ b/examples/companion_radio/MyMesh.cpp @@ -24,7 +24,7 @@ #define CMD_REBOOT 19 #define CMD_GET_BATT_AND_STORAGE 20 // was CMD_GET_BATTERY_VOLTAGE #define CMD_SET_TUNING_PARAMS 21 -#define CMD_DEVICE_QEURY 22 +#define CMD_DEVICE_QUERY 22 #define CMD_EXPORT_PRIVATE_KEY 23 #define CMD_IMPORT_PRIVATE_KEY 24 #define CMD_SEND_RAW_DATA 25 @@ -72,7 +72,7 @@ #define RESP_CODE_NO_MORE_MESSAGES 10 // a reply to CMD_SYNC_NEXT_MESSAGE #define RESP_CODE_EXPORT_CONTACT 11 #define RESP_CODE_BATT_AND_STORAGE 12 // a reply to a CMD_GET_BATT_AND_STORAGE -#define RESP_CODE_DEVICE_INFO 13 // a reply to CMD_DEVICE_QEURY +#define RESP_CODE_DEVICE_INFO 13 // a reply to CMD_DEVICE_QUERY #define RESP_CODE_PRIVATE_KEY 14 // a reply to CMD_EXPORT_PRIVATE_KEY #define RESP_CODE_DISABLED 15 #define RESP_CODE_CONTACT_MSG_RECV_V3 16 // a reply to CMD_SYNC_NEXT_MESSAGE (ver >= 3) @@ -280,7 +280,7 @@ void MyMesh::onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path if (path && path_len <= sizeof(AdvertPath::path)) { // check path is valid AdvertPath* p = advert_paths; uint32_t oldest = 0xFFFFFFFF; - for (int i = 0; i < ADVERT_PATH_TABLE_SIZE; i++) { // check if already in table, otherwise evict oldest + for (int i = 0; i < ADVERT_PATH_TABLE_SIZE; i++) { // check if already in table; otherwise, evict oldest if (memcmp(advert_paths[i].pubkey_prefix, contact.id.pub_key, sizeof(AdvertPath::pubkey_prefix)) == 0) { p = &advert_paths[i]; // found break; @@ -390,7 +390,7 @@ void MyMesh::queueMessage(const ContactInfo &from, uint8_t txt_type, mesh::Packe bool MyMesh::filterRecvFloodPacket(mesh::Packet* packet) { // REVISIT: try to determine which Region (from transport_codes[1]) that Sender is indicating for replies/responses - // if unknown, fallback to finding Region from transport_codes[0], the 'scope' used by Sender + // if unknown, fall back to finding Region from transport_codes[0], the 'scope' used by Sender return false; } @@ -821,7 +821,7 @@ void MyMesh::startInterface(BaseSerialInterface &serial) { } void MyMesh::handleCmdFrame(size_t len) { - if (cmd_frame[0] == CMD_DEVICE_QEURY && len >= 2) { // sent when app establishes connection + if (cmd_frame[0] == CMD_DEVICE_QUERY && len >= 2) { // sent when app establishes connection app_target_ver = cmd_frame[1]; // which version of protocol does app understand int i = 0; @@ -924,7 +924,7 @@ void MyMesh::handleCmdFrame(size_t len) { } else { writeErrFrame(recipient == NULL ? ERR_CODE_NOT_FOUND - : ERR_CODE_UNSUPPORTED_CMD); // unknown recipient, or unsuported TXT_TYPE_* + : ERR_CODE_UNSUPPORTED_CMD); // unknown recipient, or unsupported TXT_TYPE_* } } else if (cmd_frame[0] == CMD_SEND_CHANNEL_TXT_MSG) { // send GroupChannel msg int i = 1; diff --git a/examples/companion_radio/ui-orig/UITask.cpp b/examples/companion_radio/ui-orig/UITask.cpp index 1f5fedc48..a324c3863 100644 --- a/examples/companion_radio/ui-orig/UITask.cpp +++ b/examples/companion_radio/ui-orig/UITask.cpp @@ -406,7 +406,7 @@ void UITask::handleButtonTriplePress() { void UITask::handleButtonQuadruplePress() { MESH_DEBUG_PRINTLN("UITask: quad press triggered"); if (_sensors != NULL) { - // toggle GPS onn/off + // toggle GPS on/off int num = _sensors->getNumSettings(); for (int i = 0; i < num; i++) { if (strcmp(_sensors->getSettingName(i), "gps") == 0) { diff --git a/examples/simple_repeater/MyMesh.cpp b/examples/simple_repeater/MyMesh.cpp index 5fb1a729f..487312354 100644 --- a/examples/simple_repeater/MyMesh.cpp +++ b/examples/simple_repeater/MyMesh.cpp @@ -497,7 +497,7 @@ void MyMesh::onAdvertRecv(mesh::Packet *packet, const mesh::Identity &id, uint32 // if this a zero hop advert (and not via 'Share'), add it to neighbours if (packet->path_len == 0 && !isShare(packet)) { AdvertDataParser parser(app_data, app_data_len); - if (parser.isValid() && parser.getType() == ADV_TYPE_REPEATER) { // just keep neigbouring Repeaters + if (parser.isValid() && parser.getType() == ADV_TYPE_REPEATER) { // just keep neighbouring Repeaters putNeighbour(id, timestamp, packet->getSNR()); } } diff --git a/examples/simple_room_server/MyMesh.cpp b/examples/simple_room_server/MyMesh.cpp index d18a802e8..65f27804f 100644 --- a/examples/simple_room_server/MyMesh.cpp +++ b/examples/simple_room_server/MyMesh.cpp @@ -39,7 +39,7 @@ struct ServerStats { }; void MyMesh::addPost(ClientInfo *client, const char *postData) { - // TODO: suggested postData format: /<descrption> + // TODO: suggested postData format: <title>/<description> posts[next_post_idx].author = client->id; // add to cyclic queue StrHelper::strncpy(posts[next_post_idx].text, postData, MAX_POST_TEXT_LEN); @@ -284,7 +284,7 @@ void MyMesh::onAnonDataRecv(mesh::Packet *packet, const uint8_t *secret, const m // client (unknown at this stage) uint32_t sender_timestamp, sender_sync_since; memcpy(&sender_timestamp, data, 4); - memcpy(&sender_sync_since, &data[4], 4); // sender's "sync messags SINCE x" timestamp + memcpy(&sender_sync_since, &data[4], 4); // sender's "sync messages SINCE x" timestamp data[len] = 0; // ensure null terminator @@ -431,7 +431,7 @@ void MyMesh::onPeerDataRecv(mesh::Packet *packet, uint8_t type, int sender_idx, send_ack = false; } else { temp[5] = 0; // no reply - send_ack = false; // and no ACK... user shoudn't be sending these + send_ack = false; // and no ACK... user shouldn't be sending these } } else { // TXT_TYPE_PLAIN if ((client->permissions & PERM_ACL_ROLE_MASK) == PERM_ACL_GUEST) { @@ -846,7 +846,7 @@ void MyMesh::loop() { if (did_push) { next_push = futureMillis(SYNC_PUSH_INTERVAL); } else { - // were no unsynced posts for curr client, so proccess next client much quicker! (in next loop()) + // were no unsynced posts for curr client, so process next client much quicker! (in next loop()) next_push = futureMillis(SYNC_PUSH_INTERVAL / 8); } } diff --git a/examples/simple_sensor/SensorMesh.cpp b/examples/simple_sensor/SensorMesh.cpp index 4995c55fc..1b1a54399 100644 --- a/examples/simple_sensor/SensorMesh.cpp +++ b/examples/simple_sensor/SensorMesh.cpp @@ -78,7 +78,7 @@ static uint8_t getDataSize(uint8_t type) { case LPP_GPS: return 9; case LPP_POLYLINE: - return 8; // TODO: this is MINIMIUM + return 8; // TODO: this is MINIMUM case LPP_GYROMETER: case LPP_ACCELEROMETER: return 6; diff --git a/examples/simple_sensor/TimeSeriesData.cpp b/examples/simple_sensor/TimeSeriesData.cpp index f6157f9af..ca0750b85 100644 --- a/examples/simple_sensor/TimeSeriesData.cpp +++ b/examples/simple_sensor/TimeSeriesData.cpp @@ -19,7 +19,7 @@ void TimeSeriesData::calcMinMaxAvg(mesh::RTCClock* clock, uint32_t start_secs_ag dest->_channel = channel; dest->_lpp_type = lpp_type; - // start at most recet recording, back-track through to oldest + // start at most recent recording, back-track through to oldest while (n > 0) { n--; i = (i + num_slots - 1) % num_slots; // go back by one diff --git a/lib/README b/lib/README index 6debab1e8..4ba328494 100644 --- a/lib/README +++ b/lib/README @@ -2,7 +2,7 @@ This directory is intended for project specific (private) libraries. PlatformIO will compile them to static libraries and link into executable file. -The source code of each library should be placed in a an own separate directory +The source code of each library should be placed in its own separate directory ("lib/your_library_name/[here are source files]"). For example, see a structure of the following two libraries `Foo` and `Bar`: diff --git a/lib/nrf52/include/ble_gap.h b/lib/nrf52/include/ble_gap.h index c434fefb3..177158002 100644 --- a/lib/nrf52/include/ble_gap.h +++ b/lib/nrf52/include/ble_gap.h @@ -1465,7 +1465,7 @@ typedef union * The time taken may be different for each connection and the get operation will * return the previous channel map until the new one has taken effect. * - * @note After setting the channel map, by spec it can not be set again until at least 1 s has passed. + * @note After setting the channel map, by spec it cannot be set again until at least 1 s has passed. * See Bluetooth Specification Version 4.1 Volume 2, Part E, Section 7.3.46. * * @retval ::NRF_SUCCESS Get or set successful. @@ -1839,7 +1839,7 @@ SVCALL(SD_BLE_GAP_ADV_SET_CONFIGURE, uint32_t, sd_ble_gap_adv_set_configure(uint * @retval ::NRF_SUCCESS The BLE stack has started advertising. * @retval ::NRF_ERROR_INVALID_STATE adv_handle is not configured or already advertising. * @retval ::NRF_ERROR_CONN_COUNT The limit of available connections has been reached; connectable advertiser cannot be started. - * @retval ::BLE_ERROR_INVALID_ADV_HANDLE Advertising handle not found. Configure a new adveriting handle with @ref sd_ble_gap_adv_set_configure. + * @retval ::BLE_ERROR_INVALID_ADV_HANDLE Advertising handle not found. Configure a new advertising handle with @ref sd_ble_gap_adv_set_configure. * @retval ::NRF_ERROR_NOT_FOUND conn_cfg_tag not found. * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied: * - Invalid configuration of p_adv_params. See @ref ble_gap_adv_params_t. diff --git a/lib/nrf52/include/ble_gatts.h b/lib/nrf52/include/ble_gatts.h index 394d8d189..f5d20b1bf 100644 --- a/lib/nrf52/include/ble_gatts.h +++ b/lib/nrf52/include/ble_gatts.h @@ -753,7 +753,7 @@ SVCALL(SD_BLE_GATTS_SYS_ATTR_SET, uint32_t, sd_ble_gatts_sys_attr_set(uint16_t c * * @details This call is used to retrieve information about values to be stored persistently by the application * during the lifetime of a connection or after it has been terminated. When a new connection is established with the same bonded device, - * the system attribute information retrieved with this function should be restored using using @ref sd_ble_gatts_sys_attr_set. + * the system attribute information retrieved with this function should be restored using @ref sd_ble_gatts_sys_attr_set. * If retrieved after disconnection, the data should be read before a new connection established. The connection handle for * the previous, now disconnected, connection will remain valid until a new one is created to allow this API call to refer to it. * Connection handles belonging to active connections can be used as well, but care should be taken since the system attributes diff --git a/lib/nrf52/include/nrf_nvic.h b/lib/nrf52/include/nrf_nvic.h index 1f79cc3c8..165f7b409 100644 --- a/lib/nrf52/include/nrf_nvic.h +++ b/lib/nrf52/include/nrf_nvic.h @@ -273,7 +273,7 @@ __STATIC_INLINE uint32_t sd_nvic_critical_region_enter(uint8_t * p_is_nested_cri /**@brief Exit critical region. * * @pre Application has entered a critical region using ::sd_nvic_critical_region_enter. - * @post If not in a nested critical region, the application interrupts will restored to the state before ::sd_nvic_critical_region_enter was called. + * @post If not in a nested critical region, the application interrupts will be restored to the state before ::sd_nvic_critical_region_enter was called. * * @param[in] is_nested_critical_region If this is set to 1, the critical region won't be exited. @sa sd_nvic_critical_region_enter. * diff --git a/lib/nrf52/include/nrf_soc.h b/lib/nrf52/include/nrf_soc.h index beb4d3a54..83c1ddb14 100644 --- a/lib/nrf52/include/nrf_soc.h +++ b/lib/nrf52/include/nrf_soc.h @@ -939,7 +939,7 @@ SVCALL(SD_TEMP_GET, uint32_t, sd_temp_get(int32_t * p_temp)); * @param[in] size Number of 32-bit words to write. Maximum size is the number of words in one * flash page. See the device's Product Specification for details. * -* @retval ::NRF_ERROR_INVALID_ADDR Tried to write to a non existing flash address, or p_dst or p_src was unaligned. +* @retval ::NRF_ERROR_INVALID_ADDR Tried to write to a nonexistent flash address, or p_dst or p_src was unaligned. * @retval ::NRF_ERROR_BUSY The previous command has not yet completed. * @retval ::NRF_ERROR_INVALID_LENGTH Size was 0, or higher than the maximum allowed size. * @retval ::NRF_ERROR_FORBIDDEN Tried to write to an address outside the application flash area. @@ -972,7 +972,7 @@ SVCALL(SD_FLASH_WRITE, uint32_t, sd_flash_write(uint32_t * p_dst, uint32_t const * @param[in] page_number Page number of the page to erase * * @retval ::NRF_ERROR_INTERNAL If a new session could not be opened due to an internal error. -* @retval ::NRF_ERROR_INVALID_ADDR Tried to erase to a non existing flash page. +* @retval ::NRF_ERROR_INVALID_ADDR Tried to erase to a nonexistent flash page. * @retval ::NRF_ERROR_BUSY The previous command has not yet completed. * @retval ::NRF_ERROR_FORBIDDEN Tried to erase a page outside the application flash area. * @retval ::NRF_SUCCESS The command was accepted. @@ -1063,7 +1063,7 @@ SVCALL(SD_FLASH_PAGE_ERASE, uint32_t, sd_flash_page_erase(uint32_t page_number)) * @param[in] p_register Pointer to register to be written. * @param[in] value Value to be written to the register. * - * @retval ::NRF_ERROR_INVALID_ADDR This function can not write to the reguested register. + * @retval ::NRF_ERROR_INVALID_ADDR This function cannot write to the reguested register. * @retval ::NRF_SUCCESS Value successfully written to register. * */ diff --git a/lib/nrf52/s140_nrf52_7.3.0_API/include/ble_gap.h b/lib/nrf52/s140_nrf52_7.3.0_API/include/ble_gap.h index 2a6478799..ce6f5052b 100755 --- a/lib/nrf52/s140_nrf52_7.3.0_API/include/ble_gap.h +++ b/lib/nrf52/s140_nrf52_7.3.0_API/include/ble_gap.h @@ -1532,7 +1532,7 @@ typedef union * The time taken may be different for each connection and the get operation will * return the previous channel map until the new one has taken effect. * - * @note After setting the channel map, by spec it can not be set again until at least 1 s has passed. + * @note After setting the channel map, by spec it cannot be set again until at least 1 s has passed. * See Bluetooth Specification Version 4.1 Volume 2, Part E, Section 7.3.46. * * @retval ::NRF_SUCCESS Get or set successful. @@ -1680,7 +1680,7 @@ typedef struct { uint8_t ppi_ch_id; /**< PPI channel to use. This channel should be regarded as reserved until connection event PPI task triggering is stopped. - The PPI channel ID can not be one of the PPI channels reserved by + The PPI channel ID cannot be one of the PPI channels reserved by the SoftDevice. See @ref NRF_SOC_SD_PPI_CHANNELS_SD_ENABLED_MSK. */ uint32_t task_endpoint; /**< Task Endpoint to trigger. */ uint16_t conn_evt_counter_start; /**< The connection event on which the task triggering should start. */ @@ -1934,7 +1934,7 @@ SVCALL(SD_BLE_GAP_ADV_SET_CONFIGURE, uint32_t, sd_ble_gap_adv_set_configure(uint * tag has been reached; connectable advertiser cannot be started. * To increase the number of available connections, * use @ref sd_ble_cfg_set with @ref BLE_GAP_CFG_ROLE_COUNT or @ref BLE_CONN_CFG_GAP. - * @retval ::BLE_ERROR_INVALID_ADV_HANDLE Advertising handle not found. Configure a new adveriting handle with @ref sd_ble_gap_adv_set_configure. + * @retval ::BLE_ERROR_INVALID_ADV_HANDLE Advertising handle not found. Configure a new advertising handle with @ref sd_ble_gap_adv_set_configure. * @retval ::NRF_ERROR_NOT_FOUND conn_cfg_tag not found. * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied: * - Invalid configuration of p_adv_params. See @ref ble_gap_adv_params_t. diff --git a/lib/nrf52/s140_nrf52_7.3.0_API/include/ble_gatts.h b/lib/nrf52/s140_nrf52_7.3.0_API/include/ble_gatts.h index 06754f595..3716ec355 100755 --- a/lib/nrf52/s140_nrf52_7.3.0_API/include/ble_gatts.h +++ b/lib/nrf52/s140_nrf52_7.3.0_API/include/ble_gatts.h @@ -771,7 +771,7 @@ SVCALL(SD_BLE_GATTS_SYS_ATTR_SET, uint32_t, sd_ble_gatts_sys_attr_set(uint16_t c * * @details This call is used to retrieve information about values to be stored persistently by the application * during the lifetime of a connection or after it has been terminated. When a new connection is established with the same bonded device, - * the system attribute information retrieved with this function should be restored using using @ref sd_ble_gatts_sys_attr_set. + * the system attribute information retrieved with this function should be restored using @ref sd_ble_gatts_sys_attr_set. * If retrieved after disconnection, the data should be read before a new connection established. The connection handle for * the previous, now disconnected, connection will remain valid until a new one is created to allow this API call to refer to it. * Connection handles belonging to active connections can be used as well, but care should be taken since the system attributes diff --git a/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_nvic.h b/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_nvic.h index 7119634aa..6dd394809 100755 --- a/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_nvic.h +++ b/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_nvic.h @@ -273,7 +273,7 @@ __STATIC_INLINE uint32_t sd_nvic_critical_region_enter(uint8_t * p_is_nested_cri /**@brief Exit critical region. * * @pre Application has entered a critical region using ::sd_nvic_critical_region_enter. - * @post If not in a nested critical region, the application interrupts will restored to the state before ::sd_nvic_critical_region_enter was called. + * @post If not in a nested critical region, the application interrupts will be restored to the state before ::sd_nvic_critical_region_enter was called. * * @param[in] is_nested_critical_region If this is set to 1, the critical region won't be exited. @sa sd_nvic_critical_region_enter. * diff --git a/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_sdm.h b/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_sdm.h index ff6af6feb..b19bfc877 100755 --- a/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_sdm.h +++ b/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_sdm.h @@ -276,7 +276,7 @@ typedef struct * * @note It is recommended to either perform a reset in the fault handler or to let the SoftDevice reset the device. * Otherwise SoC peripherals may behave in an undefined way. For example, the RADIO peripherial may - * continously transmit packets. + * continuously transmit packets. * * @note This callback is executed in HardFault context, thus SVC functions cannot be called from the fault callback. * diff --git a/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_soc.h b/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_soc.h index e1d11b5bd..226f5f038 100755 --- a/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_soc.h +++ b/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_soc.h @@ -935,7 +935,7 @@ SVCALL(SD_TEMP_GET, uint32_t, sd_temp_get(int32_t * p_temp)); * @param[in] size Number of 32-bit words to write. Maximum size is the number of words in one * flash page. See the device's Product Specification for details. * -* @retval ::NRF_ERROR_INVALID_ADDR Tried to write to a non existing flash address, or p_dst or p_src was unaligned. +* @retval ::NRF_ERROR_INVALID_ADDR Tried to write to a nonexistent flash address, or p_dst or p_src was unaligned. * @retval ::NRF_ERROR_BUSY The previous command has not yet completed. * @retval ::NRF_ERROR_INVALID_LENGTH Size was 0, or higher than the maximum allowed size. * @retval ::NRF_ERROR_FORBIDDEN Tried to write to an address outside the application flash area. @@ -968,7 +968,7 @@ SVCALL(SD_FLASH_WRITE, uint32_t, sd_flash_write(uint32_t * p_dst, uint32_t const * @param[in] page_number Page number of the page to erase * * @retval ::NRF_ERROR_INTERNAL If a new session could not be opened due to an internal error. -* @retval ::NRF_ERROR_INVALID_ADDR Tried to erase to a non existing flash page. +* @retval ::NRF_ERROR_INVALID_ADDR Tried to erase to a nonexistent flash page. * @retval ::NRF_ERROR_BUSY The previous command has not yet completed. * @retval ::NRF_ERROR_FORBIDDEN Tried to erase a page outside the application flash area. * @retval ::NRF_SUCCESS The command was accepted. @@ -1064,7 +1064,7 @@ SVCALL(SD_FLASH_PAGE_ERASE, uint32_t, sd_flash_page_erase(uint32_t page_number)) * @param[in] p_register Pointer to register to be written. * @param[in] value Value to be written to the register. * - * @retval ::NRF_ERROR_INVALID_ADDR This function can not write to the reguested register. + * @retval ::NRF_ERROR_INVALID_ADDR This function cannot write to the reguested register. * @retval ::NRF_SUCCESS Value successfully written to register. * */ diff --git a/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_svc.h b/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_svc.h index d97056147..8aa3a8e57 100755 --- a/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_svc.h +++ b/lib/nrf52/s140_nrf52_7.3.0_API/include/nrf_svc.h @@ -48,7 +48,7 @@ extern "C" { /** @brief Supervisor call declaration. * * A call to a function marked with @ref SVCALL, will trigger a Supervisor Call (SVC) Exception. - * The SVCs with SVC numbers 0x00-0x0F are forwared to the application. All other SVCs are handled by the SoftDevice. + * The SVCs with SVC numbers 0x00-0x0F are forwarded to the application. All other SVCs are handled by the SoftDevice. * * @param[in] number The SVC number to be used. * @param[in] return_type The return type of the SVC function. diff --git a/src/Dispatcher.h b/src/Dispatcher.h index 25a41d82c..e40265031 100644 --- a/src/Dispatcher.h +++ b/src/Dispatcher.h @@ -27,7 +27,7 @@ class Radio { * \brief polls for incoming raw packet. * \param bytes destination to store incoming raw packet. * \param sz maximum packet size allowed. - * \returns 0 if no incoming data, otherwise length of complete packet received. + * \returns 0 if no incoming data; otherwise, length of complete packet received. */ virtual int recvRaw(uint8_t* bytes, int sz) = 0; diff --git a/src/Identity.h b/src/Identity.h index 60e8783b9..5b3511993 100644 --- a/src/Identity.h +++ b/src/Identity.h @@ -63,14 +63,14 @@ class LocalIdentity : public Identity { void sign(uint8_t* sig, const uint8_t* message, int msg_len) const; /** - * \brief the ECDH key exhange, with Ed25519 public key transposed to Ex25519. + * \brief the ECDH key exchange, with Ed25519 public key transposed to Ex25519. * \param secret OUT - the 'shared secret' (must be PUB_KEY_SIZE bytes) * \param other IN - the second party in the exchange. */ void calcSharedSecret(uint8_t* secret, const Identity& other) const { calcSharedSecret(secret, other.pub_key); } /** - * \brief the ECDH key exhange, with Ed25519 public key transposed to Ex25519. + * \brief the ECDH key exchange, with Ed25519 public key transposed to Ex25519. * \param secret OUT - the 'shared secret' (must be PUB_KEY_SIZE bytes) * \param other_pub_key IN - the public key of second party in the exchange (must be PUB_KEY_SIZE bytes) */ diff --git a/src/Mesh.cpp b/src/Mesh.cpp index 1bda9e962..f56cff045 100644 --- a/src/Mesh.cpp +++ b/src/Mesh.cpp @@ -616,7 +616,7 @@ Packet* Mesh::createControlData(const uint8_t* data, size_t len) { void Mesh::sendFlood(Packet* packet, uint32_t delay_millis) { if (packet->getPayloadType() == PAYLOAD_TYPE_TRACE) { - MESH_DEBUG_PRINTLN("%s Mesh::sendFlood(): TRACE type not suspported", getLogDateTime()); + MESH_DEBUG_PRINTLN("%s Mesh::sendFlood(): TRACE type not supported", getLogDateTime()); return; } @@ -630,7 +630,7 @@ void Mesh::sendFlood(Packet* packet, uint32_t delay_millis) { if (packet->getPayloadType() == PAYLOAD_TYPE_PATH) { pri = 2; } else if (packet->getPayloadType() == PAYLOAD_TYPE_ADVERT) { - pri = 3; // de-prioritie these + pri = 3; // de-prioritize these } else { pri = 1; } @@ -639,7 +639,7 @@ void Mesh::sendFlood(Packet* packet, uint32_t delay_millis) { void Mesh::sendFlood(Packet* packet, uint16_t* transport_codes, uint32_t delay_millis) { if (packet->getPayloadType() == PAYLOAD_TYPE_TRACE) { - MESH_DEBUG_PRINTLN("%s Mesh::sendFlood(): TRACE type not suspported", getLogDateTime()); + MESH_DEBUG_PRINTLN("%s Mesh::sendFlood(): TRACE type not supported", getLogDateTime()); return; } @@ -655,7 +655,7 @@ void Mesh::sendFlood(Packet* packet, uint16_t* transport_codes, uint32_t delay_m if (packet->getPayloadType() == PAYLOAD_TYPE_PATH) { pri = 2; } else if (packet->getPayloadType() == PAYLOAD_TYPE_ADVERT) { - pri = 3; // de-prioritie these + pri = 3; // de-prioritize these } else { pri = 1; } diff --git a/src/Mesh.h b/src/Mesh.h index 00f7ed00f..29c9ebfaa 100644 --- a/src/Mesh.h +++ b/src/Mesh.h @@ -20,7 +20,7 @@ class MeshTables { }; /** - * \brief The next layer in the basic Dispatcher task, Mesh recognises the particular Payload TYPES, + * \brief The next layer in the basic Dispatcher task, Mesh recognizes the particular Payload TYPES, * and provides virtual methods for sub-classes on handling incoming, and also preparing outbound Packets. */ class Mesh : public Dispatcher { @@ -210,12 +210,12 @@ class Mesh : public Dispatcher { void sendDirect(Packet* packet, const uint8_t* path, uint8_t path_len, uint32_t delay_millis=0); /** - * \brief send a locally-generated Packet to just neigbor nodes (zero hops) + * \brief send a locally-generated Packet to just neighbor nodes (zero hops) */ void sendZeroHop(Packet* packet, uint32_t delay_millis=0); /** - * \brief send a locally-generated Packet to just neigbor nodes (zero hops), with specific transort codes + * \brief send a locally-generated Packet to just neighbor nodes (zero hops), with specific transport codes * \param transport_codes array of 2 codes to attach to packet */ void sendZeroHop(Packet* packet, uint16_t* transport_codes, uint32_t delay_millis=0); diff --git a/src/Utils.cpp b/src/Utils.cpp index 186c8720a..4726d4701 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -139,7 +139,7 @@ int Utils::parseTextParts(char* text, const char* parts[], int max_num, char sep parts[num++] = sp; while (*sp && *sp != separator) sp++; if (*sp) { - *sp++ = 0; // replace the seperator with a null, and skip past it + *sp++ = 0; // replace the separator with a null, and skip past it } } // if we hit the maximum parts, make sure LAST entry does NOT have separator diff --git a/src/Utils.h b/src/Utils.h index 5736b8747..3d2c36ee8 100644 --- a/src/Utils.h +++ b/src/Utils.h @@ -50,7 +50,7 @@ class Utils { /** * \brief checks the MAC (in leading bytes of 'src'), then if valid, decrypts remaining bytes in src. - * \returns zero if MAC is invalid, otherwise the length of decrypted bytes in 'dest' + * \returns zero if MAC is invalid; otherwise, the length of decrypted bytes in 'dest' */ static int MACThenDecrypt(const uint8_t* shared_secret, uint8_t* dest, const uint8_t* src, int src_len); diff --git a/src/helpers/ContactInfo.h b/src/helpers/ContactInfo.h index 4a8038d3e..9572d43e6 100644 --- a/src/helpers/ContactInfo.h +++ b/src/helpers/ContactInfo.h @@ -6,7 +6,7 @@ struct ContactInfo { mesh::Identity id; char name[32]; - uint8_t type; // on of ADV_TYPE_* + uint8_t type; // one of ADV_TYPE_* uint8_t flags; int8_t out_path_len; uint8_t out_path[MAX_PATH_SIZE]; diff --git a/src/helpers/StaticPoolPacketManager.cpp b/src/helpers/StaticPoolPacketManager.cpp index 4f28eac6a..f14592be1 100644 --- a/src/helpers/StaticPoolPacketManager.cpp +++ b/src/helpers/StaticPoolPacketManager.cpp @@ -67,7 +67,7 @@ void PacketQueue::add(mesh::Packet* packet, uint8_t priority, uint32_t scheduled } StaticPoolPacketManager::StaticPoolPacketManager(int pool_size): unused(pool_size), send_queue(pool_size), rx_queue(pool_size) { - // load up our unusued Packet pool + // load up our unused Packet pool for (int i = 0; i < pool_size; i++) { unused.add(new mesh::Packet(), 0, 0); } diff --git a/src/helpers/esp32/TBeamBoard.cpp b/src/helpers/esp32/TBeamBoard.cpp index 5f708d71d..1fdbec143 100644 --- a/src/helpers/esp32/TBeamBoard.cpp +++ b/src/helpers/esp32/TBeamBoard.cpp @@ -176,7 +176,7 @@ bool TBeamBoard::power_init() PMU->setProtectedChannel(XPOWERS_DCDC1); //Protect the OLED power rail PMU->setProtectedChannel(XPOWERS_DCDC3); //Protect the ESP32 power rail - PMU->disablePowerOutput(XPOWERS_DCDC2); //Disable unsused power rail DC2 + PMU->disablePowerOutput(XPOWERS_DCDC2); //Disable unused power rail DC2 PMU->disableIRQ(XPOWERS_AXP192_ALL_IRQ); //Disable PMU IRQ @@ -213,7 +213,7 @@ bool TBeamBoard::power_init() PMU->setPowerChannelVoltage(XPOWERS_ALDO1, 3300); PMU->enablePowerOutput(XPOWERS_ALDO1); - //Set up pwer rail for SD Card + //Set up power rail for SD Card PMU->setPowerChannelVoltage(XPOWERS_BLDO1, 3300); PMU->enablePowerOutput(XPOWERS_BLDO1); diff --git a/src/helpers/nrf52/SerialBLEInterface.cpp b/src/helpers/nrf52/SerialBLEInterface.cpp index dbe6f3930..32f31b6dd 100644 --- a/src/helpers/nrf52/SerialBLEInterface.cpp +++ b/src/helpers/nrf52/SerialBLEInterface.cpp @@ -96,7 +96,7 @@ void SerialBLEInterface::stopAdv() { BLE_DEBUG_PRINTLN("SerialBLEInterface: stopping advertising"); - // we only want to stop advertising if it's running, otherwise an invalid state error is logged by ble stack + // we only want to stop advertising if it's running; otherwise, an invalid state error is logged by ble stack if(!Bluefruit.Advertising.isRunning()){ return; } diff --git a/src/helpers/radiolib/CustomLR1110.h b/src/helpers/radiolib/CustomLR1110.h index 2e536de5e..e4332013a 100644 --- a/src/helpers/radiolib/CustomLR1110.h +++ b/src/helpers/radiolib/CustomLR1110.h @@ -10,7 +10,7 @@ class CustomLR1110 : public LR1110 { size_t getPacketLength(bool update) override { size_t len = LR1110::getPacketLength(update); if (len == 0 && getIrqStatus() & RADIOLIB_LR11X0_IRQ_HEADER_ERR) { - // we've just recieved a corrupted packet + // we've just received a corrupted packet // this may have triggered a bug causing subsequent packets to be shifted // call standby() to return radio to known-good state // recvRaw will call startReceive() to restart rx diff --git a/src/helpers/radiolib/CustomLR1110Wrapper.h b/src/helpers/radiolib/CustomLR1110Wrapper.h index 947bb51dd..5018d0002 100644 --- a/src/helpers/radiolib/CustomLR1110Wrapper.h +++ b/src/helpers/radiolib/CustomLR1110Wrapper.h @@ -17,7 +17,7 @@ class CustomLR1110Wrapper : public RadioLibWrapper { void onSendFinished() override { RadioLibWrapper::onSendFinished(); - _radio->setPreambleLength(16); // overcomes weird issues with small and big pkts + _radio->setPreambleLength(16); // overcomes weird issues with big and small pkts } float getLastRSSI() const override { return ((CustomLR1110 *)_radio)->getRSSI(); } diff --git a/src/helpers/sensors/EnvironmentSensorManager.cpp b/src/helpers/sensors/EnvironmentSensorManager.cpp index bb675c276..3e39b6c2e 100644 --- a/src/helpers/sensors/EnvironmentSensorManager.cpp +++ b/src/helpers/sensors/EnvironmentSensorManager.cpp @@ -31,7 +31,7 @@ static Adafruit_AHTX0 AHTX0; #ifndef TELEM_BME280_ADDRESS #define TELEM_BME280_ADDRESS 0x76 // BME280 environmental sensor I2C address #endif -#define TELEM_BME280_SEALEVELPRESSURE_HPA (1013.25) // Athmospheric pressure at sea level +#define TELEM_BME280_SEALEVELPRESSURE_HPA (1013.25) // Atmospheric pressure at sea level #include <Adafruit_BME280.h> static Adafruit_BME280 BME280; #endif @@ -40,7 +40,7 @@ static Adafruit_BME280 BME280; #ifndef TELEM_BMP280_ADDRESS #define TELEM_BMP280_ADDRESS 0x76 // BMP280 environmental sensor I2C address #endif -#define TELEM_BMP280_SEALEVELPRESSURE_HPA (1013.25) // Athmospheric pressure at sea level +#define TELEM_BMP280_SEALEVELPRESSURE_HPA (1013.25) // Atmospheric pressure at sea level #include <Adafruit_BMP280.h> static Adafruit_BMP280 BMP280; #endif @@ -556,7 +556,7 @@ void EnvironmentSensorManager::initBasicGPS() { if (gps_detected) { MESH_DEBUG_PRINTLN("GPS detected"); - #ifdef PERSISTANT_GPS + #ifdef PERSISTENT_GPS gps_active = true; return; #endif @@ -567,7 +567,7 @@ void EnvironmentSensorManager::initBasicGPS() { gps_active = false; //Set GPS visibility off until setting is changed } -// gps code for rak might be moved to MicroNMEALoactionProvider +// gps code for rak might be moved to MicroNMEALocationProvider // or make a new location provider ... #ifdef RAK_WISBLOCK_GPS void EnvironmentSensorManager::rakGPSInit(){ @@ -600,7 +600,7 @@ void EnvironmentSensorManager::rakGPSInit(){ return; } - #ifndef FORCE_GPS_ALIVE // for use with repeaters, until GPS toggle is implimented + #ifndef FORCE_GPS_ALIVE // for use with repeaters, until GPS toggle is implemented //Now that GPS is found and set up, set to sleep for initial state stop_gps(); #endif diff --git a/src/helpers/sensors/LPPDataHelpers.h b/src/helpers/sensors/LPPDataHelpers.h index b9025de48..d1f3b92a1 100644 --- a/src/helpers/sensors/LPPDataHelpers.h +++ b/src/helpers/sensors/LPPDataHelpers.h @@ -61,7 +61,7 @@ #define LPP_ERROR_OK 0 #define LPP_ERROR_OVERFLOW 1 -#define LPP_ERROR_UNKOWN_TYPE 2 +#define LPP_ERROR_UNKNOWN_TYPE 2 class LPPReader { const uint8_t* _buf; @@ -142,7 +142,7 @@ class LPPReader { case LPP_GPS: _pos += 9; break; case LPP_POLYLINE: - _pos += 8; break; // TODO: this is MINIMIUM + _pos += 8; break; // TODO: this is MINIMUM case LPP_GYROMETER: case LPP_ACCELEROMETER: _pos += 6; break; diff --git a/src/helpers/stm32/InternalFileSystem.cpp b/src/helpers/stm32/InternalFileSystem.cpp index dc032eb96..6a7d7064e 100644 --- a/src/helpers/stm32/InternalFileSystem.cpp +++ b/src/helpers/stm32/InternalFileSystem.cpp @@ -37,7 +37,7 @@ static int _internal_flash_read(const struct lfs_config *c, lfs_block_t block, l } // Program a region in a block. The block must have previously -// been erased. Negative error codes are propogated to the user. +// been erased. Negative error codes are propagated to the user. // May return LFS_ERR_CORRUPT if the block should be considered bad. static int _internal_flash_prog(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, const void *buffer, lfs_size_t size) { @@ -62,7 +62,7 @@ static int _internal_flash_prog(const struct lfs_config *c, lfs_block_t block, l // Erase a block. A block must be erased before being programmed. // The state of an erased block is undefined. Negative error codes -// are propogated to the user. +// are propagated to the user. // May return LFS_ERR_CORRUPT if the block should be considered bad. static int _internal_flash_erase(const struct lfs_config *c, lfs_block_t block) { @@ -87,7 +87,7 @@ static int _internal_flash_erase(const struct lfs_config *c, lfs_block_t block) } // Sync the state of the underlying block device. Negative error codes -// are propogated to the user. +// are propagated to the user. static int _internal_flash_sync(const struct lfs_config *c) { return LFS_ERR_OK; // don't need sync diff --git a/src/helpers/ui/DisplayDriver.h b/src/helpers/ui/DisplayDriver.h index ec63c1912..0bf300e4b 100644 --- a/src/helpers/ui/DisplayDriver.h +++ b/src/helpers/ui/DisplayDriver.h @@ -22,7 +22,7 @@ class DisplayDriver { virtual void setColor(Color c) = 0; virtual void setCursor(int x, int y) = 0; virtual void print(const char* str) = 0; - virtual void printWordWrap(const char* str, int max_width) { print(str); } // fallback to basic print() if no override + virtual void printWordWrap(const char* str, int max_width) { print(str); } // fall back to basic print() if no override virtual void fillRect(int x, int y, int w, int h) = 0; virtual void drawRect(int x, int y, int w, int h) = 0; virtual void drawXbm(int x, int y, const uint8_t* bits, int w, int h) = 0; diff --git a/src/helpers/ui/OLEDDisplay.cpp b/src/helpers/ui/OLEDDisplay.cpp index dca2ad1b9..8217c6ba7 100644 --- a/src/helpers/ui/OLEDDisplay.cpp +++ b/src/helpers/ui/OLEDDisplay.cpp @@ -31,7 +31,7 @@ /* * TODO Helmut - * - test/finish dislplay.printf() on mbed-os + * - test/finish display.printf() on mbed-os * - Finish _putc with drawLogBuffer when running display */ @@ -842,11 +842,11 @@ void OLEDDisplay::drawLogBuffer(uint16_t xMove, uint16_t yMove) { uint16_t lastPos = 0; for (uint16_t i=0;i<this->logBufferFilled;i++){ - // Everytime we have a \n print + // Every time we have a \n print if (this->logBuffer[i] == 10) { length++; // Draw string on line `line` from lastPos to length - // Passing 0 as the lenght because we are in TEXT_ALIGN_LEFT + // Passing 0 as the length because we are in TEXT_ALIGN_LEFT drawStringInternal(xMove, yMove + (line++) * lineHeight, &this->logBuffer[lastPos], length, 0, false); // Remember last pos lastPos = i; @@ -924,7 +924,7 @@ size_t OLEDDisplay::write(uint8_t c) { if (firstLineEnd > 0) { // Calculate the new logBufferFilled value this->logBufferFilled = logBufferFilled - firstLineEnd; - // Now we move the lines infront of the buffer + // Now we move the lines in front of the buffer memcpy(this->logBuffer, &this->logBuffer[firstLineEnd], logBufferFilled); } else { // Let's reuse the buffer if it was full @@ -1166,7 +1166,7 @@ char DefaultFontTableLookup(const uint8_t ch) { uint8_t last = LASTCHAR; // get last char LASTCHAR = ch; - switch (last) { // conversion depnding on first UTF8-character + switch (last) { // conversion depending on first UTF8-character case 0xC2: return (uint8_t) ch; case 0xC3: return (uint8_t) (ch | 0xC0); case 0x82: if (ch == 0xAC) return (uint8_t) 0x80; // special case Euro-symbol diff --git a/src/helpers/ui/OLEDDisplay.h b/src/helpers/ui/OLEDDisplay.h index 23e68455c..e7828dd4b 100644 --- a/src/helpers/ui/OLEDDisplay.h +++ b/src/helpers/ui/OLEDDisplay.h @@ -60,7 +60,7 @@ class String { }; #else -#error "Unkown operating system" +#error "Unknown operating system" #endif #include "OLEDDisplayFonts.h" @@ -160,7 +160,7 @@ class OLEDDisplay : public Print { #elif __MBED__ class OLEDDisplay : public Stream { #else -#error "Unkown operating system" +#error "Unknown operating system" #endif public: @@ -231,13 +231,13 @@ class OLEDDisplay : public Stream { void drawVerticalLine(int16_t x, int16_t y, int16_t length); // Draws a rounded progress bar with the outer dimensions given by width and height. Progress is - // a unsigned byte value between 0 and 100 + // an unsigned byte value between 0 and 100 void drawProgressBar(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t progress); // Draw a bitmap in the internal image format void drawFastImage(int16_t x, int16_t y, int16_t width, int16_t height, const uint8_t *image); - // Draw a XBM + // Draw an XBM void drawXbm(int16_t x, int16_t y, int16_t width, int16_t height, const uint8_t *xbm); // Draw icon 16x16 xbm format @@ -262,7 +262,7 @@ class OLEDDisplay : public Stream { // font settings uint16_t getStringWidth(const char* text, uint16_t length, bool utf8 = false); - // Convencience method for the const char version + // Convenience method for the const char version uint16_t getStringWidth(const String &text); // Specifies relative to which anchor point @@ -317,7 +317,7 @@ class OLEDDisplay : public Stream { // Log buffer implementation // This will define the lines and characters you can - // print to the screen. When you exeed the buffer size (lines * chars) + // print to the screen. When you exceed the buffer size (lines * chars) // the output may be truncated due to the size constraint. bool setLogBuffer(uint16_t lines, uint16_t chars); diff --git a/src/helpers/ui/ST7789Spi.h b/src/helpers/ui/ST7789Spi.h index 09af6457d..3a961e238 100644 --- a/src/helpers/ui/ST7789Spi.h +++ b/src/helpers/ui/ST7789Spi.h @@ -179,8 +179,8 @@ class ST7789Spi : public OLEDDisplay { } // If the minBoundY wasn't updated - // we can savely assume that buffer_back[pos] == buffer[pos] - // holdes true for all values of pos + // we can safely assume that buffer_back[pos] == buffer[pos] + // holds true for all values of pos if (minBoundY == UINT16_MAX) return; set_CS(LOW); diff --git a/src/helpers/ui/buzzer.h b/src/helpers/ui/buzzer.h index 0a5005528..53edda857 100644 --- a/src/helpers/ui/buzzer.h +++ b/src/helpers/ui/buzzer.h @@ -5,7 +5,7 @@ /* class abstracts underlying RTTTL library - Just a simple imlementation to start. At the moment use same + Just a simple implementation to start. At the moment use same melody for message and discovery Suggest enum type for different sounds - on message diff --git a/variants/generic-e22/variant.h b/variants/generic-e22/variant.h index 6c850af26..d14b766de 100644 --- a/variants/generic-e22/variant.h +++ b/variants/generic-e22/variant.h @@ -32,7 +32,7 @@ // The E22's TXEN pin is connected to MCU pin, E22's RXEN pin is connected to MCU pin (allows for ramping up PA before transmission // Don't define DIO2_AS_RF_SWITCH because we only use DIO2 or an MCU pin mutually exclusively to connect to E22's TXEN (to prevent -// a short if they are both connected at the same time and there's a slight non-neglibible delay and/or voltage difference between +// a short if they are both connected at the same time and there's a slight non-negligible delay and/or voltage difference between // DIO2 and TXEN). #define SX126X_TXEN 13 // Schematic connects EBYTE module's TXEN pin to MCU #define SX126X_RXEN 14 // Schematic connects EBYTE module's RXEN pin to MCU diff --git a/variants/ikoka_handheld_nrf/IkokaNrf52Board.cpp b/variants/ikoka_handheld_nrf/IkokaNrf52Board.cpp index 44940b8ff..121a599ac 100644 --- a/variants/ikoka_handheld_nrf/IkokaNrf52Board.cpp +++ b/variants/ikoka_handheld_nrf/IkokaNrf52Board.cpp @@ -36,7 +36,7 @@ void IkokaNrf52Board::begin() { pinMode(VBAT_ENABLE, OUTPUT); digitalWrite(VBAT_ENABLE, HIGH); - // required button pullup is handled as part of button initilization + // required button pullup is handled as part of button initialization // in target.cpp #if defined(PIN_WIRE_SDA) && defined(PIN_WIRE_SCL) diff --git a/variants/ikoka_handheld_nrf/IkokaNrf52Board.h b/variants/ikoka_handheld_nrf/IkokaNrf52Board.h index 9dfc3833e..8824ac259 100644 --- a/variants/ikoka_handheld_nrf/IkokaNrf52Board.h +++ b/variants/ikoka_handheld_nrf/IkokaNrf52Board.h @@ -23,11 +23,11 @@ class IkokaNrf52Board : public mesh::MainBoard { #endif uint16_t getBattMilliVolts() override { - // Please read befor going further ;) + // Please read before going further ;) // https://wiki.seeedstudio.com/XIAO_BLE#q3-what-are-the-considerations-when-using-xiao-nrf52840-sense-for-battery-charging // We can't drive VBAT_ENABLE to HIGH as long - // as we don't know wether we are charging or not ... + // as we don't know whether we are charging or not ... // this is a 3mA loss (4/1500) digitalWrite(VBAT_ENABLE, LOW); int adcvalue = 0; diff --git a/variants/ikoka_handheld_nrf/variant.cpp b/variants/ikoka_handheld_nrf/variant.cpp index 38a94c895..a92f6bddd 100644 --- a/variants/ikoka_handheld_nrf/variant.cpp +++ b/variants/ikoka_handheld_nrf/variant.cpp @@ -60,7 +60,7 @@ void initVariant() { // https://wiki.seeedstudio.com/XIAO_BLE#q3-what-are-the-considerations-when-using-xiao-nrf52840-sense-for-battery-charging pinMode(VBAT_ENABLE, OUTPUT); // digitalWrite(VBAT_ENABLE, HIGH); - // This was taken from Seeed github butis not coherent with the doc, + // This was taken from Seeed github but is not coherent with the doc, // VBAT_ENABLE should be kept to LOW to protect P0.14, (1500/500)*(4.2-3.3)+3.3 = 3.9V > 3.6V // This induces a 3mA current in the resistors :( but it's better than burning the nrf digitalWrite(VBAT_ENABLE, LOW); diff --git a/variants/ikoka_handheld_nrf/variant.h b/variants/ikoka_handheld_nrf/variant.h index 8e6a8ed18..b056b3d15 100644 --- a/variants/ikoka_handheld_nrf/variant.h +++ b/variants/ikoka_handheld_nrf/variant.h @@ -35,7 +35,7 @@ extern "C" #define LED_GREEN (13) #define LED_BLUE (12) -#define LED_STATE_ON (1) // State when LED is litted +#define LED_STATE_ON (1) // State when LED is lit // Buttons #define PIN_BUTTON1 (PINS_COUNT) diff --git a/variants/ikoka_nano_nrf/IkokaNanoNRFBoard.h b/variants/ikoka_nano_nrf/IkokaNanoNRFBoard.h index 8484085b0..7ff35f997 100644 --- a/variants/ikoka_nano_nrf/IkokaNanoNRFBoard.h +++ b/variants/ikoka_nano_nrf/IkokaNanoNRFBoard.h @@ -31,11 +31,11 @@ class IkokaNanoNRFBoard : public mesh::MainBoard { #endif uint16_t getBattMilliVolts() override { - // Please read befor going further ;) + // Please read before going further ;) // https://wiki.seeedstudio.com/XIAO_BLE#q3-what-are-the-considerations-when-using-xiao-nrf52840-sense-for-battery-charging // We can't drive VBAT_ENABLE to HIGH as long - // as we don't know wether we are charging or not ... + // as we don't know whether we are charging or not ... // this is a 3mA loss (4/1500) digitalWrite(VBAT_ENABLE, LOW); int adcvalue = 0; diff --git a/variants/ikoka_nano_nrf/variant.cpp b/variants/ikoka_nano_nrf/variant.cpp index 16542e273..f353a226e 100644 --- a/variants/ikoka_nano_nrf/variant.cpp +++ b/variants/ikoka_nano_nrf/variant.cpp @@ -61,7 +61,7 @@ void initVariant() // https://wiki.seeedstudio.com/XIAO_BLE#q3-what-are-the-considerations-when-using-xiao-nrf52840-sense-for-battery-charging pinMode(VBAT_ENABLE, OUTPUT); //digitalWrite(VBAT_ENABLE, HIGH); - // This was taken from Seeed github butis not coherent with the doc, + // This was taken from Seeed github but is not coherent with the doc, // VBAT_ENABLE should be kept to LOW to protect P0.14, (1500/500)*(4.2-3.3)+3.3 = 3.9V > 3.6V // This induces a 3mA current in the resistors :( but it's better than burning the nrf digitalWrite(VBAT_ENABLE, LOW); diff --git a/variants/ikoka_nano_nrf/variant.h b/variants/ikoka_nano_nrf/variant.h index 1496aad09..8b17960c4 100644 --- a/variants/ikoka_nano_nrf/variant.h +++ b/variants/ikoka_nano_nrf/variant.h @@ -35,7 +35,7 @@ extern "C" #define LED_GREEN (13) #define LED_BLUE (12) -#define LED_STATE_ON (0) // State when LED is litted +#define LED_STATE_ON (0) // State when LED is lit // Buttons // #define PIN_BUTTON1 (PINS_COUNT) diff --git a/variants/ikoka_stick_nrf/IkokaStickNRFBoard.h b/variants/ikoka_stick_nrf/IkokaStickNRFBoard.h index 4a061d42f..c99f70ed9 100644 --- a/variants/ikoka_stick_nrf/IkokaStickNRFBoard.h +++ b/variants/ikoka_stick_nrf/IkokaStickNRFBoard.h @@ -31,11 +31,11 @@ class IkokaStickNRFBoard : public mesh::MainBoard { #endif uint16_t getBattMilliVolts() override { - // Please read befor going further ;) + // Please read before going further ;) // https://wiki.seeedstudio.com/XIAO_BLE#q3-what-are-the-considerations-when-using-xiao-nrf52840-sense-for-battery-charging // We can't drive VBAT_ENABLE to HIGH as long - // as we don't know wether we are charging or not ... + // as we don't know whether we are charging or not ... // this is a 3mA loss (4/1500) digitalWrite(VBAT_ENABLE, LOW); int adcvalue = 0; diff --git a/variants/ikoka_stick_nrf/variant.cpp b/variants/ikoka_stick_nrf/variant.cpp index 16542e273..f353a226e 100644 --- a/variants/ikoka_stick_nrf/variant.cpp +++ b/variants/ikoka_stick_nrf/variant.cpp @@ -61,7 +61,7 @@ void initVariant() // https://wiki.seeedstudio.com/XIAO_BLE#q3-what-are-the-considerations-when-using-xiao-nrf52840-sense-for-battery-charging pinMode(VBAT_ENABLE, OUTPUT); //digitalWrite(VBAT_ENABLE, HIGH); - // This was taken from Seeed github butis not coherent with the doc, + // This was taken from Seeed github but is not coherent with the doc, // VBAT_ENABLE should be kept to LOW to protect P0.14, (1500/500)*(4.2-3.3)+3.3 = 3.9V > 3.6V // This induces a 3mA current in the resistors :( but it's better than burning the nrf digitalWrite(VBAT_ENABLE, LOW); diff --git a/variants/ikoka_stick_nrf/variant.h b/variants/ikoka_stick_nrf/variant.h index ff5a41a63..3349b86f4 100644 --- a/variants/ikoka_stick_nrf/variant.h +++ b/variants/ikoka_stick_nrf/variant.h @@ -35,7 +35,7 @@ extern "C" #define LED_GREEN (13) #define LED_BLUE (12) -#define LED_STATE_ON (0) // State when LED is litted +#define LED_STATE_ON (0) // State when LED is lit // Buttons #define PIN_BUTTON1 (PINS_COUNT) diff --git a/variants/lilygo_tbeam_SX1276/platformio.ini b/variants/lilygo_tbeam_SX1276/platformio.ini index 3562c40e9..6b9ade214 100644 --- a/variants/lilygo_tbeam_SX1276/platformio.ini +++ b/variants/lilygo_tbeam_SX1276/platformio.ini @@ -63,7 +63,7 @@ build_flags = -D ADVERT_LON=0.0 -D ADMIN_PASSWORD='"password"' -D MAX_NEIGHBOURS=50 - -D PERSISTANT_GPS=1 + -D PERSISTENT_GPS=1 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${LilyGo_TBeam_SX1276.build_src_filter} @@ -81,7 +81,7 @@ lib_deps = ; -D ADVERT_LON=0.0 ; -D ADMIN_PASSWORD='"password"' ; -D MAX_NEIGHBOURS=50 -; -D PERSISTANT_GPS=1 +; -D PERSISTENT_GPS=1 ; -D WITH_RS232_BRIDGE=Serial2 ; -D WITH_RS232_BRIDGE_RX=5 ; -D WITH_RS232_BRIDGE_TX=6 @@ -104,7 +104,7 @@ build_flags = -D ADVERT_LON=0.0 -D ADMIN_PASSWORD='"password"' -D MAX_NEIGHBOURS=50 - -D PERSISTANT_GPS=1 + -D PERSISTENT_GPS=1 -D WITH_ESPNOW_BRIDGE=1 ; -D BRIDGE_DEBUG=1 ; -D MESH_PACKET_LOGGING=1 diff --git a/variants/meshadventurer/variant.h b/variants/meshadventurer/variant.h index 356a3e172..32ea772ae 100644 --- a/variants/meshadventurer/variant.h +++ b/variants/meshadventurer/variant.h @@ -32,7 +32,7 @@ // The E22's TXEN pin is connected to MCU pin, E22's RXEN pin is connected to MCU pin (allows for ramping up PA before transmission // Don't define DIO2_AS_RF_SWITCH because we only use DIO2 or an MCU pin mutually exclusively to connect to E22's TXEN (to prevent -// a short if they are both connected at the same time and there's a slight non-neglibible delay and/or voltage difference between +// a short if they are both connected at the same time and there's a slight non-negligible delay and/or voltage difference between // DIO2 and TXEN). #define SX126X_TXEN 13 // Schematic connects EBYTE module's TXEN pin to MCU #define SX126X_RXEN 14 // Schematic connects EBYTE module's RXEN pin to MCU diff --git a/variants/nano_g2_ultra/variant.h b/variants/nano_g2_ultra/variant.h index b8a53fcfb..1e58f8ebf 100644 --- a/variants/nano_g2_ultra/variant.h +++ b/variants/nano_g2_ultra/variant.h @@ -118,7 +118,7 @@ External serial flash W25Q16JV_IQ // This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the main CPU? #define SX126X_BUSY (32 + 11) #define SX126X_RESET (32 + 15) -// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3 +// DIO2 controls an antenna switch and the TCXO voltage is controlled by DIO3 #define SX126X_DIO2_AS_RF_SWITCH #define SX126X_DIO3_TCXO_VOLTAGE 1.8 @@ -165,7 +165,7 @@ External serial flash W25Q16JV_IQ // Battery // The battery sense is hooked to pin A0 (2) -// it is defined in the anlaolgue pin section of this file +// it is defined in the analog pin section of this file // and has 12 bit resolution #define BATTERY_SENSE_RESOLUTION_BITS 12 #define BATTERY_SENSE_RESOLUTION 4096.0 diff --git a/variants/rak4631/variant.h b/variants/rak4631/variant.h index e83d1339e..f80c8b98f 100644 --- a/variants/rak4631/variant.h +++ b/variants/rak4631/variant.h @@ -75,7 +75,7 @@ extern "C" #define LED_GREEN PIN_LED1 #define LED_BLUE PIN_LED2 -#define LED_STATE_ON 1 // State when LED is litted +#define LED_STATE_ON 1 // State when LED is lit /* * Buttons diff --git a/variants/sensecap_solar/variant.h b/variants/sensecap_solar/variant.h index 76494f48e..fd1e352c4 100644 --- a/variants/sensecap_solar/variant.h +++ b/variants/sensecap_solar/variant.h @@ -27,7 +27,7 @@ #define LED_GREEN (12) #define LED_BLUE (11) -#define LED_STATE_ON (1) // State when LED is litted +#define LED_STATE_ON (1) // State when LED is lit // Buttons #define PIN_BUTTON1 (13) diff --git a/variants/thinknode_m5/platformio.ini b/variants/thinknode_m5/platformio.ini index 23db506a6..719fc5eb1 100644 --- a/variants/thinknode_m5/platformio.ini +++ b/variants/thinknode_m5/platformio.ini @@ -3,7 +3,7 @@ extends = esp32_base board = ESP32-S3-WROOM-1-N4 build_flags = ${esp32_base.build_flags} -I variants/thinknode_m5 - -I src/helpres/sensors + -I src/helpers/sensors -D THINKNODE_M5 -D PIN_BUZZER=9 -D PIN_BOARD_SCL=1 @@ -38,7 +38,7 @@ build_flags = ${esp32_base.build_flags} -D SX126X_RX_BOOSTED_GAIN=1 -D MESH_DEBUG=1 -D ENV_INCLUDE_GPS=1 - -D PERSISTANT_GPS=1 + -D PERSISTENT_GPS=1 -D ENV_SKIP_GPS_DETECT=1 build_src_filter = ${esp32_base.build_src_filter} +<helpers/sensors/EnvironmentSensorManager.cpp> @@ -111,7 +111,7 @@ lib_deps = ${esp32_ota.lib_deps} [env:ThinkNode_M5_room_server] -extends = ThinkNonde_M5 +extends = ThinkNode_M5 build_src_filter = ${ThinkNode_M5.build_src_filter} +<../examples/simple_room_server> build_flags = diff --git a/variants/wio-tracker-l1/variant.cpp b/variants/wio-tracker-l1/variant.cpp index 4fc2606a3..e4e0aad54 100644 --- a/variants/wio-tracker-l1/variant.cpp +++ b/variants/wio-tracker-l1/variant.cpp @@ -19,7 +19,7 @@ const uint32_t g_ADigitalPinMap[] = { // D11-D12 - LED outputs 33, // D11 P1.1 User LED - // Buzzzer + // Buzzer 32, // D12 P1.0 Buzzer // D13 - User input diff --git a/variants/xiao_nrf52/XiaoNrf52Board.h b/variants/xiao_nrf52/XiaoNrf52Board.h index f37660123..b3c901249 100644 --- a/variants/xiao_nrf52/XiaoNrf52Board.h +++ b/variants/xiao_nrf52/XiaoNrf52Board.h @@ -23,11 +23,11 @@ class XiaoNrf52Board : public mesh::MainBoard { #endif uint16_t getBattMilliVolts() override { - // Please read befor going further ;) + // Please read before going further ;) // https://wiki.seeedstudio.com/XIAO_BLE#q3-what-are-the-considerations-when-using-xiao-nrf52840-sense-for-battery-charging // We can't drive VBAT_ENABLE to HIGH as long - // as we don't know wether we are charging or not ... + // as we don't know whether we are charging or not ... // this is a 3mA loss (4/1500) digitalWrite(VBAT_ENABLE, LOW); int adcvalue = 0; diff --git a/variants/xiao_nrf52/variant.cpp b/variants/xiao_nrf52/variant.cpp index 04ef3a924..691911a10 100644 --- a/variants/xiao_nrf52/variant.cpp +++ b/variants/xiao_nrf52/variant.cpp @@ -60,7 +60,7 @@ void initVariant() { // https://wiki.seeedstudio.com/XIAO_BLE#q3-what-are-the-considerations-when-using-xiao-nrf52840-sense-for-battery-charging pinMode(VBAT_ENABLE, OUTPUT); // digitalWrite(VBAT_ENABLE, HIGH); - // This was taken from Seeed github butis not coherent with the doc, + // This was taken from Seeed github but is not coherent with the doc, // VBAT_ENABLE should be kept to LOW to protect P0.14, (1500/500)*(4.2-3.3)+3.3 = 3.9V > 3.6V // This induces a 3mA current in the resistors :( but it's better than burning the nrf digitalWrite(VBAT_ENABLE, LOW);