From 7417616013fa26ef6a782f9df383b09c81a10278 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Mon, 14 Nov 2022 16:44:28 -0500 Subject: [PATCH] add line and i for row column --- cubesatsim/cubesatsim.ino | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index d52b844f..585e222f 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -4474,6 +4474,8 @@ void start_clockgen() { void print_file_hex(char* filename, int bytes) { Serial.println(" "); int count = 0; + int line = 0; + int i = 0; char buff[3]; File myFile = LittleFS.open(filename, "r"); while (count < bytes) { @@ -4485,6 +4487,11 @@ void print_file_hex(char* filename, int bytes) { if ((buff[0]!=0xff) || (buff[1]!=0xff) || (buff[2]!=0xff)) Serial.printf("3Non white pixel at %d, %d R: %d G: %d B: %d\n", line, i, buff[0], buff[1],buff[2]); count += 3; + if (i++ > 319) + { + i = 0; + line++; + } } Serial.println(" "); myFile.close();