Implemented (partially) Voronoi algorithm for zone-dividing in Seville map. Also refactored some things in frontend. Modified hardware firmware for conditional compilation for both SENSOR and ACTUATOR type boards.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include <WiFi.h>
|
||||
#include <PubSubClient.h>
|
||||
|
||||
#define SSID "iPhone de Álvaro"
|
||||
#define WIFI_PASSWORD "alvarito123"
|
||||
#define SSID "DIGIFIBRA-D2ys"
|
||||
#define WIFI_PASSWORD "4EEATsyTcZ"
|
||||
|
||||
int setupWifi();
|
||||
int WiFi_Init();
|
||||
@@ -10,7 +10,13 @@
|
||||
#define GPS_ID 1
|
||||
#define MAX7219_ID 1
|
||||
|
||||
#define ECO "Solo vehiculos electricos/hibridos"
|
||||
#define ALL "Todo tipo de vehiculos"
|
||||
|
||||
#define DEBUG
|
||||
|
||||
#define SENSOR 0
|
||||
#define ACTUATOR 1
|
||||
|
||||
extern const uint32_t DEVICE_ID;
|
||||
extern const int GROUP_ID;
|
||||
@@ -1,14 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "globals.hpp"
|
||||
|
||||
#define DEVICE_ROLE SENSOR // se cambia entre SENSOR y ACTUATOR
|
||||
|
||||
#if DEVICE_ROLE == SENSOR
|
||||
#warning "Compilando firmware para SENSOR"
|
||||
#elif DEVICE_ROLE == ACTUATOR
|
||||
#warning "Compilando firmware para ACTUATOR"
|
||||
#else
|
||||
#warning "DEVICE_ROLE no definido correctamente"
|
||||
#endif
|
||||
|
||||
#include "JsonTools.hpp"
|
||||
#include "RestClient.hpp"
|
||||
#include "WifiConnection.hpp"
|
||||
#include "MqttClient.hpp"
|
||||
#if DEVICE_ROLE == SENSOR
|
||||
#include "BME280.hpp"
|
||||
#include "GPS.hpp"
|
||||
#include "MAX7219.hpp"
|
||||
#include "MQ7v2.hpp"
|
||||
#endif
|
||||
#if DEVICE_ROLE == ACTUATOR
|
||||
#include "MAX7219.hpp"
|
||||
#endif
|
||||
|
||||
struct TaskTimer
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user