ERIS CORE

◆ getNextFrameChunk()

bool FLASHMEM Animation::getNextFrameChunk ( )

Definition at line 25 of file ILI9341_t3_ERIS.cpp.

25  {
26  if (p_SD == NULL) return false;
27  if (chunk==0){
28  chunk++;
29  sprintf(filename,"%03u.ile",frame);
30  frame++;
31  if(last_frame > 0 && frame > last_frame) frame = 1;
32  p_SD->chdir(_path);
33  if(p_SD->exists(filename)){
34  //Serial.println("M Animation::getNextFrameChunk(): OK");
35  return true;
36  }else{
37  last_frame = frame - 1;
38  frame = 1;
39  sprintf(filename,"%03u.ile",frame);
40  if(p_SD->exists(filename)){
41  //Serial.println("M Animation::getNextFrameChunk(): CYCLE OK");
42  return true;
43  }
44  }
45  Serial.printf(F("M SDCard Error File: %s Not found at: %s\n"),filename,_path);
46  return false;
47  }
48  chunk++;
49  if(chunk>=ANIMATION_CHUNKS_PER_FRAME) chunk=0;
50  return true;
51 }
int16_t last_frame
uint16_t chunk
uint16_t frame
char _path[128]
char filename[64]

References _path, chunk, filename, frame, last_frame, and p_SD.

Referenced by AppManager::update().

+ Here is the caller graph for this function: