Skip to content

Commit

Permalink
server: change GetWysokosc command
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonnnm committed Jul 19, 2020
1 parent 8e06550 commit 4652b85
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,16 @@ void processMessage(String Message)
&Memory.flag_antares);
}

command = "MarcinGetWysokosc:";

if (Message.indexOf(command) >= 0)
{
Message.remove(0, Message.indexOf(command) + command.length());
Message.toCharArray(temp, Message.length() + 1);
sscanf(temp, "%hd",
&Memory.flag_antares);
}

command = "MarcinSetValues:";
if (Message.indexOf(command) >= 0)
{
Expand Down Expand Up @@ -330,7 +340,7 @@ void HandleClients()
{
client.println("@MarcinOK!");
}
else if (Message.indexOf("MarcinGetWysokosc") >= 0)
else if (Message.indexOf("MarcinGetWysokosc:") >= 0)
{
client.write((uint8_t)((uint32_t)Memory.altitude >> 24));
client.write((uint8_t)((uint32_t)Memory.altitude >> 16));
Expand Down

0 comments on commit 4652b85

Please sign in to comment.