Skip to content

Commit

Permalink
fix: flush send buffer between intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
darlanalves committed Feb 26, 2024
1 parent 6f1f740 commit 3beee16
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions src/include/vm_instructions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ void vm_tick(void *p)
{
int delay = program->delayTime;
program->delayTime = 0;
program->flush();
os_timer_disarm(&program->timer);
os_timer_arm(&program->timer, (uint32)delay, 0);
}
Expand Down
5 changes: 0 additions & 5 deletions src/include/vm_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,6 @@ class Program
}

printBuffer[printBufferCursor++] = c;

if (c == '\n')
{
flush();
}
}

void putchars(const char *c, int len)
Expand Down
1 change: 0 additions & 1 deletion src/index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ void onReceive(void *arg, char *data, unsigned short length)

void onSend(char *data, int length)
{
TRACE("%s", data);
if (conn->state == ESPCONN_WRITE)
{
espconn_send(conn, (uint8 *)data, length);
Expand Down

0 comments on commit 3beee16

Please sign in to comment.