From 12481b568ab2d7cd16b0a42161024583c03d269f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 26 Sep 2024 02:09:06 +0200 Subject: [PATCH 1/4] fix a lot of nuisances reported by cppcheck (#4872) * fix a lot of nuisances reported by cppcheck * fix portduino --- src/SafeFile.h | 2 +- src/gps/GPS.cpp | 2 +- src/graphics/Screen.cpp | 2 +- src/mesh/CryptoEngine.cpp | 4 ++-- src/mesh/ProtobufModule.h | 2 +- src/mesh/aes-ccm.cpp | 2 +- src/mesh/compression/unishox2.cpp | 4 ++-- src/meshUtils.cpp | 3 +-- src/modules/AdminModule.cpp | 4 ++-- src/modules/AdminModule.h | 4 ++-- src/modules/CannedMessageModule.cpp | 8 ++++---- src/modules/Telemetry/EnvironmentTelemetry.cpp | 2 +- src/modules/Telemetry/PowerTelemetry.cpp | 2 +- src/modules/TraceRouteModule.cpp | 2 +- src/modules/WaypointModule.cpp | 2 +- src/mqtt/MQTT.cpp | 4 ++-- src/platform/nrf52/BLEDfuScure.cpp | 3 +-- src/serialization/JSONValue.cpp | 16 ++++++++-------- 18 files changed, 33 insertions(+), 35 deletions(-) diff --git a/src/SafeFile.h b/src/SafeFile.h index 7088074cd..61361d312 100644 --- a/src/SafeFile.h +++ b/src/SafeFile.h @@ -24,7 +24,7 @@ class SafeFile : public Print { public: - SafeFile(char const *filepath, bool fullAtomic = false); + explicit SafeFile(char const *filepath, bool fullAtomic = false); virtual size_t write(uint8_t); virtual size_t write(const uint8_t *buffer, size_t size); diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index b13ca4b06..569254d02 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -405,9 +405,9 @@ int GPS::getACK(uint8_t *buffer, uint16_t size, uint8_t requestedClass, uint8_t bool GPS::setup() { - int msglen = 0; if (!didSerialInit) { + int msglen = 0; if (tx_gpio && gnssModel == GNSS_MODEL_UNKNOWN) { // if GPS_BAUDRATE is specified in variant (i.e. not 9600), skip to the specified rate. diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index f8a64cc61..f95146318 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -2201,7 +2201,7 @@ void Screen::setFrames(FrameFocus focus) case FOCUS_PRESERVE: // If we can identify which type of frame "originalPosition" was, can move directly to it in the new frameset - FramesetInfo &oldFsi = this->framesetInfo; + const FramesetInfo &oldFsi = this->framesetInfo; if (originalPosition == oldFsi.positions.log) ui->switchToFrame(fsi.positions.log); else if (originalPosition == oldFsi.positions.settings) diff --git a/src/mesh/CryptoEngine.cpp b/src/mesh/CryptoEngine.cpp index 79666b321..f705bae03 100644 --- a/src/mesh/CryptoEngine.cpp +++ b/src/mesh/CryptoEngine.cpp @@ -167,12 +167,12 @@ bool CryptoEngine::setDHKey(uint32_t nodeNum) void CryptoEngine::hash(uint8_t *bytes, size_t numBytes) { SHA256 hash; - size_t posn, len; + size_t posn; uint8_t size = numBytes; uint8_t inc = 16; hash.reset(); for (posn = 0; posn < size; posn += inc) { - len = size - posn; + size_t len = size - posn; if (len > inc) len = inc; hash.update(bytes + posn, len); diff --git a/src/mesh/ProtobufModule.h b/src/mesh/ProtobufModule.h index 3b438ebeb..e4d4e5c09 100644 --- a/src/mesh/ProtobufModule.h +++ b/src/mesh/ProtobufModule.h @@ -108,7 +108,7 @@ template class ProtobufModule : protected SinglePortModule T *decoded = NULL; if (mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag && mp.decoded.portnum == ourPortNum) { memset(&scratch, 0, sizeof(scratch)); - auto &p = mp.decoded; + const meshtastic_Data &p = mp.decoded; if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, fields, &scratch)) { decoded = &scratch; } else { diff --git a/src/mesh/aes-ccm.cpp b/src/mesh/aes-ccm.cpp index cd18ae6c5..b9af14fdb 100644 --- a/src/mesh/aes-ccm.cpp +++ b/src/mesh/aes-ccm.cpp @@ -95,7 +95,7 @@ static void aes_ccm_encr(size_t L, const uint8_t *in, size_t len, uint8_t *out, *out++ ^= *in++; } } -static void aes_ccm_encr_auth(size_t M, uint8_t *x, uint8_t *a, uint8_t *auth) +static void aes_ccm_encr_auth(size_t M, const uint8_t *x, uint8_t *a, uint8_t *auth) { size_t i; uint8_t tmp[AES_BLOCK_SIZE]; diff --git a/src/mesh/compression/unishox2.cpp b/src/mesh/compression/unishox2.cpp index 4e239d489..9fc012a76 100644 --- a/src/mesh/compression/unishox2.cpp +++ b/src/mesh/compression/unishox2.cpp @@ -339,7 +339,7 @@ int32_t readUTF8(const char *in, int len, int l, int *utf8len) /// This is also used for Unicode strings \n /// This is a crude implementation that is not optimized. Assuming only short strings \n /// are encoded, this is not much of an issue. -int matchOccurance(const char *in, int len, int l, char *out, int olen, int *ol, uint8_t *state, const uint8_t usx_hcodes[], +int matchOccurance(const char *in, int len, int l, char *out, int olen, int *ol, const uint8_t *state, const uint8_t usx_hcodes[], const uint8_t usx_hcode_lens[]) { int j, k; @@ -383,7 +383,7 @@ int matchOccurance(const char *in, int len, int l, char *out, int olen, int *ol, /// This is also used for Unicode strings \n /// This is a crude implementation that is not optimized. Assuming only short strings \n /// are encoded, this is not much of an issue. -int matchLine(const char *in, int len, int l, char *out, int olen, int *ol, struct us_lnk_lst *prev_lines, uint8_t *state, +int matchLine(const char *in, int len, int l, char *out, int olen, int *ol, struct us_lnk_lst *prev_lines, const uint8_t *state, const uint8_t usx_hcodes[], const uint8_t usx_hcode_lens[]) { int last_ol = *ol; diff --git a/src/meshUtils.cpp b/src/meshUtils.cpp index 853193a12..2789a143c 100644 --- a/src/meshUtils.cpp +++ b/src/meshUtils.cpp @@ -60,10 +60,9 @@ char *strnstr(const char *s, const char *find, size_t slen) void printBytes(const char *label, const uint8_t *p, size_t numbytes) { - char *messageBuffer; int labelSize = strlen(label); if (labelSize < 100 && numbytes < 64) { - messageBuffer = new char[labelSize + (numbytes * 3) + 2]; + char *messageBuffer = new char[labelSize + (numbytes * 3) + 2]; strncpy(messageBuffer, label, labelSize); for (size_t i = 0; i < numbytes; i++) snprintf(messageBuffer + labelSize + i * 3, 4, " %02x", p[i]); diff --git a/src/modules/AdminModule.cpp b/src/modules/AdminModule.cpp index 389a0db8d..09311abda 100644 --- a/src/modules/AdminModule.cpp +++ b/src/modules/AdminModule.cpp @@ -1026,7 +1026,7 @@ bool AdminModule::checkPassKey(meshtastic_AdminMessage *res) memcmp(res->session_passkey.bytes, session_passkey, 8) == 0); } -bool AdminModule::messageIsResponse(meshtastic_AdminMessage *r) +bool AdminModule::messageIsResponse(const meshtastic_AdminMessage *r) { if (r->which_payload_variant == meshtastic_AdminMessage_get_channel_response_tag || r->which_payload_variant == meshtastic_AdminMessage_get_owner_response_tag || @@ -1043,7 +1043,7 @@ bool AdminModule::messageIsResponse(meshtastic_AdminMessage *r) return false; } -bool AdminModule::messageIsRequest(meshtastic_AdminMessage *r) +bool AdminModule::messageIsRequest(const meshtastic_AdminMessage *r) { if (r->which_payload_variant == meshtastic_AdminMessage_get_channel_request_tag || r->which_payload_variant == meshtastic_AdminMessage_get_owner_request_tag || diff --git a/src/modules/AdminModule.h b/src/modules/AdminModule.h index 328e1c824..d6c0a7343 100644 --- a/src/modules/AdminModule.h +++ b/src/modules/AdminModule.h @@ -55,8 +55,8 @@ class AdminModule : public ProtobufModule, public Obser void setPassKey(meshtastic_AdminMessage *res); bool checkPassKey(meshtastic_AdminMessage *res); - bool messageIsResponse(meshtastic_AdminMessage *r); - bool messageIsRequest(meshtastic_AdminMessage *r); + bool messageIsResponse(const meshtastic_AdminMessage *r); + bool messageIsRequest(const meshtastic_AdminMessage *r); }; extern AdminModule *adminModule; diff --git a/src/modules/CannedMessageModule.cpp b/src/modules/CannedMessageModule.cpp index d4d112f90..e38b7e063 100644 --- a/src/modules/CannedMessageModule.cpp +++ b/src/modules/CannedMessageModule.cpp @@ -78,16 +78,16 @@ int CannedMessageModule::splitConfiguredMessages() int messageIndex = 0; int i = 0; - String messages = cannedMessageModuleConfig.messages; + String canned_messages = cannedMessageModuleConfig.messages; #if defined(T_WATCH_S3) || defined(RAK14014) - String separator = messages.length() ? "|" : ""; + String separator = canned_messages.length() ? "|" : ""; - messages = "[---- Free Text ----]" + separator + messages; + canned_messages = "[---- Free Text ----]" + separator + canned_messages; #endif // collect all the message parts - strncpy(this->messageStore, messages.c_str(), sizeof(this->messageStore)); + strncpy(this->messageStore, canned_messages.c_str(), sizeof(this->messageStore)); // The first message points to the beginning of the store. this->messages[messageIndex++] = this->messageStore; diff --git a/src/modules/Telemetry/EnvironmentTelemetry.cpp b/src/modules/Telemetry/EnvironmentTelemetry.cpp index 8f891593a..ac291c4ab 100644 --- a/src/modules/Telemetry/EnvironmentTelemetry.cpp +++ b/src/modules/Telemetry/EnvironmentTelemetry.cpp @@ -216,7 +216,7 @@ void EnvironmentTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiSt uint32_t agoSecs = GetTimeSinceMeshPacket(lastMeasurementPacket); const char *lastSender = getSenderShortName(*lastMeasurementPacket); - auto &p = lastMeasurementPacket->decoded; + const meshtastic_Data &p = lastMeasurementPacket->decoded; if (!pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &lastMeasurement)) { display->drawString(x, y, "Measurement Error"); LOG_ERROR("Unable to decode last packet"); diff --git a/src/modules/Telemetry/PowerTelemetry.cpp b/src/modules/Telemetry/PowerTelemetry.cpp index 6130c2c83..d31892042 100644 --- a/src/modules/Telemetry/PowerTelemetry.cpp +++ b/src/modules/Telemetry/PowerTelemetry.cpp @@ -122,7 +122,7 @@ void PowerTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *s uint32_t agoSecs = GetTimeyWimeySinceMeshPacket(lastMeasurementPacket); const char *lastSender = getSenderShortName(*lastMeasurementPacket); - auto &p = lastMeasurementPacket->decoded; + const meshtastic_Data &p = lastMeasurementPacket->decoded; if (!pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &lastMeasurement)) { display->setFont(FONT_SMALL); display->drawString(x, y += _fontHeight(FONT_MEDIUM), "Measurement Error"); diff --git a/src/modules/TraceRouteModule.cpp b/src/modules/TraceRouteModule.cpp index 23b4f1ccf..1f652dbf6 100644 --- a/src/modules/TraceRouteModule.cpp +++ b/src/modules/TraceRouteModule.cpp @@ -11,7 +11,7 @@ bool TraceRouteModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, m void TraceRouteModule::alterReceivedProtobuf(meshtastic_MeshPacket &p, meshtastic_RouteDiscovery *r) { - auto &incoming = p.decoded; + const meshtastic_Data &incoming = p.decoded; // Insert unknown hops if necessary insertUnknownHops(p, r, !incoming.request_id); diff --git a/src/modules/WaypointModule.cpp b/src/modules/WaypointModule.cpp index e1974db73..628d7f62c 100644 --- a/src/modules/WaypointModule.cpp +++ b/src/modules/WaypointModule.cpp @@ -89,7 +89,7 @@ void WaypointModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, display->fillRect(0 + x, 0 + y, x + display->getWidth(), y + FONT_HEIGHT_SMALL); // Decode the waypoint - meshtastic_MeshPacket &mp = devicestate.rx_waypoint; + const meshtastic_MeshPacket &mp = devicestate.rx_waypoint; meshtastic_Waypoint wp; memset(&wp, 0, sizeof(wp)); if (!pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, &meshtastic_Waypoint_msg, &wp)) { diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index 2ce5cd755..891d4b549 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -184,8 +184,8 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length) // PKI messages get accepted even if we can't decrypt if (router && p->which_payload_variant == meshtastic_MeshPacket_encrypted_tag && strcmp(e.channel_id, "PKI") == 0) { - meshtastic_NodeInfoLite *tx = nodeDB->getMeshNode(getFrom(p)); - meshtastic_NodeInfoLite *rx = nodeDB->getMeshNode(p->to); + const meshtastic_NodeInfoLite *tx = nodeDB->getMeshNode(getFrom(p)); + const meshtastic_NodeInfoLite *rx = nodeDB->getMeshNode(p->to); // Only accept PKI messages to us, or if we have both the sender and receiver in our nodeDB, as then it's // likely they discovered each other via a channel we have downlink enabled for if (p->to == nodeDB->getNodeNum() || (tx && tx->has_user && rx && rx->has_user)) diff --git a/src/platform/nrf52/BLEDfuScure.cpp b/src/platform/nrf52/BLEDfuScure.cpp index 8f7a327c4..82cb8905a 100644 --- a/src/platform/nrf52/BLEDfuScure.cpp +++ b/src/platform/nrf52/BLEDfuScure.cpp @@ -48,11 +48,10 @@ extern "C" void bootloader_util_app_start(uint32_t start_addr); static uint16_t crc16(const uint8_t *data_p, uint8_t length) { - uint8_t x; uint16_t crc = 0xFFFF; while (length--) { - x = crc >> 8 ^ *data_p++; + uint8_t x = crc >> 8 ^ *data_p++; x ^= x >> 4; crc = (crc << 8) ^ ((uint16_t)(x << 12)) ^ ((uint16_t)(x << 5)) ^ ((uint16_t)x); } diff --git a/src/serialization/JSONValue.cpp b/src/serialization/JSONValue.cpp index 51e0c1a3b..b2e9575bf 100644 --- a/src/serialization/JSONValue.cpp +++ b/src/serialization/JSONValue.cpp @@ -37,14 +37,14 @@ #define FREE_ARRAY(x) \ { \ JSONArray::iterator iter; \ - for (iter = x.begin(); iter != x.end(); iter++) { \ + for (iter = x.begin(); iter != x.end(); ++iter) { \ delete *iter; \ } \ } #define FREE_OBJECT(x) \ { \ JSONObject::iterator iter; \ - for (iter = x.begin(); iter != x.end(); iter++) { \ + for (iter = x.begin(); iter != x.end(); ++iter) { \ delete (*iter).second; \ } \ } @@ -430,7 +430,7 @@ JSONValue::JSONValue(const JSONValue &m_source) JSONArray source_array = *m_source.array_value; JSONArray::iterator iter; array_value = new JSONArray(); - for (iter = source_array.begin(); iter != source_array.end(); iter++) + for (iter = source_array.begin(); iter != source_array.end(); ++iter) array_value->push_back(new JSONValue(**iter)); break; } @@ -439,7 +439,7 @@ JSONValue::JSONValue(const JSONValue &m_source) JSONObject source_object = *m_source.object_value; object_value = new JSONObject(); JSONObject::iterator iter; - for (iter = source_object.begin(); iter != source_object.end(); iter++) { + for (iter = source_object.begin(); iter != source_object.end(); ++iter) { std::string name = (*iter).first; (*object_value)[name] = new JSONValue(*((*iter).second)); } @@ -462,12 +462,12 @@ JSONValue::~JSONValue() { if (type == JSONType_Array) { JSONArray::iterator iter; - for (iter = array_value->begin(); iter != array_value->end(); iter++) + for (iter = array_value->begin(); iter != array_value->end(); ++iter) delete *iter; delete array_value; } else if (type == JSONType_Object) { JSONObject::iterator iter; - for (iter = object_value->begin(); iter != object_value->end(); iter++) { + for (iter = object_value->begin(); iter != object_value->end(); ++iter) { delete (*iter).second; } delete object_value; @@ -722,7 +722,7 @@ std::vector JSONValue::ObjectKeys() const while (iter != object_value->end()) { keys.push_back(iter->first); - iter++; + ++iter; } } @@ -865,7 +865,7 @@ std::string JSONValue::StringifyString(const std::string &str) str_out += chr; } - iter++; + ++iter; } str_out += "\""; From 14019f2afa093174a6e1fbf6ef3a0b2154fc997d Mon Sep 17 00:00:00 2001 From: Szetya Date: Thu, 26 Sep 2024 02:09:27 +0200 Subject: [PATCH 2/4] Update WaypointModule.cpp (#4870) In INVERTED display mode, the compass ring was not visible. --- src/modules/WaypointModule.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/WaypointModule.cpp b/src/modules/WaypointModule.cpp index 628d7f62c..8194c3d01 100644 --- a/src/modules/WaypointModule.cpp +++ b/src/modules/WaypointModule.cpp @@ -170,17 +170,17 @@ void WaypointModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, else strncpy(distStr, "? km", sizeof(distStr)); } - + + // Draw compass circle + display->drawCircle(compassX, compassY, compassDiam / 2); + // Undo color-inversion, if set prior to drawing header // Unsure of expected behavior? For now: copy drawNodeInfo if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_INVERTED) { display->setColor(BLACK); } - - // Draw compass circle - display->drawCircle(compassX, compassY, compassDiam / 2); - + // Must be after distStr is populated screen->drawColumns(display, x, y, fields); } -#endif \ No newline at end of file +#endif From 9bebad2dbe3650c133d6efac5e028d52ce7fa12a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 25 Sep 2024 19:54:14 -0500 Subject: [PATCH 3/4] Trunkt --- src/modules/WaypointModule.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/WaypointModule.cpp b/src/modules/WaypointModule.cpp index 8194c3d01..a4611e780 100644 --- a/src/modules/WaypointModule.cpp +++ b/src/modules/WaypointModule.cpp @@ -170,16 +170,16 @@ void WaypointModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, else strncpy(distStr, "? km", sizeof(distStr)); } - + // Draw compass circle display->drawCircle(compassX, compassY, compassDiam / 2); - + // Undo color-inversion, if set prior to drawing header // Unsure of expected behavior? For now: copy drawNodeInfo if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_INVERTED) { display->setColor(BLACK); } - + // Must be after distStr is populated screen->drawColumns(display, x, y, fields); } From 8f84a96b6985c586a901ccd443fc2cf25478141f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 26 Sep 2024 12:12:08 +0200 Subject: [PATCH 4/4] refactor: typo fix in macro definition --- src/main.cpp | 4 ++-- variants/ME25LS01-4Y10TD/variant.h | 2 +- variants/ME25LS01-4Y10TD_e-ink/variant.h | 2 +- variants/tracker-t1000-e/variant.h | 2 +- variants/wio-sdk-wm1110/variant.h | 2 +- variants/wio-t1000-s/variant.h | 2 +- variants/wio-tracker-wm1110/variant.h | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 87a4db97c..cbde2ce39 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -972,7 +972,7 @@ void setup() #if defined(USE_LR1110) if (!rIf) { - rIf = new LR1110Interface(RadioLibHAL, LR1110_SPI_NSS_PIN, LR1110_IRQ_PIN, LR1110_NRESER_PIN, LR1110_BUSY_PIN); + rIf = new LR1110Interface(RadioLibHAL, LR1110_SPI_NSS_PIN, LR1110_IRQ_PIN, LR1110_NRESET_PIN, LR1110_BUSY_PIN); if (!rIf->init()) { LOG_WARN("Failed to find LR1110 radio\n"); delete rIf; @@ -985,7 +985,7 @@ void setup() #if defined(USE_LR1120) if (!rIf) { - rIf = new LR1120Interface(RadioLibHAL, LR1120_SPI_NSS_PIN, LR1120_IRQ_PIN, LR1120_NRESER_PIN, LR1120_BUSY_PIN); + rIf = new LR1120Interface(RadioLibHAL, LR1120_SPI_NSS_PIN, LR1120_IRQ_PIN, LR1120_NRESET_PIN, LR1120_BUSY_PIN); if (!rIf->init()) { LOG_WARN("Failed to find LR1120 radio\n"); delete rIf; diff --git a/variants/ME25LS01-4Y10TD/variant.h b/variants/ME25LS01-4Y10TD/variant.h index 715de8ee6..0da391f0b 100644 --- a/variants/ME25LS01-4Y10TD/variant.h +++ b/variants/ME25LS01-4Y10TD/variant.h @@ -94,7 +94,7 @@ extern "C" { #define USE_LR1110 #define LR1110_IRQ_PIN LORA_DIO1 -#define LR1110_NRESER_PIN LORA_RESET +#define LR1110_NRESET_PIN LORA_RESET #define LR1110_BUSY_PIN LORA_DIO2 #define LR1110_SPI_NSS_PIN LORA_CS #define LR1110_SPI_SCK_PIN LORA_SCK diff --git a/variants/ME25LS01-4Y10TD_e-ink/variant.h b/variants/ME25LS01-4Y10TD_e-ink/variant.h index 0b2b13068..105f9b873 100644 --- a/variants/ME25LS01-4Y10TD_e-ink/variant.h +++ b/variants/ME25LS01-4Y10TD_e-ink/variant.h @@ -117,7 +117,7 @@ static const uint8_t SCK = PIN_SPI_SCK; #define USE_LR1110 #define LR1110_IRQ_PIN LORA_DIO1 -#define LR1110_NRESER_PIN LORA_RESET +#define LR1110_NRESET_PIN LORA_RESET #define LR1110_BUSY_PIN LORA_DIO2 #define LR1110_SPI_NSS_PIN LORA_CS #define LR1110_SPI_SCK_PIN LORA_SCK diff --git a/variants/tracker-t1000-e/variant.h b/variants/tracker-t1000-e/variant.h index 470edd08c..b8eb59b31 100644 --- a/variants/tracker-t1000-e/variant.h +++ b/variants/tracker-t1000-e/variant.h @@ -93,7 +93,7 @@ extern "C" { #define USE_LR1110 #define LR1110_IRQ_PIN LORA_DIO1 -#define LR1110_NRESER_PIN LORA_RESET +#define LR1110_NRESET_PIN LORA_RESET #define LR1110_BUSY_PIN LORA_DIO2 #define LR1110_SPI_NSS_PIN LORA_CS #define LR1110_SPI_SCK_PIN LORA_SCK diff --git a/variants/wio-sdk-wm1110/variant.h b/variants/wio-sdk-wm1110/variant.h index 8f66b1f8c..b6e5c79df 100644 --- a/variants/wio-sdk-wm1110/variant.h +++ b/variants/wio-sdk-wm1110/variant.h @@ -95,7 +95,7 @@ extern "C" { #define USE_LR1110 #define LR1110_IRQ_PIN LORA_DIO1 -#define LR1110_NRESER_PIN LORA_RESET +#define LR1110_NRESET_PIN LORA_RESET #define LR1110_BUSY_PIN LORA_DIO2 #define LR1110_SPI_NSS_PIN LORA_CS #define LR1110_SPI_SCK_PIN LORA_SCK diff --git a/variants/wio-t1000-s/variant.h b/variants/wio-t1000-s/variant.h index fa6ea4abc..8894a40c5 100644 --- a/variants/wio-t1000-s/variant.h +++ b/variants/wio-t1000-s/variant.h @@ -94,7 +94,7 @@ extern "C" { #define USE_LR1110 #define LR1110_IRQ_PIN LORA_DIO1 -#define LR1110_NRESER_PIN LORA_RESET +#define LR1110_NRESET_PIN LORA_RESET #define LR1110_BUSY_PIN LORA_DIO2 #define LR1110_SPI_NSS_PIN LORA_CS #define LR1110_SPI_SCK_PIN LORA_SCK diff --git a/variants/wio-tracker-wm1110/variant.h b/variants/wio-tracker-wm1110/variant.h index de7da9911..32e84485d 100644 --- a/variants/wio-tracker-wm1110/variant.h +++ b/variants/wio-tracker-wm1110/variant.h @@ -91,7 +91,7 @@ extern "C" { #define USE_LR1110 #define LR1110_IRQ_PIN LORA_DIO1 -#define LR1110_NRESER_PIN LORA_RESET +#define LR1110_NRESET_PIN LORA_RESET #define LR1110_BUSY_PIN LORA_DIO2 #define LR1110_SPI_NSS_PIN LORA_CS #define LR1110_SPI_SCK_PIN LORA_SCK