diff --git a/Makefile b/Makefile index dc9a104cce..8d9423ed4a 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ ########################################################### TARGET=Telmi Story Teller -VERSION=0.2.3 +VERSION=0.2.4 ########################################################### diff --git a/README.md b/README.md index cdea74c232..ac4be172b4 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,16 @@ # Telmi - An open source story teller and MP3 player for Miyoo Mini -Telmi OS is an open source story teller and MP3 player for Miyoo Mini and Miyoo Mini Plus. -The story teller is compatible with stories exported from STUdio (v1 format). +TelmiOS is an open source story teller and lite MP3 player for Miyoo Mini and Miyoo Mini Plus. +TelmiOS is for children 3~4 years old and older. + +The story teller is compatible with stories exported from [STUdio](https://github.com/marian-m12l/studio) (v1 format). ## Installation ### Download the installation files -- [Download the latest version of Telmi](https://github.com/DantSu/Telmi-story-teller/releases/download/0.2.3/TelmiOS_v0.2.3.zip) +- [Download the latest version of Telmi](https://github.com/DantSu/Telmi-story-teller/releases/download/0.2.4/TelmiOS_v0.2.4.zip) ### Format your SD card as FAT32 (not exFAT!) @@ -44,9 +46,9 @@ Make sure you choose: `For use with all systems and devices (FAT)` Chrome already has a tool to format an SD card. Insert the card into your Chromebook, right-click it and click **Format Device**, make sure `FAT32` is selected under **Format** and click or tap **Erase & Format**. -### Unzip TelmiOS_v0.2.3.zip +### Unzip TelmiOS_v0.2.4.zip -Put the content of `TelmiOS_v0.2.3.zip` at the root of the SD card. +Put the content of `TelmiOS_v0.2.4.zip` at the root of the SD card. ### Power on your Miyoo @@ -56,7 +58,7 @@ Insert the SD card in your Miyoo. Press the power button and the installation wi # Story teller -Export stories from STUdio (v1 format). Unzip stories in `/Stories` folder in micro SD card. +Export stories from [STUdio](https://github.com/marian-m12l/studio) (v1 format). Unzip stories in `/Stories` folder in micro SD card. # Music diff --git a/src/bootScreen/bootScreen.c b/src/bootScreen/bootScreen.c index d7304a728f..6a1be76483 100644 --- a/src/bootScreen/bootScreen.c +++ b/src/bootScreen/bootScreen.c @@ -40,12 +40,12 @@ int main(int argc, char *argv[]) if (argc > 1 && strcmp(argv[1], "End") == 0) { background = loadImage("Screen_Off"); - } - else if (argc > 1 && strcmp(argv[1], "lowBat") == 0) { + } else if (argc > 1 && strcmp(argv[1], "lowBat") == 0) { background = loadImage("lowBat"); show_version = false; - } - else { + } else if (argc > 1 && strcmp(argv[1], "convertingFiles") == 0) { + background = loadImage("convertingFiles"); + } else { background = loadImage("bootScreen"); } diff --git a/src/bootScreen/res/convertingFiles.png b/src/bootScreen/res/convertingFiles.png new file mode 100644 index 0000000000..59892ace6c Binary files /dev/null and b/src/bootScreen/res/convertingFiles.png differ diff --git a/src/storyTeller/sdl_helper.h b/src/storyTeller/sdl_helper.h index 6eba16f1a4..5eb4c331b8 100644 --- a/src/storyTeller/sdl_helper.h +++ b/src/storyTeller/sdl_helper.h @@ -37,7 +37,7 @@ void video_audio_init(void) SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO); IMG_Init(IMG_INIT_PNG); TTF_Init(); - if(Mix_OpenAudio(44000, 32784, 2, 2048) < 0) { + if(Mix_OpenAudio(44100, 32784, 2, 2048) < 0) { Mix_Volume(-1, MIX_MAX_VOLUME); Mix_VolumeMusic(MIX_MAX_VOLUME); } @@ -62,25 +62,8 @@ void video_audio_quit(void) SDL_Quit(); } -void video_checkFilename(char *filename) -{ - int length = strlen(filename); - if(strcmp((char *)filename + length - 4, ".jpg") == 0 || strcmp((char *)filename + length - 4, ".JPG") == 0) { - filename[length - 3] = 'p'; - filename[length - 2] = 'n'; - filename[length - 1] = 'g'; - } else if (strcmp((char *)filename + length - 5, ".jpeg") == 0 || strcmp((char *)filename + length - 5, ".JPEG") == 0) { - filename[length - 4] = 'p'; - filename[length - 3] = 'n'; - filename[length - 2] = 'g'; - filename[length - 1] = '\0'; - } -} - void video_displayImage(const char *dir, char *name) { - video_checkFilename(name); - char image_path[STR_MAX * 2]; sprintf(image_path, "%s%s", dir, name); SDL_Surface *image = IMG_Load(image_path); diff --git a/static/build/.tmp_update/runtime.sh b/static/build/.tmp_update/runtime.sh index 16bc720c98..0c9e5a6d1b 100644 --- a/static/build/.tmp_update/runtime.sh +++ b/static/build/.tmp_update/runtime.sh @@ -45,7 +45,7 @@ main() { fi cd $sysdir - bootScreen "Boot" + bootScreen "convertingFiles" # Init rm /tmp/.offOrder 2> /dev/null @@ -53,6 +53,7 @@ main() { storyteller_jpg2png + bootScreen "Boot" # start_networking sleep 1 rm -rf /tmp/is_booting @@ -69,13 +70,19 @@ storyteller_jpg2png() { continue fi + hasconvertedjpg=false for file in "$directory"/assets/*.jpg "$directory"/assets/*.jpeg "$directory"/assets/*.JPG "$directory"/assets/*.JPEG; do if [ ! -f "$file" ]; then continue fi - jpg2png "$file" 320 240 + jpg2png "$file" 480 360 rm -f "$file" 2> /dev/null + hasconvertedjpg=true done + + if $hasconvertedjpg; then + sed -i 's/\.\(jpg\|jpeg\)"/\.png"/gI' "$directory"/story.json + fi done }