Skip to content

Commit

Permalink
Fixing issues with datamap
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenSt committed Nov 3, 2021
1 parent 7ba36c0 commit 381ff38
Show file tree
Hide file tree
Showing 17 changed files with 132 additions and 112 deletions.
4 changes: 2 additions & 2 deletions amgpelletstove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ static String amgtempcmd = "";
static uint8_t amgcmdnr = 0;
static bool cooldown_phase_1 = false;

void(*_amgpelletstove_callback)(char *, String);
void(*_amgpelletstove_callback)(const char *, String);

void amgpelletstove_init(void(*callback)(char *, String))
void amgpelletstove_init(void(*callback)(const char *, String))
{
_amgpelletstove_callback = callback;
Serial.setDebugOutput(false);
Expand Down
2 changes: 1 addition & 1 deletion amgpelletstove.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@


void amgpelletstove_receivemqtt(String topicstring, String payloadstring);
void amgpelletstove_init(void(*callback)(char *,String));
void amgpelletstove_init(void(*callback)(const char *,String));
void amgpelletstove_handle();
4 changes: 2 additions & 2 deletions bht002.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bool bht002_preventdeviceoff = true;
bool bht002_wificonnected = false;
bool bht002_initready = false;

void(*_bht002_callback)(char *, String);
void(*_bht002_callback)(const char *, String);

void bht002_commandCharsToSerial(unsigned int length, unsigned char* command)
{
Expand Down Expand Up @@ -66,7 +66,7 @@ void bht002_sendtime()
bht002_commandCharsToSerial(14, cancelConfigCommand);
}

void bht002_init(void(*callback)(char *, String))
void bht002_init(void(*callback)(const char *, String))
{
Serial.begin(9600, SERIAL_8N1);
Serial.setRxBufferSize(200);
Expand Down
2 changes: 1 addition & 1 deletion bht002.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
void bht002_init(void(*callback)(char *,String));
void bht002_init(void(*callback)(const char *,String));
void bht002_connected();
void bht002_disconnected();
void bht002_handle();
Expand Down
4 changes: 2 additions & 2 deletions ducobox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static String _serialsendqueue = "";
static unsigned long _nextupdatetime = 0;
static bool recvok = 1;

void(*_ducobox_callback)(char *, String);
void(*_ducobox_callback)(const char *, String);

void _ducobox_writeserialqueue()
// The ducobox can't handle serial data at full speed, so send char followed by a pause before next char
Expand Down Expand Up @@ -275,7 +275,7 @@ void ducobox_handle()
}
}

void ducobox_init(uint8_t ducobox_relay0, uint8_t ducobox_relay1, uint8_t ducobox_refreshtime, void(*callback)(char *, String))
void ducobox_init(uint8_t ducobox_relay0, uint8_t ducobox_relay1, uint8_t ducobox_refreshtime, void(*callback)(const char *, String))
{
_ducobox_callback = callback;
_ducobox_relay0 = ducobox_relay0;
Expand Down
2 changes: 1 addition & 1 deletion ducobox.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
void ducobox_init(uint8_t ducobox_relay0, uint8_t ducobox_relay1, uint8_t ducobox_refreshtime, void(*callback)(char * ,String));
void ducobox_init(uint8_t ducobox_relay0, uint8_t ducobox_relay1, uint8_t ducobox_refreshtime, void(*callback)(const char * ,String));
void ducobox_setfan(uint8_t value);
void ducobox_handle();
Loading

0 comments on commit 381ff38

Please sign in to comment.