2022-05-23 12:09:45 +02:00
|
|
|
|
|
|
|
#ifndef __CONSTANTS_H__
|
|
|
|
#define __CONSTANTS_H__
|
|
|
|
|
|
|
|
#define SENSOR_TEMPERATURE 0
|
|
|
|
#define SENSOR_HUMIDITY 1
|
|
|
|
#define SENSOR_LIGHT 2
|
|
|
|
#define SENSOR_WINDSPEED 3
|
|
|
|
#define SENSOR_PRESSURE 4
|
2023-02-18 16:58:03 +01:00
|
|
|
#define SENSOR_VOLTAGE 5
|
2022-05-23 12:09:45 +02:00
|
|
|
#define SENSOR_ESAVEMODE 6
|
|
|
|
#define SENSOR_BATCHARGESTATE 7
|
|
|
|
|
2022-08-28 13:47:10 +02:00
|
|
|
|
2022-05-23 12:09:45 +02:00
|
|
|
#define BAT_CHARGE_STATE_CHARGED 2.0
|
|
|
|
#define BAT_CHARGE_STATE_CHARGING 1.0
|
|
|
|
#define BAT_CHARGE_STATE_NOTCHARGING 0.0
|
|
|
|
#define ENERGY_SAVE_MODE_ENABLED 1.0
|
|
|
|
#define ENERGY_SAVE_MODE_DISABLED 0.0
|
|
|
|
|
2022-09-14 11:55:18 +02:00
|
|
|
#define FSM_STATE_1 0
|
|
|
|
#define FSM_STATE_2 1
|
|
|
|
#define FSM_STATE_3 2
|
|
|
|
#define FSM_STATE_4 3
|
|
|
|
#define FSM_STATE_5 4
|
|
|
|
#define FSM_STATE_6 5
|
|
|
|
#define FSM_STATE_7 6
|
|
|
|
#define FSM_STATE_8 7
|
|
|
|
#define FSM_STATE_9 8
|
|
|
|
#define FSM_STATE_10 9
|
|
|
|
#define FSM_STATE_11 10
|
|
|
|
#define FSM_STATE_12 11
|
2022-09-12 19:09:43 +02:00
|
|
|
|
2022-11-11 10:49:42 +01:00
|
|
|
const String hb_ws_msg_start = "{";
|
|
|
|
const String hb_ws_msg_temp = "\"temperature\": ";
|
|
|
|
const String hb_ws_msg_humi = "\"humidity\": ";
|
|
|
|
const String hb_ws_msg_light = "\"lightlevel\": ";
|
|
|
|
const String hb_ws_msg_windspeed = "\"windspeed\": ";
|
|
|
|
const String hb_ws_msg_pressure = "\"pressure\": ";
|
2023-02-18 16:58:03 +01:00
|
|
|
const String hb_ws_msg_voltage = "\"voltage\": ";
|
2022-11-11 10:49:42 +01:00
|
|
|
const String hb_ws_msg_timestamp = "\"timestamp\": ";
|
|
|
|
const String hb_ws_msg_valid = "\"valid\": ";
|
|
|
|
const String hb_ws_msg_end = "}";
|
|
|
|
|
2022-05-23 12:09:45 +02:00
|
|
|
#endif
|