Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions arch/stm32/Adafruit_LittleFS_stm32/src/littlefs/lfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/companion_protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ MeshCore Companion devices expose a BLE service with the following UUIDs:

5. **Send Initial Commands**
- Send `CMD_APP_START` to identify your app to firmware and get radio settings
- Send `CMD_DEVICE_QEURY` to fetch device info and negotiate supported protocol versions
- Send `CMD_DEVICE_QUERY` to fetch device info and negotiate supported protocol versions
- Send `CMD_SET_DEVICE_TIME` to set the firmware clock
- Send `CMD_GET_CONTACTS` to fetch all contacts
- Send `CMD_GET_CHANNEL` multiple times to fetch all channel slots
Expand Down
2 changes: 1 addition & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ Allow the browser user on it:
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
11. If the device is not found, enable `Force Scanning` in the DFU app
12. Tab the `Upload` to begin OTA update
13. If it fails, try turning off and on Bluetooth on your phone. If that doesn't work, try rebooting your phone. If you keep getting failures at the "Enabling Bootloader" step, try forgetting the NRF board in your IOS or Andriod device's bluetooth settings and re-pair it through the DFU app.
13. If it fails, try turning off and on Bluetooth on your phone. If that doesn't work, try rebooting your phone. If you keep getting failures at the "Enabling Bootloader" step, try forgetting the NRF board in your IOS or Android device's bluetooth settings and re-pair it through the DFU app.
14. Wait for the update to complete. It can take a few minutes.
15. It is strongly recommended that you install and use the OTAFIX bootloader at https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX.
16. To update a companion node over OTA, it must be running companion firmware v1.15 or greater.
Expand Down
2 changes: 1 addition & 1 deletion docs/number_allocations.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Number Allocations

This document lists unique numbers/identifiers used in various MeshCore protcol payloads.
This document lists unique numbers/identifiers used in various MeshCore protocol payloads.

# Group Data Types

Expand Down
4 changes: 2 additions & 2 deletions docs/payloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,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 |
|----------|--------------|------------------------------------------------------------|
Expand Down Expand Up @@ -141,7 +141,7 @@ Not defined in `BaseChatMesh`.

Not defined in `BaseChatMesh`.

### Get Neighors
### Get Neighbors

Not defined in `BaseChatMesh`.

Expand Down
2 changes: 1 addition & 1 deletion examples/companion_radio/DataStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,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)) {
Expand Down
8 changes: 4 additions & 4 deletions examples/companion_radio/MyMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -81,7 +81,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)
Expand Down Expand Up @@ -1006,7 +1006,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;
Expand Down Expand Up @@ -1112,7 +1112,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 text msg
int i = 1;
Expand Down
4 changes: 2 additions & 2 deletions examples/companion_radio/ui-new/UITask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ void UITask::loop() {
#endif

#ifdef AUTO_SHUTDOWN_MILLIVOLTS
if (millis() > next_batt_chck) {
if (millis() > next_batt_check) {
uint16_t milliVolts = getBattMilliVolts();
if (milliVolts > 0 && milliVolts < AUTO_SHUTDOWN_MILLIVOLTS) {

Expand All @@ -840,7 +840,7 @@ void UITask::loop() {
shutdown();

}
next_batt_chck = millis() + 8000;
next_batt_check = millis() + 8000;
}
#endif
}
Expand Down
4 changes: 2 additions & 2 deletions examples/companion_radio/ui-new/UITask.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class UITask : public AbstractUITask {
char _alert[80];
unsigned long _alert_expiry;
int _msgcount;
unsigned long ui_started_at, next_batt_chck;
unsigned long ui_started_at, next_batt_check;
int next_backlight_btn_check = 0;
#ifdef PIN_STATUS_LED
int led_state = 0;
Expand Down Expand Up @@ -66,7 +66,7 @@ class UITask : public AbstractUITask {
public:

UITask(mesh::MainBoard* board, BaseSerialInterface* serial) : AbstractUITask(board, serial), _display(NULL), _sensors(NULL) {
next_batt_chck = _next_refresh = 0;
next_batt_check = _next_refresh = 0;
ui_started_at = 0;
curr = NULL;
}
Expand Down
8 changes: 4 additions & 4 deletions examples/companion_radio/ui-tiny/UITask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,19 +715,19 @@ void UITask::loop() {
#endif

#ifdef AUTO_SHUTDOWN_MILLIVOLTS
if (millis() > next_batt_chck) {
if (millis() > next_batt_check) {
_cached_batt_mv = getBattMilliVolts();
if (_cached_batt_mv > 0 && _cached_batt_mv < AUTO_SHUTDOWN_MILLIVOLTS) {

shutdown();

}
next_batt_chck = millis() + 8000;
next_batt_check = millis() + 8000;
}
#else
if (_display != NULL && _display->isOn() && millis >= next_batt_chck) {
if (_display != NULL && _display->isOn() && millis >= next_batt_check) {
_cached_batt_mv = getBattMilliVolts();
next_batt_chck = millis() + 8000;
next_batt_check = millis() + 8000;
}
#endif
}
Expand Down
4 changes: 2 additions & 2 deletions examples/companion_radio/ui-tiny/UITask.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class UITask : public AbstractUITask {
char _alert[80];
unsigned long _alert_expiry;
int _msgcount;
unsigned long ui_started_at, next_batt_chck;
unsigned long ui_started_at, next_batt_check;
int next_backlight_btn_check = 0;
uint16_t _cached_batt_mv;
#ifdef PIN_STATUS_LED
Expand Down Expand Up @@ -72,7 +72,7 @@ class UITask : public AbstractUITask {
public:

UITask(mesh::MainBoard* board, BaseSerialInterface* serial) : AbstractUITask(board, serial), _display(NULL), _sensors(NULL) {
next_batt_chck = _next_refresh = 0;
next_batt_check = _next_refresh = 0;
_cached_batt_mv = 0;
ui_started_at = 0;
curr = NULL;
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_repeater/MyMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,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());
}
}
Expand Down
8 changes: 4 additions & 4 deletions examples/simple_room_server/MyMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct ServerStats {
};

void MyMesh::addPost(ClientInfo *client, const char *postData) {
// TODO: suggested postData format: <title>/<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);

Expand Down Expand Up @@ -309,7 +309,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

Expand Down Expand Up @@ -456,7 +456,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) {
Expand Down Expand Up @@ -978,7 +978,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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_sensor/SensorMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Identity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ bool LocalIdentity::validatePrivateKey(const uint8_t prv[64]) {

uint8_t ss1[32], ss2[32];

// shared secret we calculte from test client pubkey and given private key
// shared secret we calculate from test client pubkey and given private key
ed25519_key_exchange(ss1, test_client_pub, prv);

// shared secret they calculate from our derived public key and test client private key
Expand Down
4 changes: 2 additions & 2 deletions src/Identity.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,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)
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ void Mesh::sendFlood(Packet* packet, uint32_t delay_millis, uint8_t path_hash_si
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;
}
Expand Down Expand Up @@ -666,7 +666,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;
}
Expand Down
8 changes: 4 additions & 4 deletions src/Mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class Mesh : public Dispatcher {

/**
* \brief A path TO peer (sender_idx) has been received. (also with optional 'extra' data encoded)
* NOTE: these can be received multiple times (per sender), via differen routes
* NOTE: these can be received multiple times (per sender), via different routes
* \param sender_idx index of peer, [0..n) where n is what searchPeersByHash() returned
* \param secret the pre-calculated shared-secret (handy for sending response packet)
* \returns true, if path was accepted and that reciprocal path should be sent
Expand All @@ -130,7 +130,7 @@ class Mesh : public Dispatcher {

/**
* \brief A path TO 'sender' has been received. (also with optional 'extra' data encoded)
* NOTE: these can be received multiple times (per sender), via differen routes
* NOTE: these can be received multiple times (per sender), via different routes
*/
virtual void onPathRecv(Packet* packet, Identity& sender, uint8_t* path, uint8_t path_len, uint8_t extra_type, uint8_t* extra, uint8_t extra_len) { }

Expand Down Expand Up @@ -212,12 +212,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 transort 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);
Expand Down
2 changes: 1 addition & 1 deletion src/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/StaticPoolPacketManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ bool 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);
}
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/esp32/TBeamBoard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void TBeamBoard::scanDevices(TwoWire *w)
}

} else if (err == 4) {
Serial.print("Unknow error at address 0x");
Serial.print("Unknown error at address 0x");
if (addr < 16) {
Serial.print("0");
}
Expand Down Expand Up @@ -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

Expand Down
Loading