WiP: Fine-tuning gsm modem init procedure part3

This commit is contained in:
Mateusz committed 2019-08-06 10:22:29 +02:00
1 parent 210fdf0ec9
commit 11240bf9ee
6 files changed
+76 -31

No files matched your search

+6
View File
@@ -109,6 +109,7 @@ int ATParser::ProcessNewData() {
// 4) +QIND: SMS DONE
// 5) +QIND: PB DONE
if (urcs.size() == 5) {
cpp_freertos::LockGuard lock(mutex);
mux->callback(NotificationType ::PowerUpProcedureComplete,"");
responseBuffer.erase();
urcs.clear();
@@ -121,6 +122,11 @@ int ATParser::ProcessNewData() {
std::vector<std::string> ATParser::SendCommand(const char *cmd, size_t rxCount, uint32_t timeout) {
std::vector<std::string> tokens;
{
cpp_freertos::LockGuard lock(mutex);
responseBuffer.erase();
}
blockedTaskHandle = xTaskGetCurrentTaskHandle();
auto cmdSigned = const_cast<char *>(cmd);
inOutSerialWorker->WriteData(reinterpret_cast<unsigned char *>(cmdSigned), strlen(cmd));