mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 22:22:05 +00:00
Warnings
This commit is contained in:
parent
35a5c29a98
commit
b8c3a9456d
@ -804,32 +804,26 @@ GPS::~GPS()
|
|||||||
if (enablePin) {
|
if (enablePin) {
|
||||||
// First delete any transformer objects
|
// First delete any transformer objects
|
||||||
if (pinTransformer) {
|
if (pinTransformer) {
|
||||||
delete pinTransformer;
|
|
||||||
pinTransformer = nullptr;
|
pinTransformer = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unaryTransformer) {
|
if (unaryTransformer) {
|
||||||
delete unaryTransformer;
|
|
||||||
unaryTransformer = nullptr;
|
unaryTransformer = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notTransformer) {
|
if (notTransformer) {
|
||||||
delete notTransformer;
|
|
||||||
notTransformer = nullptr;
|
notTransformer = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enableTransformer) {
|
if (enableTransformer) {
|
||||||
delete enableTransformer;
|
|
||||||
enableTransformer = nullptr;
|
enableTransformer = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hwPin) {
|
if (hwPin) {
|
||||||
delete hwPin;
|
|
||||||
hwPin = nullptr;
|
hwPin = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally delete the enablePin
|
// Finally delete the enablePin
|
||||||
delete enablePin;
|
|
||||||
enablePin = nullptr;
|
enablePin = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1386,8 +1380,8 @@ GnssModel_t GPS::getProbeResponse(unsigned long timeout, const std::vector<ChipI
|
|||||||
if ((bytesRead == 767) || (b == '\r')) {
|
if ((bytesRead == 767) || (b == '\r')) {
|
||||||
// Check the buffer against each possible response in the map
|
// Check the buffer against each possible response in the map
|
||||||
for (const auto &chip : responseMap) {
|
for (const auto &chip : responseMap) {
|
||||||
if (strnstr((char *)buffer, chip.response, bytesRead) != nullptr) {
|
if (strnstr((char *)buffer, chip.detectionString.c_str(), bytesRead) != nullptr) {
|
||||||
LOG_INFO(DETECTED_MESSAGE, chip.name);
|
LOG_INFO("%s detected", chip.chipName.c_str());
|
||||||
// Clear any remaining bytes in the buffer to prevent interfering with future commands
|
// Clear any remaining bytes in the buffer to prevent interfering with future commands
|
||||||
clearBuffer();
|
clearBuffer();
|
||||||
return chip.driver;
|
return chip.driver;
|
||||||
|
Loading…
Reference in New Issue
Block a user