Team Riedel - display
Dependencies: LCD_fonts SPI_TFT_ILI9341 CMSIS_DSP_401_without_cm4 mbed-src SDFileSystem wavfile
Revision 12:ed94d67bd36b, committed 2015-12-13
- Comitter:
- linx0576
- Date:
- Sun Dec 13 20:06:12 2015 +0000
- Parent:
- 11:737a2367af3c
- Child:
- 13:ab0285338951
- Commit message:
- menu done
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Dec 13 18:23:04 2015 +0000 +++ b/main.cpp Sun Dec 13 20:06:12 2015 +0000 @@ -84,7 +84,7 @@ //SPI_TFT_ILI9341 TFT(D11, D12, D13, D10, D8, D9, "TFT"); // mosi, miso, sclk, cs, reset, dc SPI_TFT_ILI9341 TFT(PC_3, PC_2, PB_10, PB_12, PA_8, PA_11, "TFT"); // mosi, miso, sclk, cs, reset, dc -SDFileSystem sd(PB_5, PB_4, PB_3, PC_11, "sd"); // mosi, miso, sclk, cs +SDFileSystem sd(PB_5, PB_4, PB_3, PA_10, "sd"); // mosi, miso, sclk, cs DigitalOut skywire_en(PA_6); //DigitalOut skywire_rts(PA_7); @@ -404,7 +404,6 @@ //Try to mount the SD card int row = 50; - int col = 10; TFT.locate(10,row); TFT.printf("Mounting SD card..."); row+=10; if (sd.mount() != 0) { TFT.locate(10,row); TFT.printf("failed!"); row+=10; @@ -474,7 +473,7 @@ } if (stage==5) //recording... with interval - { int t = h*60+m; + { int t = 2*(h*60+m); int t1, abc; float32_t sum, sum_mse, sum_st; TFT.set_font((unsigned char*) Arial24x23); @@ -521,12 +520,12 @@ // mselog[0] = stmse; // } // } - - for ( t1=0; t1<t; t1++) + + while(t1<t) { ps = ain3.read(); - if (ps==1) { wait(0.3); TFT.cls(); stage=0; } - else { wait(1); } - } + if (ps==0) { t1++; wait(0.5); } + else if (ps==1) { wait(0.3); TFT.cls(); stage=0; break; } + } } } }