Ajustes en includes y parametros por defecto
parent
006838ccd0
commit
1d6a3b24bf
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
//librerias externas--------------------
|
//librerias externas--------------------
|
||||||
#include <avr/power.h>
|
#include <avr/power.h>
|
||||||
#include <SD.h>
|
//#include <SD.h>
|
||||||
|
|
||||||
#include "stdio.h"
|
#include "stdio.h"
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include <SD.h>
|
|
||||||
#include "ArchivoSD.h"
|
#include "ArchivoSD.h"
|
||||||
|
|
||||||
const char * colNames[] = {"Milis", "TempExt", "Hum", "TempInt", "Alt", "Pres", "AcelX", "AcelY", "AcelZ", "MagX", "MagY", "MagZ", "gpsVal", "nSatelites", "PDOP", "HDOP", "VDOP" , "Fecha", "lat", "lon", "Alt(GPS)", "Direccion", "Velocidad" };
|
const char * colNames[] = {"Milis", "TempExt", "Hum", "TempInt", "Alt", "Pres", "AcelX", "AcelY", "AcelZ", "MagX", "MagY", "MagZ", "gpsVal", "nSatelites", "PDOP", "HDOP", "VDOP" , "Fecha", "lat", "lon", "Alt(GPS)", "Direccion", "Velocidad" };
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
#ifndef ArchivoSD_define
|
#ifndef ArchivoSD_define
|
||||||
#define ArchivoSD_define 1
|
#define ArchivoSD_define 1
|
||||||
|
#include <SD.h>
|
||||||
#include "utiles.h"
|
#include "utiles.h"
|
||||||
|
|
||||||
#define TIMER_SMS_DATA 60000//cada 1 min
|
#define TIMER_SMS_DATA 60000//cada 1 min
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#include <SD.h>
|
|
||||||
#include "ArchivoSD.h"
|
#include "ArchivoSD.h"
|
||||||
#include "Sim808Manager.h"
|
#include "Sim808Manager.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -236,13 +236,13 @@ char* Sim808Manager::recibe()
|
||||||
return buff;
|
return buff;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sim808Manager::envia(char* dat)
|
void Sim808Manager::envia(const char* dat)
|
||||||
{
|
{
|
||||||
pSeria->println(dat);
|
pSeria->println(dat);
|
||||||
//Utiles::printCOM(dat);
|
//Utiles::printCOM(dat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sim808Manager::enviaSolo(char* dat, int ndata)
|
void Sim808Manager::enviaSolo(const char* dat, int ndata)
|
||||||
{
|
{
|
||||||
for ( int i = 0; i < ndata; i++)
|
for ( int i = 0; i < ndata; i++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class Sim808Manager
|
||||||
public:
|
public:
|
||||||
Sim808Manager();
|
Sim808Manager();
|
||||||
|
|
||||||
bool inicia(HardwareSerial *mySerial, int powerKey = -1, int baud=0);
|
bool inicia(HardwareSerial *mySerial, int powerKey, int baud);//int powerKey = -1, int baud=0
|
||||||
|
|
||||||
bool EnviaSMS(char* tlf, char *sms);
|
bool EnviaSMS(char* tlf, char *sms);
|
||||||
|
|
||||||
|
|
@ -63,7 +63,7 @@ class Sim808Manager
|
||||||
DataGPSSimManager* GetGPS();
|
DataGPSSimManager* GetGPS();
|
||||||
|
|
||||||
//envio de datos
|
//envio de datos
|
||||||
bool IniciaNetwork(const char* apn = 0, const char* userName = 0, const char* passWord = 0);
|
bool IniciaNetwork(const char* apn, const char* userName , const char* passWord);
|
||||||
bool connect(ProtocolSimManager ptl, const char* host, int port);
|
bool connect(ProtocolSimManager ptl, const char* host, int port);
|
||||||
bool send(char* str, int len);
|
bool send(char* str, int len);
|
||||||
char* recibeDatos();
|
char* recibeDatos();
|
||||||
|
|
@ -78,8 +78,8 @@ class Sim808Manager
|
||||||
bool iniciaSIM();
|
bool iniciaSIM();
|
||||||
|
|
||||||
char* recibe();
|
char* recibe();
|
||||||
void envia(char* dat);
|
void envia(const char* dat);
|
||||||
void enviaSolo(char* dat, int ndata);
|
void enviaSolo(const char* dat, int ndata);
|
||||||
bool CheckAt();
|
bool CheckAt();
|
||||||
void enciende();
|
void enciende();
|
||||||
bool reciveOK();
|
bool reciveOK();
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ class StatusManager
|
||||||
int ledGPS;
|
int ledGPS;
|
||||||
int ledSMS;
|
int ledSMS;
|
||||||
public:
|
public:
|
||||||
StatusManager(int pinLedSD = -1, int pinLedGPS = -1, int pinLedSMS = -1);
|
StatusManager(int pinLedSD , int pinLedGPS, int pinLedSMS);
|
||||||
void EmpiezaInicio();
|
void EmpiezaInicio();
|
||||||
void FinInicio();
|
void FinInicio();
|
||||||
void SetStatusSD(bool ok);
|
void SetStatusSD(bool ok);
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,13 @@ bool Utiles::isTime( unsigned long *tt, unsigned long timer)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Utiles::printCOM(char *line)
|
void Utiles::printCOM(const char *line)
|
||||||
{
|
{
|
||||||
if(UtilesDebug)
|
if(UtilesDebug)
|
||||||
Serial.println(line);
|
Serial.println(line);
|
||||||
|
|
||||||
}
|
}
|
||||||
void Utiles::printCOM2(char *line)
|
void Utiles::printCOM2(const char *line)
|
||||||
{
|
{
|
||||||
if(UtilesDebug)
|
if(UtilesDebug)
|
||||||
Serial.print(line);
|
Serial.print(line);
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ class Utiles
|
||||||
/*
|
/*
|
||||||
Para imprimir por el puerto COM si esta en modo DEBUG
|
Para imprimir por el puerto COM si esta en modo DEBUG
|
||||||
*/
|
*/
|
||||||
static void printCOM(char *line);
|
static void printCOM(const char *line);
|
||||||
static void printCOM2(char *line);
|
static void printCOM2(const char *line);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue