Commit c2a91f76d31be79baa08197582190ad61d63bfea

Authored by Imanol-Mikel Barba Sabariego
1 parent 6ec7a46d

--no commit message

Too many changes to show.

To preserve performance only 11 of 12 files are displayed.

Project/applications/smartcities/include/adc.h
... ... @@ -7,8 +7,8 @@
7 7 #include "stm32f10x_gpio.h"
8 8 #include "stm32f10x_adc.h"
9 9  
10   -#define DBG_ADC(fmt,...) printf("%c[1;35madc.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
11   -//#define DBG_ADC(fmt,...) printf("")
  10 +//#define DBG_ADC(fmt,...) printf("%c[1;35madc.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
  11 +#define DBG_ADC(fmt,...) printf("")
12 12  
13 13 #define ADCbatt_MIN_VALUE (0)
14 14 #define ADCbatt_MAX_VALUE (0xfff)
... ...
Project/applications/smartcities/include/buffer.h
... ... @@ -10,8 +10,8 @@
10 10 #define SOFT_REACHED 1
11 11 #define HARD_REACHED 2
12 12  
13   -#define DBG_BUFFER(fmt,...) printf("%c[1;35mbuffer.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
14   -//#define DBG_BUFFER(fmt,...) printf("")
  13 +//#define DBG_BUFFER(fmt,...) printf("%c[1;35mbuffer.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
  14 +#define DBG_BUFFER(fmt,...) printf("")
15 15  
16 16 char** put_message(char* info, char** buf,uint32_t *index, uint32_t *buf_len);
17 17 int check_memory(void);
... ...
Project/applications/smartcities/include/callbacks.h
... ... @@ -20,8 +20,8 @@ void softapMode_clientIndicationCb(wismart_softap_cb_t reason, const uint8_t *ma
20 20 void softapMode_apStartedCb(int result);
21 21 void printWifiInfo(uint8_t wifiMode);
22 22  
23   -#define DBG_CALLBACKS(fmt,...) printf("%c[1;35mcallbacks.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
24   -//#define DBG_CALLBACKS(fmt,...) printf("")
  23 +//#define DBG_CALLBACKS(fmt,...) printf("%c[1;35mcallbacks.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
  24 +#define DBG_CALLBACKS(fmt,...) printf("")
25 25  
26 26 extern uint8_t connected;
27 27 extern uint8_t timeout;
... ...
Project/applications/smartcities/include/configServer.h
... ... @@ -10,11 +10,11 @@
10 10 #include "ch.h"
11 11 #include "fsdata.c"
12 12  
13   -#define CONFIG_SERVER_DBG(fmt,...) printf("%c[1;35mconfigServer.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
14   -#define CONFIG_SERVER_DBG_WARNING(fmt,...) printf("%c[1;35mconfigServer.c:%c[1;33m[WARNING] "fmt"%c[1;00m",0x1B,0x1B,0x1B, ##__VA_ARGS__)
  13 +//#define CONFIG_SERVER_DBG(fmt,...) printf("%c[1;35mconfigServer.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
  14 +//#define CONFIG_SERVER_DBG_WARNING(fmt,...) printf("%c[1;35mconfigServer.c:%c[1;33m[WARNING] "fmt"%c[1;00m",0x1B,0x1B,0x1B, ##__VA_ARGS__)
15 15  
16   -//#define CONFIG_SERVER_DBG(fmt,...) printf("")
17   -//#define CONFIG_SERVER_DBG_WARNING(fmt,...) printf("")
  16 +#define CONFIG_SERVER_DBG(fmt,...) printf("")
  17 +#define CONFIG_SERVER_DBG_WARNING(fmt,...) printf("")
18 18  
19 19 void configServer_start(uint8_t enableApScan);
20 20 void configServer_connect(void);
... ...
Project/applications/smartcities/include/globals.h
... ... @@ -16,3 +16,6 @@
16 16  
17 17 #define SERVER_LEWIS
18 18 #endif
  19 +
  20 +// printf("%c[1;31m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,p,0x1B);
  21 +// printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,size,(hp),0x1B);
... ...
Project/applications/smartcities/include/httpClient.h
... ... @@ -19,8 +19,8 @@
19 19 #define ENDL "\r\n"
20 20 #define CONTENT_TYPE_HEADER "Content-Type: application/json; charset=UTF-8"
21 21  
22   -#define DBG_HTTP(fmt,...) printf("%c[1;35mhttpClient.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
23   -//#define DBG_HTTP(fmt,...) printf("")
  22 +//#define DBG_HTTP(fmt,...) printf("%c[1;35mhttpClient.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
  23 +#define DBG_HTTP(fmt,...) printf("")
24 24  
25 25  
26 26 typedef enum reqMethod
... ...
Project/applications/smartcities/include/i2c.h
... ... @@ -9,8 +9,8 @@
9 9  
10 10 #define I2C_TIMEOUT 100
11 11  
12   -#define DBG_I2C(fmt,...) printf("%c[1;35mi2c.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
13   -//#define DBG_I2C(fmt,...) printf("")
  12 +//#define DBG_I2C(fmt,...) printf("%c[1;35mi2c.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
  13 +#define DBG_I2C(fmt,...) printf("")
14 14  
15 15  
16 16 void I2C_init(void);
... ...
Project/applications/smartcities/include/json.h
... ... @@ -18,8 +18,8 @@
18 18 #define JOIN_NO_FREE 0
19 19 #define JOIN_FREE_MEM 1
20 20  
21   -#define DBG_JSON(fmt,...) printf("%c[1;35mjson.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
22   -//#define DBG_JSON(fmt,...) printf("")
  21 +//#define DBG_JSON(fmt,...) printf("%c[1;35mjson.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
  22 +#define DBG_JSON(fmt,...) printf("")
23 23  
24 24 uint8_t register_sensor(sensor sens);
25 25 char* prepare_json_observation_statement(char** data, uint32_t nObservations);
... ...
Project/applications/smartcities/include/ntp.h
... ... @@ -18,8 +18,8 @@
18 18 #include "ch.h"
19 19 #include "globals.h"
20 20  
21   -#define DBG_NTP(fmt,...) printf("%c[1;35mntp.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
22   -//#define DBG_NTP(fmt,...) printf("")
  21 +//#define DBG_NTP(fmt,...) printf("%c[1;35mntp.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
  22 +#define DBG_NTP(fmt,...) printf("")
23 23  
24 24 #define LEAP_YEAR(Y) (((1970+Y)>0) && !((1970+Y)%4) && (((1970+Y)%100) || !((1970+Y)%400)))
25 25 #define NTP_PACKET_LENGTH 48
... ...
Project/applications/smartcities/include/sensors.h
... ... @@ -12,15 +12,15 @@
12 12 #define DISTANCE_ADDR 0x01
13 13 #define PRESSURE_ADDR 0x77
14 14 #define HUMIDITY_TEMP_ADDR 0x27
15   -#define SOUND_ADDR 0x72
  15 +#define SOUND_ADDR 0x48
16 16 #define TOTAL_SENSORS 5
17 17 //REMEMBER TO UPDATE collectData ROUTINE WITH EACH NEW SENSOR!!!!
18 18 //REMEMBER TO UPDATE I2C sensors in sensor definitions in this header and sensors.c WITH EACH NEW SENSOR!!!!
19 19  
20 20 #define BATTERY_ADDR 0x00 //SIEMPRE PRESENTE, NUNCA BUSCAR EN i2c_scan
21 21  
22   -#define DBG_SENSORS(fmt,...) printf("%c[1;35msensors.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
23   -//#define DBG_SENSORS(fmt,...) printf("")
  22 +//#define DBG_SENSORS(fmt,...) printf("%c[1;35msensors.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
  23 +#define DBG_SENSORS(fmt,...) printf("")
24 24  
25 25 typedef struct {
26 26 uint8_t ID;
... ...
Project/applications/smartcities/include/timer-loop.h
... ... @@ -11,8 +11,8 @@
11 11 #define LONG_PERIOD 60*3 //60*3 // for testing
12 12 #define SHORT_PERIOD 60*1 //60*1 // for testing
13 13  
14   -#define DBG_TIMER(fmt,...) printf("%c[1;35mtimer-loop.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
15   -//#define DBG_TIMER(fmt,...) printf("")
  14 +//#define DBG_TIMER(fmt,...) printf("%c[1;35mtimer-loop.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__)
  15 +#define DBG_TIMER(fmt,...) printf("")
16 16  
17 17 unsigned long getSystemTime(void);
18 18  
... ...