This was primarily an implementation of an HTTP API example, but during testing I ended up fixing a bunch of other things too. The biggest roadblock was running out of heap space for TLS (HTTPS), which necessitated a bunch of debugging and refactoring.
Changes:
add HTTPTask and implement example:
fetch weather data for San Francisco
parse and process data (using json11) to calculate median temperature and wind speed across multiple weather stations
generate 2 separate messages (temp and wind speed) to be displayed
cycle the messages periodically
re-fetch data periodically (different interval than cycling messages)
eliminated framebuffer from display code to free up lots of RAM for TLS
implemented automatic size scaling of splitflap modules in the display, based on number of columns/modules
added an optional parameter to SplitflapTask.showString for whether to force a full rotation on unchanged modules (defaults to FORCE_FULL_ROTATION config value)
implemented protocol-switching for serial, so proto mode is usable without a firmware change
legacy protocol switches to protobuf mode if it ever receives a 0 byte
since proto messages are 0-delimited and messages are retried when not acked, this essentially automatically switches the firmware to proto mode as soon as you attempt to send a message
This was primarily an implementation of an HTTP API example, but during testing I ended up fixing a bunch of other things too. The biggest roadblock was running out of heap space for TLS (HTTPS), which necessitated a bunch of debugging and refactoring.
Changes: