Skip to content

Commit

Permalink
Merge pull request #30 from Company-of-Things/dependencies
Browse files Browse the repository at this point in the history
Dependency list and easier debug access
  • Loading branch information
Bissas authored Jan 24, 2025
2 parents 57a3eb4 + 7582555 commit 4f7339c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
3 changes: 2 additions & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name=deploii
version=0.1.0
version=0.1.1
author=Company of Things
maintainer=Company of Things <[email protected]>
sentence=Library for enabling communication between a MCU and Deploii
paragraph=
depends=WebSockets, MsgPack, WiFi
category=Communication
url=https://github.com/Company-of-Things/deploii-library
architectures=esp32
Expand Down
7 changes: 6 additions & 1 deletion src/deploii.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ DeploiiHandler* Deploii::selectHandler() {
return new DeploiiHandler(_debug);
}

void Deploii::setDebug(bool debug){
_debug = debug;
_handler->_debug = debug;
}

void Deploii::interval(int intervalLength, void (*cb)(void)) {
_intervals = (struct Interval*)realloc(_intervals, sizeof(struct Interval) * (_intervalCount + 1));
_intervals[_intervalCount].intervalLength = intervalLength;
Expand All @@ -55,4 +60,4 @@ void Deploii::checkIntervals() {
_intervals[i].previousTime = currentTime;
}
}
}
}
1 change: 1 addition & 0 deletions src/deploii.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class Deploii {
bool ssl = true);

void interval(int intervalLength, void (*cb)(void));
void setDebug(bool debug);

private:
Medium _medium;
Expand Down
10 changes: 4 additions & 6 deletions src/handler/deploii_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ class DeploiiHandler {
const int port = DEPLOII_PORT,
const char* url = DEPLOII_WS_URL,
bool ssl = true);

private:
bool _debug;
private:
};

class DeploiiHandlerWiFiWS : public DeploiiHandler {
Expand All @@ -56,9 +55,9 @@ class DeploiiHandlerWiFiWS : public DeploiiHandler {
const int port,
const char* url,
bool ssl);

private:
bool _debug;
private:


void connectWiFi(char* ssid, const char* pwd);
void connectWS(char* boardID, const char* host, const int port, const char* url, bool ssl);
Expand Down Expand Up @@ -89,9 +88,8 @@ class DeploiiHandlerWiFiHTTP : public DeploiiHandler {
const int port,
const char* url,
bool ssl);

private:
bool _debug;
private:
void connectWiFi(char* ssid, const char* pwd);

#if defined(ESP32)
Expand Down

0 comments on commit 4f7339c

Please sign in to comment.