Skip to main content

2120

#ifndef _VARIAVEIS_H
_ENV_H
#define _VARIAVEIS_H
_ENV_H

#include
#define NETWORK_CLIENT "GSC"     //nome da rede wifi do cliente 

#define PASSW " "<stdint.h> // networkDefinir passwordníveis de log #define LOG_LEVEL_NONE 0 //senha Sem logs #define LOG_LEVEL_ERROR 1 // Apenas erros #define LOG_LEVEL_WARN 2 // Avisos e erros #define LOG_LEVEL_INFO 3 // Informações, avisos e erros #define LOG_LEVEL_DEBUG 4 // Mensagens de debug, informações, avisos e erros // Definir qual o nível de log ativo #define CURRENT_LOG_LEVEL LOG_LEVEL_ERROR // Funções de log condicional com base no nível #define LOG_LEVEL_ERROR 1 #define LOG_LEVEL_WARN 2 #define LOG_LEVEL_INFO 3 #define LOG_LEVEL_DEBUG 4 // Defina o nível de log atual #define CURRENT_LOG_LEVEL LOG_LEVEL_DEBUG // Macros de log condicional com suporte para mensagens simples e formatadas #if CURRENT_LOG_LEVEL >= LOG_LEVEL_ERROR #define LOG_ERROR(fmt, ...) \ do wifi\ di{ cliente\
Serial.printf("[ERROR]

"
fmt "\n", ##__VA_ARGS__); \ Serial.flush(); \ } while (0) #else #define LOG_ERROR(fmt, ...) #endif #if CURRENT_LOG_LEVEL >= LOG_LEVEL_WARN #define LOG_WARN(fmt, ...) \ do \ { \ Serial.printf("[WARN] " fmt "\n", ##__VA_ARGS__); \ Serial.flush(); \ } while (0) #else #define LOG_WARN(fmt, ...) #endif #if CURRENT_LOG_LEVEL >= LOG_LEVEL_INFO #define LOG_INFO(fmt, ...) \ do \ { \ Serial.printf("[INFO] " fmt "\n", ##__VA_ARGS__); \ Serial.flush(); \ } while (0) #else #define LOG_INFO(fmt, ...) #endif #if CURRENT_LOG_LEVEL >= LOG_LEVEL_DEBUG #define LOG_DEBUG(fmt, ...) \ do \ { \ Serial.printf("[DEBUG] " fmt "\n", ##__VA_ARGS__); \ Serial.flush(); \ } while (0) #else #define LOG_DEBUG(fmt, ...) #endif // WiFi Network Credentials constexpr char NETWORK_CLIENT[] = "GSC"; constexpr char PASSW[] = "#2021alta!"; #define MDASH_APP_NAME "Sede_2120" SEDE_2120" //nome de usuario do madash para esse equipamento

#define DEVICE_PASSWORD "Procurar no mdash" aOmyn290Dz1SMlXk499qX4aw" //senha do mdash
constexpr

uint32_t
#defineDELAY_MS_READER_TASK VOLT_CAL=  52300; //calibracao300ms dopara sensorque os envios sejam feitos a cada 20s // Define o atraso em milissegundos para tarefas de tensaoleitura
(10.000

parece
#defineser CURRENT_CALum 6.15número mágico) //calibracao doEquipment sensorIdentifiers denamespace corrente
Equipment

{
#defineconstexpr PIN_CURRENTchar TAG[] 39 //pino para a leitura de corrente  PIN_CURRENT

#define PIN_TEMPE   14  //pino para a leitura temperatura  

#define PIN_VOLTAGE  34 //pino para a leitura da tensao  

#define EQUIPAMENT_TAG= "2120"; constexpr //tagchar doTOPIC[] equipamento, deve ser fornecido pelo spo  

#define EQUIPAMENT_TOPIC= "v4/matr0026"; constexpr char SENDING_SERVER[] = "web.smartvac.app"; constexpr uint16_t SENDING_PORT = 1883; constexpr unsigned long SENDING_VELOCITY = 115200; constexpr uint16_t SENDING_KEEPALIVE = 200; constexpr uint32_t DELAY_MS = 500; //topico deDelay envio,time fornecidoin pelomilliseconds spofor
tasks

}
#define// INS_SENSORVoltage Calibration Constants struct VoltageCalibration { static constexpr float CAL_R = 52; static constexpr float CAL_S = 84.7; static constexpr float CAL_TT = 82.3; }; // Current Calibration Constants struct CurrentCalibration { static constexpr int CAL_R = 6.15; static constexpr int CAL_S = 13.75; static constexpr int CAL_TT = 15.9; }; // Pin Definitions struct Pins { static constexpr int CURRENT_R = 39; static constexpr int CURRENT_S = 35; static constexpr int CURRENT_TT = 33; static constexpr int TEMPERATURE = 14; static constexpr int VOLTAGE_R = 34; static constexpr int VOLTAGE_S = 36; static constexpr int VOLTAGE_TT = 32; }; // Sensor Addresses namespace Sensors { constexpr char INS[] = "s572"; constexpr //enderecochar sensorRET[] de insuflamento  

#define RET_SENSOR= "s571"; constexpr //enderecochar sensorSUC[] de retorno   

#define SUC_SENSOR= "s597"; constexpr //enderecochar sensorLL[] de sucção  

#define LL_SENSOR= "s573"; constexpr //enderecochar sensorENT_CONDES[] de linha de liquido  

#define EXT_SENSOR= "s598"; constexpr char SAD_CONDES[] = "xxxxx";//endereco sensoressa detemp externanão
ta

sendo
#defineenviada, VOLT_SENSORignorar ela ou adicionar nos envios se necessario constexpr char VOLT_R[] = "s574"; //enderecoconstexpr sensorchar deVOLT_S[] tensao=
"xxxx";

constexpr
#definechar CURR_SENSORVOLT_TT[] = "xxxx"; constexpr char CURR_R[] = "s575"; //enderecoconstexpr sensorchar deCURR_S[] corrente=
"xxx";

constexpr
char CURR_TT[] = "xxx"; constexpr char BAT_INS[] = "XXX"; constexpr char BAT_RET[] = "XXX"; constexpr char BAT_SUC[] = "XXX"; constexpr char BAT_LL[] = "XXX"; constexpr char VIBR_X_SUC[] = "XXX"; constexpr char VIBR_Y_SUC[] = "XXX"; constexpr char VIBR_Z_SUC[] = "XXX"; } #define SENS_TEMP_RETTEMP_RET {0x28, 0x75, 0xF7, 0x95, 0xF0, 0xFF, 0x3C, 0xEB}  //endereço para a leitura do sensorr de temperatura de retorno

#define SENS_TEMP_INSUTEMP_INSU {0x28, 0x49, 0x37, 0x95, 0xF0, 0x01, 0x3C, 0x1C} //endereço para a leitura do r de temperatura de insuflamento #define TEMP_EXT {0x28, 0xEE, 0xD8, 0x95, 0xF0, 0x01, 0x3C, 0x70} //endereço para a leitura do sensorr de temperatura de insuflamentoexterna

#define SENS_TEMP_LLTEMP_LL {0x28, 0xCF, 0x11, 0x95, 0xF0, 0x01, 0x3C, 0x20}  //endereço para a leitura do sensor de temperatura de linha de liquido  

#define SENS_TEMP_SUCTEMP_SUC {0x28, 0xD7, 0x4F, 0x95, 0xF0, 0x01, 0x3C, 0xED}  //endereço para a leitura do sensor de temperatura de sucção
#endif

#define SENS_TEMP_EXT {0x28, 0xEE, 0xD8, 0x95, 0xF0, 0x01, 0x3C, 0x70}  //endereço para a leitura do sensor de temperatura de externa  

#define SENS_TEMP_BLE_INS "c8:35:9a:7c:4a:a1"

#define SENS_TEMP_BLE_RET "c9:27:67:3d:19:18"

#endif