Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BSP_DISCO_F746NG F746_GUI F746_SAI_IO FrequencyResponseDrawer LCD_DISCO_F746NG SDFileSystem_Warning_Fixed TS_DISCO_F746NG mbed
Fork of F746_SD_GraphicEqualizer by
Revision 12:87f6955b5a80, committed 2016-07-07
- Comitter:
- edamame22
- Date:
- Thu Jul 07 05:58:52 2016 +0000
- Parent:
- 11:2286f2668e8c
- Commit message:
- added highlighted line for track selection
Changed in this revision
--- a/MyClasses_Functions/FileSelectorWav.hpp Wed Jun 22 03:59:21 2016 +0000
+++ b/MyClasses_Functions/FileSelectorWav.hpp Thu Jul 07 05:58:52 2016 +0000
@@ -138,7 +138,7 @@
}
// ファイルの一覧の表示
- void DisplayFileList(bool sort = true)
+ void DisplayFileList(int highlighted, bool sort = true)
{
for (int n=0; n<fileCount_; n++)
sortedFileNames_[n] = fileNames_[n];
@@ -149,6 +149,11 @@
rect_->DrawAll();
for (int n=0; n<fileCount_; n++)
fileNameLabels_[n]->Draw(GetFileNameNoExt(n));
+ if((highlighted>-1) && (highlighted < fileCount_))
+ {
+ fileNameLabels_[highlighted]->Draw(GetFileNameNoExt(highlighted), TOUCHED_COLOR_);
+ prev_ = highlighted;
+ }
}
void Erase(uint16_t x, uint16_t y, uint16_t width, uint16_t height,
--- a/MyClasses_Functions/MyFunctions.cpp Wed Jun 22 03:59:21 2016 +0000
+++ b/MyClasses_Functions/MyFunctions.cpp Thu Jul 07 05:58:52 2016 +0000
@@ -45,7 +45,7 @@
void SelectFile(ButtonGroup &menu, FileSelector &selector,
Label &msg, string fileList[], int *selected)
{
- selector.DisplayFileList();
+ selector.DisplayFileList(*selected);
msg.Draw("Select file");
do
{
--- a/main.cpp Wed Jun 22 03:59:21 2016 +0000
+++ b/main.cpp Thu Jul 07 05:58:52 2016 +0000
@@ -27,7 +27,7 @@
SD_WavReader sdReader(mySai.GetLength()); // SD カード読み込み用オブジェクト
const int MAX_FILES = 7;
string PlayList[MAX_FILES];
- int list_id = 0;
+ int list_id = -9; // if <0 then doesn't highlight any track in the list
FileSelector selector(4, 26, MAX_FILES, 37, sdReader);
if (!selector.CreateTable())
BlinkLabel errLabel(240, 100, "SD CARD ERROR", Label::CENTER);
@@ -160,7 +160,7 @@
int touch10;
while (!menu.GetTouchedNumber(touch10))
ModifyFilter(drawerObj, myBars, hn, flat, onOff, on);
- if (touch10 == 0)
+ if (touch10 == 0) // OPEN タッチしたら
SelectFile(menu, selector, myLabel1, PlayList, &list_id);
ui_mode = SELECTED_PREPARE_PALY;
break;
