Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
9f6604b1
Commit
9f6604b1
authored
Apr 21, 2021
by
Eric Duminil
Browse files
Headers refactor.
parent
e8460aba
Pipeline
#3143
passed with stage
in 1 minute and 48 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/ampel-firmware.h
View file @
9f6604b1
...
...
@@ -37,8 +37,4 @@
#include
"co2_sensor.h"
#include
"led_effects.h"
void
keepServicesAlive
();
void
checkFlashButton
();
void
checkSerialInput
();
#endif
ampel-firmware/ampel-firmware.ino
View file @
9f6604b1
...
...
@@ -122,6 +122,13 @@ void setup() {
#endif
}
/*****************************************************************
* Helper functions *
*****************************************************************/
void
keepServicesAlive
();
void
checkFlashButton
();
void
checkSerialInput
();
/*****************************************************************
* Main loop *
*****************************************************************/
...
...
ampel-firmware/mqtt.h
View file @
9f6604b1
...
...
@@ -7,9 +7,11 @@
#include
"sensor_console.h"
#include
"src/lib/PubSubClient/src/PubSubClient.h"
#include
"wifi_util.h"
namespace
config
{
extern
uint16_t
mqtt_sending_interval
;
// [s]
}
namespace
mqtt
{
extern
char
last_successful_publish
[];
extern
bool
connected
;
...
...
ampel-firmware/sensor_console.h
View file @
9f6604b1
...
...
@@ -8,10 +8,11 @@
*/
namespace
sensor_console
{
void
defineCommand
(
const
char
*
command
,
void
(
*
function
)(
void
),
const
__FlashStringHelper
*
ifsh
);
void
defineIntCommand
(
const
char
*
command
,
void
(
*
function
)(
int32_t
),
const
__FlashStringHelper
*
ifsh
);
void
processSerialInput
(
const
byte
in_byte
);
void
runCommand
(
const
char
*
command
);
void
defineIntCommand
(
const
char
*
command
,
void
(
*
function
)(
int32_t
),
const
__FlashStringHelper
*
ifsh
);
void
defineCommand
(
const
char
*
command
,
void
(
*
function
)(
void
),
const
__FlashStringHelper
*
ifsh
);
}
#endif
ampel-firmware/util.h
View file @
9f6604b1
...
...
@@ -42,8 +42,9 @@ public:
Ampel
();
};
extern
Ampel
ampel
;
//NOTE: Only use seconds() for duration comparison, not timestamps comparison. Otherwise, problems happen when millis roll over.
#define seconds() (millis() / 1000UL)
extern
Ampel
ampel
;
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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