Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:77a5b8bdd026, committed 2019-09-16
- Comitter:
- AustinKim
- Date:
- Mon Sep 16 07:12:05 2019 +0000
- Parent:
- 0:739a04e1daf4
- Child:
- 2:0307cf9b4dcb
- Commit message:
- Update project name
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Sep 11 07:34:38 2019 +0000
+++ b/main.cpp Mon Sep 16 07:12:05 2019 +0000
@@ -67,8 +67,8 @@
#define WM01_PARSER_DEBUG DEBUG_DISABLE
#define CATM1_DEVICE_DEBUG DEBUG_ENABLE
-char periodic_tau[] = "10100001"; // (60s * 1) + (3s ~ 4s) = 63s ~ 64s
-char active_time[] = "00000001"; // (2s * 1) + (24s ~ 27s) = 26s ~ 29s
+char periodic_tau[] = "10100101";
+char active_time[] = "00100100";
// Functions: Print information
void printInfo(void);
@@ -148,7 +148,7 @@
// ----------------------------------------------------------------
int main()
-{
+{
bool psm_en = false;
char time[30] = {0, };
float elapsed_time_sec = 0;
@@ -176,6 +176,7 @@
getNetworkStatus_WM01();
+
#if 0
// PSM disable
setPsmDeactivate_WM01();
@@ -348,10 +349,6 @@
ret = RET_OK;
}
- else
- {
- devlog("PSM activate : failed\r\n");
- }
return ret;
}
@@ -364,10 +361,6 @@
{
devlog("PSM deactivate : success\r\n");
}
- else
- {
- devlog("PSM deactivate : failed\r\n");
- }
return ret;
}
@@ -380,7 +373,7 @@
{
int8_t ret = RET_NOK;
- if(_parser->send("AT$$MSTIME?") && _parser->recv("$$MSTIME:%s\n", time) && _parser->recv("OK"))
+ if(_parser->send("AT$$MSTIME?") && _parser->recv("$$MSTIME:%*[^,],%s\n", time) && _parser->recv("OK"))
{
//devlog("Get current local time success\r\n");