Skip to content

Commit

Permalink
Fix buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
vshymanskyy committed Aug 22, 2016
1 parent afff811 commit a01fc44
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 26 deletions.
2 changes: 1 addition & 1 deletion WidgetLCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class WidgetLCD

template<typename T>
void print(int x, int y, const T& str) {
char mem[64] = "";
char mem[BLYNK_MAX_SENDBYTES];
BlynkParam cmd(mem, 0, sizeof(mem));
cmd.add("p");
cmd.add(x);
Expand Down
24 changes: 0 additions & 24 deletions WidgetLED.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,6 @@ class WidgetLED
WidgetLED(uint8_t pin) : mPin(pin) {}
void setVPin(int vPin) { mPin = vPin; }

#ifdef BLYNK_EXPERIMENTAL

void setRGB(uint8_t r, uint8_t g, uint8_t b) {
char mem[64] = "";
BlynkParam cmd(mem, 0, sizeof(mem));
cmd.add("rgb");
cmd.add(r);
cmd.add(g);
cmd.add(b);
Blynk.virtualWrite(mPin, cmd);
}

void setHSV(uint8_t h, uint8_t s, uint8_t v) {
char mem[64] = "";
BlynkParam cmd(mem, 0, sizeof(mem));
cmd.add("hsv");
cmd.add(h);
cmd.add(s);
cmd.add(v);
Blynk.virtualWrite(mPin, cmd);
}

#endif

uint8_t getValue() const {
return mValue;
}
Expand Down
2 changes: 1 addition & 1 deletion WidgetSD.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void WidgetSD::onWrite(BlynkReq& request, const BlynkParam& param)
if (!strcmp(cmd, "ls")) {
if (File dir = SD.open(param[1].asStr())) {
while (File entry = dir.openNextFile()) {
char mem[32] = "";
char mem[32];
BlynkParam result(mem, 0, sizeof(mem));
result.add(entry.name());
if (entry.isDirectory()) {
Expand Down

0 comments on commit a01fc44

Please sign in to comment.