Sigfox Communication library, allowing you to use any kind of UART able Sigfox Transmitter

Dependencies:   SoftSerial

Dependents:   RUCHE2-CODES RUCHE2-CODES_correctionpoids RUCHE2-CODES

Revision:
2:975b82a3cde0
Parent:
1:39a0558a3a3a
Child:
3:7625fe7cd1b6
--- a/sigfox.cpp	Fri Mar 11 08:38:19 2016 +0000
+++ b/sigfox.cpp	Sat Mar 12 16:00:57 2016 +0000
@@ -2,46 +2,13 @@
 #include "millis.h"
 #include "sigfox.h"
 
-/* sigfox library
- *
- * Copyright (c) Adrien Chapelet for IoTech.fr
- * Apache 2 license
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- * 
- */
- 
- /*
-    This library allows you to use any kind of Sigfox Transmitter, all you have to do is configure pins and baudrate, and check syntax is conform to your datasheet.
- */
- 
-//---------------------------------------------------------------------------------------------//
-//Constructors
+Sigfox_ Sigfox;
+
 Sigfox_::Sigfox_()  {
     Serial device(PIN_RX, PIN_TX);
     _lastSend=-1;
 }
-/*Sigfox_::Sigfox_(PinMode TX, PinMode RX)  {
-    Serial device(p8, p7); 
-}*/
 
-//Functions
 uint8_t Sigfox_::_nextReturn() {
     Serial device(PIN_RX, PIN_TX);     
     char fstChar = device.getc();
@@ -77,23 +44,6 @@
 
     //return _nextReturn() == OK;
     return true;
-/*
-    device.putc((uint8_t)'A');
-    device.putc((uint8_t)'T');
-
-    uint8_t response[8] = {0};
-    uint8_t i = 0;
-    //while(!device.available());
-    while(device.peek() != ';') {
-        response[i] = device.read();
-        while(!device.available());
-        ++i;
-    }
-    response[0]=device.getc(); //'K'
-    response[1]=device.getc(); //'O'
-    response[2]=device.getc(); //';'
-    if ((response[0]=='O') && (response[1]=='K'))
-        return OK;*/
 }
  
 bool Sigfox_::send(const void* data, uint8_t len) {