sd file lib updated
Dependents: grove_stream_jpa_sd2 grove_stream_jpa_sd2 grove_stream_jpa_sd2-2 grove_stream_jpa_sd2-3
Revision 6:75d0098c7522, committed 2021-01-13
- Comitter:
- 38domo
- Date:
- Wed Jan 13 19:51:46 2021 +0000
- Parent:
- 5:869ccd13fa0a
- Commit message:
- update sd lib
Changed in this revision
sdcardJPA.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 869ccd13fa0a -r 75d0098c7522 sdcardJPA.cpp --- a/sdcardJPA.cpp Wed Dec 30 17:21:32 2020 +0000 +++ b/sdcardJPA.cpp Wed Jan 13 19:51:46 2021 +0000 @@ -1,3 +1,55 @@ +//sd card file IPdatas.txt contents +/* +IP address: 192.168.1.30 +Ethernet actif 0;Ethernet +Wifi actif 1;WiFi +Can actif 1;can +Serial actif 1;serial +Option function F;Fonction +Touche 1 status 0;Touche1 status : off +Touche1 BackColor 0xFF00FF00;Touche1 BackColor +Touche1 TextColor 0xFF000000;Touche1 TextColor +Touche1 text lign1 Pompe ; Touche1 text +Touche1 text1lign2 Piscine ; Touche1 text1 +Touche2 Status 1;Touche2 Status : off +Touche2 BackColor 0xFFFF0000; Touche2 BackColor +Touche2 TextColor 0xFFFFFFFF; Touche2 TextColor +Touche2 text L1 Eclair ;Touche2 text +Touche2 text1 L2 Piscine ;Touche2 text1 +Touche3 Status 0; Touche3 Status : off +Touche3 BackColor 0xFF00FF00; Touche3 BackColor +Touche3 TextColor 0xFFFFFF00; Touche3 TextColor +Touche3 text L1 Leds Bl ;Touche3 text +Touche3 text1 L2 Piscine ; Touche3 text1 +Touche4 Status 1; Touche4 Status : off +Touche4 BackColor 0xFF800000; Touche4 BackColor +Touche4 TextColor 0xFFFFFF00; Touche4 TextColor +Touche4 text L1 Porche ; Touche4 text +Touche4 text1 L2 entree ; Touche4 text1 +Display1 text Temp Piscine ; Temp1 text +Display1 Backcolor 0xFF404040; backColorTemp1 +Display1 text color 0xFFFFFF00; txtColorTemp1 +Display2 text Temp Exterieur ; Temp2 text +Display2 backcolor 0xFF404040; backColorTemp2 +Display2 text color 0xFFFFFF00; txtColorTemp2 +Can Id Touche1 On 0x100130CA;Can Id Touche1 On +Can Data Touche1 On 0x01;Can Data Touche1 On +Can Id Touche1 Off 0x100130CA;Can Id Touche1 Off +Can Data Touche1 Off0x01;Can Data Touche1 Off +Can Id Touche2 On 0x100130CA;Can Id Touche2 On +Can Data Touche2 On 0x01;Can Data Touche2 On +Can Id Touche2 Off 0x100130CA;Can Id Touche2 Off +Can Data Touche2 Off0x01;Can Data Touche2 Off +Can Id Touche3 On 0x100130CA;Can Id Touche3 On +Can Data Touche3 On 0x01;Can Data Touche3 On +Can Id Touche3 Off 0x100130CA;Can Id Touche3 Off +Can Data Touche3 Off0x01;Can Data Touche3 Off +Can Id Touche4 On 0x100130CA;Can Id Touche4 On +Can Data Touche4 On 0x01;Can Data Touche4 On +Can Id Touche4 Off 0x100130CA;Can Id Touche4 Off +Can Data Touche4 Off0x01;Can Data Touche4 Off +*/ + #include "mbed.h" #include "SDFileSystem.h" @@ -64,7 +116,7 @@ int xxx = 0; while (true) { int chr = fgetc(fr); - if ((chr == EOF) || (chr == 10) || (chr == 13) ||(xxx > 30) ) + if ((chr == EOF) || (chr == 10) || (chr == 13) ||(xxx > 30)||(xxx ==59) ) { if (xxx == 0) { // on passe au caractere suivant = ligne suivante } @@ -351,11 +403,11 @@ printf("\n"); // sprintf(text1Button[4],touch4_text1); - // -------------------- temp1 pad + // -------------------- Display1 pad -------------------------------------------------------------- // SD read ----------------------------- readline( "Temp1 text : ",fp); printf("Temp1 text "); - for ( x=0; x<20;x++) + for ( x=0; x<15;x++) { temp1_text[x] = read_sd[x]; textTempTitle[1][x] = read_sd[x]; printf("%c", temp1_text[x]); @@ -385,11 +437,11 @@ printf("\n"); txtColorTemp1 = int(temp1_text_color); -// -------------------- temp2 +// -------------------- display2 pad ------------------------------------------------- // SD read ----------------------------- readline( "Temp2 text : ",fp); printf("Temp2 text "); - for ( x=0; x<20;x++) + for ( x=0; x<15;x++) { temp2_text[x] = read_sd[x]; textTempTitle[2][x] = read_sd[x]; printf("%c", temp2_text[x]); @@ -418,10 +470,7 @@ //printf("Temp2 text color %c\n", temp2_text_color); printf("\n"); txtColorTemp2 = int(temp2_text_color); - - - - + // -------------------------------- fclose(fp); sd.unmount();