SD -> SDFat

Hi,
I need to convert the sketch from the SD library to the SDFat library. Do not know how (((
Help me please!

#include <SPI.h>
#include <SD.h>

#include <UTFT.h>


UTFT myGLCD(17, 38, 39, 40, 41);

extern uint8_t BigFont[];

#define PARAMS1_NUMBER 8                                 
#define PARAMS2_NUMBER 3                                 
#define PARAMS3_NUMBER 14                               

  byte param1[PARAMS1_NUMBER]={0,12,0,0,20,1,5,10};
  double param2[PARAMS2_NUMBER]={0,22.5,34.9};   
  double param3[PARAMS3_NUMBER]={0,36.6,0,0,0,0,0,0,0,0,0,0,12.4,0};

  File MyFile;

void setup() {

  myGLCD.InitLCD();
  myGLCD.clrScr();
  myGLCD.setFont(BigFont);
  
  Serial.begin(9600);
  while (!Serial);
  if (!SD.begin(53)) {
    Serial.println("initialization failed!");
    return;
  }
  SaveConfig();
  LoadConfig();
}

void loop() {
}


void writeFloat2File(File File2Write, float Value) {
  byte j;
  byte Data[9];
  float div=1000;
  float tmp;
  Data[8]=0;
  if (Value<0) {
    Data[8]=1;
    Value*=-1.0;
  }
  for (j=0;j<4;j++) {
    tmp=Value/div;
    Data[j]=0;
    if (tmp>1) {
      Data[j]=(byte)(tmp);
      Value-=(int)tmp*div;
    } 
    div/=10;
  }
  Value*=10000;
  div=1000;  
  for (j=4;j<8;j++) {
    tmp=Value/div;
    Data[j]=0;
    if (tmp>1) {
      Data[j]=(byte)(tmp);
      Value-=(int)tmp*div;
    } 
    div/=10;
  }
  File2Write.write(Data,9);  
}


float readFloat4mFile(File File2Read) {
  byte j;
  byte tmp;
  float div=1000.0;
  float Ret=0;
  for (j=0;j<8;j++) {
    tmp=File2Read.read();
    Ret+=tmp*div;
    div/=10;
  }
  tmp=File2Read.read();
  if (tmp==1) Ret*=-1;
  return Ret;
}

void SaveConfig() {
 // int tmp=1;
  byte j;
  if (SD.exists("param1.ini")) {
    SD.remove("param1.ini");
  }
  MyFile = SD.open("param1.ini", FILE_WRITE);
  if (MyFile) {
    for (j=0;j<8;j++) {
      writeFloat2File(MyFile, param1[j]);
    }
    MyFile.close();
  }
    if (SD.exists("param2.ini")) {
    SD.remove("param2.ini");
  }
  MyFile = SD.open("param2.ini", FILE_WRITE);
  if (MyFile) {
    for (j=0;j<3;j++) {
      writeFloat2File(MyFile, param2[j]);
    }
    MyFile.close();
  }
    if (SD.exists("param3.ini")) {
    SD.remove("param3.ini");
  }
  MyFile = SD.open("param3.ini", FILE_WRITE);
  if (MyFile) {
    for (j=0;j<14;j++) {
      writeFloat2File(MyFile, param3[j]);
    }
    MyFile.close();
  }
}

void LoadConfig() {
    byte j;
    if (SD.exists("param1.ini")) {
      MyFile = SD.open("param1.ini", FILE_READ);
      for (j=0;j<8;j++) {
        param1[j]=readFloat4mFile(MyFile);
        Serial.print(param1[j]);
        Serial.print("\t"); 
        myGLCD.print(String(param1[j]), LEFT, 0+(j*20));
      }

      MyFile.close();
    }
	if (SD.exists("param2.ini")) {
      MyFile = SD.open("param2.ini", FILE_READ);
      for (j=0;j<3;j++) {
        param2[j]=readFloat4mFile(MyFile);
        Serial.print(param2[j]);
        Serial.print("\t"); 
        myGLCD.print(String(param2[j]), CENTER, 0+(j*20));
      }

      MyFile.close();
    }
if (SD.exists("param3.ini")) {
      MyFile = SD.open("param3.ini", FILE_READ);
      for (j=0;j<14;j++) {
        param3[j]=readFloat4mFile(MyFile);
        Serial.print(param3[j]);
        Serial.print("\t"); 
        myGLCD.print(String(param3[j]), RIGHT, 0+(j*20));
      }

      MyFile.close();
    }
}

Thank you in advance!

I need to convert the sketch from the SD library to the SDFat library.

Why?

Do not know how

What part(s) are you having issues with? What are the issues?

PaulS:
Why?
What part(s) are you having issues with? What are the issues?

I use the SDFat and UTFT_SDRaw libraries in the sketch.
The example uses an SD library/

Grayt:
I use the SDFat and UTFT_SDRaw libraries in the sketch.
The example uses an SD library/

That "explanation" doesn't explain a thing. You can own two different sketches that use two different libraries. You can only install one at a time on the Arduino, so it doesn't matter that one uses SD and the other uses SDFat.

Care to try again? And answer the other question, while you are at it.