Skip to content

Commit

Permalink
fix: static name collision
Browse files Browse the repository at this point in the history
  • Loading branch information
darlanalves committed Dec 26, 2023
1 parent 8d9f4fb commit 21fc744
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:

- name: Build firmware
run: |
mkdir firmware
chmod a+w firmware
mkdir firmware build
chmod a+w firmware build
make build
make asm
mv build/*.asm firmware/
cp build/*.asm firmware/
env:
WIFI_SSID: ${{ secrets.WIFI_SSID }}
WIFI_PASSWORD: ${{ secrets.WIFI_PASSWORD }}
Expand Down
10 changes: 5 additions & 5 deletions src/index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
static Program program;
static os_timer_t wifiTimer;
static struct espconn *conn;
static const char *OK = "HTTP/1.1 200 OK\r\n\r\nOK\r\n";
static const char *notOK = "HTTP/1.1 400 Bad payload\r\n\r\n";
static const char *httpOK = "HTTP/1.1 200 OK\r\n\r\nOK\r\n";
static const char *httpNotOK = "HTTP/1.1 400 Bad payload\r\n\r\n";
static const char separator[4] = {0x0d, 0x0a, 0x0d, 0x0a};

void checkAgain()
Expand Down Expand Up @@ -118,7 +118,7 @@ void onReceive(void *arg, char *data, unsigned short length)
if (strncmp(data, "GET", 3) == 0)
{
TRACE("Status");
espconn_send(conn, (uint8 *)OK, strlen(OK));
espconn_send(conn, (uint8 *)httpOK, strlen(httpOK));
espconn_disconnect(conn);
vm_systemInformation(&program);
vm_dump(&program);
Expand All @@ -127,7 +127,7 @@ void onReceive(void *arg, char *data, unsigned short length)

if (strncmp(data, "POST", 4) != 0)
{
espconn_send(conn, (uint8 *)notOK, strlen(notOK));
espconn_send(conn, (uint8 *)httpNotOK, strlen(httpNotOK));
espconn_disconnect(conn);
}

Expand All @@ -151,7 +151,7 @@ void onReceive(void *arg, char *data, unsigned short length)
program_start(&program);
}

espconn_send(conn, (uint8 *)OK, strlen(OK));
espconn_send(conn, (uint8 *)httpOK, strlen(httpOK));
espconn_disconnect(conn);
}

Expand Down

0 comments on commit 21fc744

Please sign in to comment.