Update for spelling etc. in comments!

This commit is contained in:
Bodmer committed 2023-12-07 20:35:59 +00:00
1 parent aefcf5af63
commit d506a3c49d
197 files changed
+1006 -757

No files matched your search

@@ -84,7 +84,7 @@ void setup() {
Serial.println(" SPIFFS initialisation OK");
frame.setColorDepth(1); // Must set the bits per pixel to 1 for ePaper displays
frame.setcolorDepth(1); // Must set the bits per pixel to 1 for ePaper displays
// Set bit depth BEFORE creating Sprite, default is 16!
// Create a frame buffer in RAM of defined size and save the pointer to it
@@ -106,7 +106,7 @@ void loop() {
frame.fillSprite(PAPER);
// Draw 8 bit grey-scale bitmap using Floyd-Steinberg dithering at x,y
// Draw 8-bit grey-scale bitmap using Floyd-Steinberg dithering at x,y
// /File name x y
//drawFSBmp("/TestCard.bmp", 0, 0); // 176 x 264 pixels
@@ -27,14 +27,14 @@
SOFTWARE.
Note: drawFSBmp() is a simplified function and does not handle all possible
BMP file header variants. It works OK with 8 bit per pixel grey-scale images
BMP file header variants. It works OK with 8-bit per pixel grey-scale images
generated by MS Paint and IrfanView.
*/
// https://github.com/Bodmer/TFT_eSPI
//====================================================================================
// Draw an 8 bit grey-scale bitmap (*.BMP) on a Monochrome display using dithering
// Draw an 8-bit grey-scale bitmap (*.BMP) on a Monochrome display using dithering
//====================================================================================
// Uses RAM for buffers (3 * width + 4) ( 532 bytes for 176 pixels)
@@ -102,10 +102,10 @@ void drawFSBmp(const char *filename, int16_t x, int16_t y) {
uint16_t padding = (4 - (w & 3)) & 3; // Calculate the BMP line padding
// Create an zero an 8 bit pixel line buffer
// Create an zero an 8-bit pixel line buffer
uint8_t* lineBuffer = ( uint8_t*) calloc(w , sizeof(uint8_t));
// Create a 16 bit signed line buffer for the quantisation error
// Create a 16-bit signed line buffer for the quantisation error
// Diffusion spreads to x-1 and x+1 so w + 2 avoids a bounds check
int16_t* qerrBuffer = ( int16_t*) calloc((w + 2)<<1, sizeof(uint8_t));
@@ -174,7 +174,7 @@ void drawFSBmp(const char *filename, int16_t x, int16_t y) {
}
//====================================================================================
// Read a 16 bit value from the filing system
// Read a 16-bit value from the filing system
//====================================================================================
uint16_t read16(fs::File &f) {
uint16_t result;
@@ -184,7 +184,7 @@ uint16_t read16(fs::File &f) {
}
//====================================================================================
// Read a 32 bit value from the filing system
// Read a 32-bit value from the filing system
//====================================================================================
uint32_t read32(fs::File &f) {
uint32_t result;