Skip to content

Commit

Permalink
Merge branch 'hotfix/v0.6.6-alpha'
Browse files Browse the repository at this point in the history
  • Loading branch information
frdteknikelektro committed Jun 13, 2017
2 parents e06c64d + 0aa653c commit 8ab9b96
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions GSMLOC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ bool GSMLOC::atGSMLocationAndTime(unsigned char type, unsigned char cid) {
char *pointer = strstr_P(dte->getResponse(), (const char *)response) + strlen_P((const char *)response);
char *str = strtok(pointer, ",");
for (size_t i = 0; i < 5 && str != NULL; i++) {
if (i == 0) locationTime.locationCode = str[0] - '0';
if (i == 0) {
locationTime.locationCode = (unsigned int)atol(str);
if (locationTime.locationCode != 0) break;
}
if (type == 1 && i < 3) {
if (i == 1) strcpy(locationTime.longitude, str);
if (i == 2) strcpy(locationTime.latitude, str);
Expand All @@ -41,7 +44,7 @@ struct LocationTime GSMLOC::getLocationTime(unsigned char cid) {
if (strlen(locationTime.longitude) > 0) return locationTime;
if (ip->getConnectionStatus(cid).status == 1) {
if (!atGSMLocationAndTime(1, cid)) return (struct LocationTime){0, "", "", "", ""};
if (locationTime.locationCode == 603) {
if (locationTime.locationCode != 0) {
if (!atGSMLocationAndTime(1, cid)) return (struct LocationTime){0, "", "", "", ""};
}
}
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"type": "git",
"url": "https://github.com/Atnic/GSM-library.git"
},
"version": "0.6.5-alpha",
"version": "0.6.6-alpha",
"license": "MIT",
"frameworks": ["arduino"],
"platforms": ["atmelavr"]
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=GSM Library
version=0.6.5-alpha
version=0.6.6-alpha
author=Farid Inawan
maintainer=Farid Inawan <[email protected]>
sentence=Library for GSM module
Expand Down

0 comments on commit 8ab9b96

Please sign in to comment.