build_web_ui.sh is responsible for converting our webpage from .html to a c-style array, stored in PROGMEM, which is imported and sent by the on-board webserver. build_web_ui.sh previously called file_to_progmem.sh which I wrote but was slow because it read two bytes at a time.
I've just found that xxd has a built-in option to convert a file into a C-style header. For example
build_web_ui.sh
is responsible for converting our webpage from .html to a c-style array, stored in PROGMEM, which is imported and sent by the on-board webserver.build_web_ui.sh
previously calledfile_to_progmem.sh
which I wrote but was slow because it read two bytes at a time.I've just found that
xxd
has a built-in option to convert a file into a C-style header. For exampleThis change removes
file_to_progmem.sh
and uses xxd instead. Faster build times with less code -- that's a win-win.