Skip to content

EthernetServer API#284

Merged
pianistrevor merged 27 commits intoOpen-Acidification:mainfrom
pianistrevor:EthernetServerAPI
Feb 23, 2022
Merged

EthernetServer API#284
pianistrevor merged 27 commits intoOpen-Acidification:mainfrom
pianistrevor:EthernetServerAPI

Conversation

@pianistrevor
Copy link
Copy Markdown
Collaborator

  • Handle GET and POST requests for the display and keypresses
  • Return a JSON file with all current values
  • Add test coverage for each

@jgfoster
Copy link
Copy Markdown
Member

It looks like the JSON Builder is expecting the old version. We should look at a way to simplify updating the version without changing it in many places!

@pianistrevor
Copy link
Copy Markdown
Collaborator Author

Yes, I hard coded it into the test. We can either change it there or do more complex string interpolation with the static version number

Copy link
Copy Markdown
Member

@prestoncarman prestoncarman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the I only commented on one file, but it affects most of them.

client.stop();
server->loop();
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add test for current endpoint.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you referring to the unit test for display, or did you have something else in mind?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test for current values added to EthernetServerTest.cpp

Comment thread src/UIState/SeeDeviceAddress.cpp Outdated
};
}

int SeeDeviceAddress::writeToBuffer(char* buffer, int size, int line) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Refactor to use a ENUM to identify the type of display instead of the size of the buffer.
  • Refactor to identify the information displayed to use more appropriate term instead of "line".

@pianistrevor pianistrevor merged commit c50c52b into Open-Acidification:main Feb 23, 2022
@pianistrevor pianistrevor deleted the EthernetServerAPI branch March 3, 2022 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants