![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Bmag incl gps rettelse
Dependencies: mbed WDT MODSERIAL BME280
Diff: BMAG/BMAG.cpp
- Revision:
- 21:325cb82f1838
- Parent:
- 14:400ecb93c6a2
- Child:
- 28:ed0d29f63b55
diff -r 73fa202c73db -r 325cb82f1838 BMAG/BMAG.cpp --- a/BMAG/BMAG.cpp Wed May 10 14:33:20 2017 +0000 +++ b/BMAG/BMAG.cpp Thu May 11 13:42:32 2017 +0000 @@ -119,6 +119,8 @@ char count = 0; string tmpStr = ""; + string result = ""; + tmpStr.resize(40); char indexcnt = 0; @@ -138,7 +140,13 @@ } } - return tmpStr; + for(int i = 0; i < tmpStr.size(); i++){ + if(tmpStr[i] != ' ' && tmpStr[i] != '\n' && tmpStr[i] != '\r'){ + result += tmpStr[i]; + } + } + + return result; };