Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
0e71022a
Commit
0e71022a
authored
Feb 07, 2022
by
Eric Duminil
Browse files
Repairing mqtt.h
parent
87e8b8e3
Changes
3
Show whitespace changes
Inline
Side-by-side
ampel-firmware/mqtt.cpp
View file @
0e71022a
#include "mqtt.h"
#include "config.h"
#include "util.h" // -> time.h
#include "led_effects.h"
#include "sensor_console.h"
#include "wifi_util.h"
#include "src/lib/PubSubClient/src/PubSubClient.h"
namespace
config
{
// Values should be defined in config.h
uint16_t
mqtt_sending_interval
=
MQTT_SENDING_INTERVAL
;
// [s]
...
...
ampel-firmware/mqtt.h
View file @
0e71022a
#ifndef MQTT_H_INCLUDED
#define MQTT_H_INCLUDED
#include <Arduino.h>
#include "config.h"
#include "led_effects.h"
#include "sensor_console.h"
#include "src/lib/PubSubClient/src/PubSubClient.h"
#include "wifi_util.h"
#include <stdint.h> // For uint32_t & uint16_t
#include <config.h>
#if !defined(MQTT_ENCRYPTED)
# define MQTT_ENCRYPTED true // Old config files might not define it, and encryption was on by default.
#endif
...
...
ampel-firmware/wifi_util.h
View file @
0e71022a
#ifndef WIFI_UTIL_H_INCLUDED
#define WIFI_UTIL_H_INCLUDED
#if defined(ESP8266)
# include <ESP8266WiFi.h>
#elif defined(ESP32)
# include <WiFi.h>
#endif
namespace
wifi
{
extern
char
local_ip
[];
void
connect
(
const
char
*
hostname
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment