When installing TankController software, the user can specify a log file name into which "alerts" will be saved on the SD card.
Every minute, the software makes a new entry into the log file that includes the mean temperature over the last minute, the standard deviation in temperature readings over the last minute, the target temperature, the current pH, and the target pH.
Whenever a change is made to the EEPROM data, or new settings are received from the pH probe, the software makes a new entry into the log file that includes the pH probe slope data and a dump of all EEPROM data.
Whenever new data is written into the log file on the SD card, the singleton instance of AlertPusher is flagged to request, via HEAD request from oap.cs.wallawalla.edu, the size of the server's file by the same name as the local log file.
When the instance of AlertPusher receives a reply and determines that the server's log file has less data than the local log file, it will send a POST request with the next ~300 bytes from the local file, which the server will append to its log file. The AlertPusher instance will follow this up with a HEAD request for the server's new log file size. This process continues until the server's file size matches the local file size.
There is more that needs to be done before this can be merged with the main branch:
Although the ultoa() function works on the Arduino, our testing suite does not recognize this function. This issue currently prevents tests from running.
The AlertPusher class needs tests.
There is a blocking issue with AlertPusher that is causing delays of 1 to 2 seconds whenever HEAD and POST requests are sent to oap.cs.wallawalla.edu. This is due (in whole or in part) to the Ethernet library's connect() function blocking until it receives a reply (or timeout).
New features:
There is more that needs to be done before this can be merged with the main branch: