From 8aaa1b76a6bc7e4ee0b7728ae3f5f643604fe9f8 Mon Sep 17 00:00:00 2001 From: Bogdan Marinescu Date: Mon, 21 Oct 2013 14:21:42 +0300 Subject: [PATCH] Added auto synchronization for the u-blox GSM modem test Also changed the test to look more like the original VodafoneUSBModem SMS test (added another thread). --- .../tests/net/cellular/sms/ubloxusbgsm/main.cpp | 16 +++++++++++++++- workspace_tools/synch.py | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/libraries/tests/net/cellular/sms/ubloxusbgsm/main.cpp b/libraries/tests/net/cellular/sms/ubloxusbgsm/main.cpp index 4a15d11ef6..7887ef3d96 100644 --- a/libraries/tests/net/cellular/sms/ubloxusbgsm/main.cpp +++ b/libraries/tests/net/cellular/sms/ubloxusbgsm/main.cpp @@ -1,10 +1,24 @@ #include "UBloxUSBGSMModem.h" #include "smstest.h" -int main() +void test(const void* data) { UbloxUSBGSMModem modem; smstest(modem); + while (true); +} + +int main() +{ + Thread testTask(test, NULL, osPriorityNormal, 1024 * 4); + DigitalOut led(LED1); + + while (true) + { + led = !led; + Thread::wait(1000); + } + return 0; } diff --git a/workspace_tools/synch.py b/workspace_tools/synch.py index dcfa0b3473..9dc1f7313c 100644 --- a/workspace_tools/synch.py +++ b/workspace_tools/synch.py @@ -63,6 +63,7 @@ OFFICIAL_CODE = ( ("CellularUSBModem", "net/cellular/CellularUSBModem"), ("UbloxUSBModem", "net/cellular/UbloxUSBModem"), ("UbloxModemHTTPClientTest", ["tests/net/cellular/http/common", "tests/net/cellular/http/ubloxusbgsm"]), + ("UbloxModemSMSTest", ["tests/net/cellular/sms/common", "tests/net/cellular/sms/ubloxusbgsm"]), )