From 31876c883cb7b6d5a1b266194d640cfd11eb34eb Mon Sep 17 00:00:00 2001 From: Yohan Boujon Date: Sat, 20 Mar 2021 19:27:26 +0100 Subject: [PATCH] Additions from 19/05/2021 --- transcodeur/main.c | 1 - transcodeur/morse.c | 25 ++-- transcodeur/transcodeur.componentinfo.xml | 24 ++-- transcodeur/transcodeur.cproj | 158 +++++++++++----------- 4 files changed, 107 insertions(+), 101 deletions(-) diff --git a/transcodeur/main.c b/transcodeur/main.c index ea95cf6..3bdae67 100644 --- a/transcodeur/main.c +++ b/transcodeur/main.c @@ -25,7 +25,6 @@ int main(void) saisie(tab,&taille); LCD_Command (CLEAR_DISPLAY); printf("%s",tab); - maj2min_convert(tab,taille); latin2morse(tab,taille); }; } \ No newline at end of file diff --git a/transcodeur/morse.c b/transcodeur/morse.c index be1c7e8..8b107a3 100644 --- a/transcodeur/morse.c +++ b/transcodeur/morse.c @@ -103,23 +103,29 @@ void latin2morse(char *tab, int n) int j=0; //varie la librarie do { - if(tab[i]==morse_library[j][0]) //verifie si le caractere correspond ? la librarie + switch(j) { - library_checker(tab,&i,&j); //traduit dans la librairie et renvoie les deux variables pour continuer - } - else //si ce n'est pas dans la librarie - { - simple_terms(tab,&i,&j); //traduit directement les termes plus simples + case 0: + lcd_char(tab,&i); + maj2min_convert(tab,i); + default: + if(tab[i]==morse_library[j][0]) //verifie si le caractere correspond ? la librarie + { + library_checker(tab,&i,&j); //traduit dans la librairie et renvoie les deux variables pour continuer + } + else //si ce n'est pas dans la librarie + { + simple_terms(tab,&i,&j); //traduit directement les termes plus simples + }; + break; }; - } - while(i Atmel - 1.2.0 - C:/Program Files (x86)\Atmel\Studio\7.0\Packs + 1.6.0 + D:/Programs\Atmelstudio\7.0\Packs - C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\include + D:/Programs\Atmelstudio\7.0\Packs\atmel\ATmega_DFP\1.6.364\include\ include C - include + include/ - C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\include\avr\iom16.h + D:/Programs\Atmelstudio\7.0\Packs\atmel\ATmega_DFP\1.6.364\include\avr\iom16.h header C @@ -37,29 +37,29 @@ - C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\templates\main.c + D:/Programs\Atmelstudio\7.0\Packs\atmel\ATmega_DFP\1.6.364\templates\main.c template source C Exe - ke+693fxy85p6GOdRcSK5g== + KjvOcFWd++tbnsEMfVPd/w== templates/main.c Main file (.c) - C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\templates\main.cpp + D:/Programs\Atmelstudio\7.0\Packs\atmel\ATmega_DFP\1.6.364\templates\main.cpp template source C Exe - YXFphlh0CtZJU+ebktABgQ== + mkKaE95TOoATsuBGv6jmxg== templates/main.cpp Main file (.cpp) - C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\gcc\dev\atmega16 + D:/Programs\Atmelstudio\7.0\Packs\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega16 libraryPrefix GCC @@ -71,8 +71,8 @@ ATmega_DFP - C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/Atmel.ATmega_DFP.pdsc - 1.2.132 + D:/Programs/Atmelstudio/7.0/Packs/atmel/ATmega_DFP/1.6.364/Atmel.ATmega_DFP.pdsc + 1.6.364 true ATmega16 diff --git a/transcodeur/transcodeur.cproj b/transcodeur/transcodeur.cproj index edad823..6f8e534 100644 --- a/transcodeur/transcodeur.cproj +++ b/transcodeur/transcodeur.cproj @@ -27,16 +27,16 @@ 2 0 - - - - - - - - - - + + + + + + + + + + com.atmel.avrdbg.tool.stk500 @@ -67,83 +67,85 @@ Simulator + 0 + - -mmcu=atmega16 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\gcc\dev\atmega16" - True - True - True - True - False - True - True - - - NDEBUG - - - - - %24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\include - - - Optimize for size (-Os) - True - True - True - - - libm - - - - - %24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\include - - - + -mmcu=atmega16 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega16" + True + True + True + True + False + True + True + + + NDEBUG + + + + + %24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\ + + + Optimize for size (-Os) + True + True + True + + + libm + + + + + %24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\ + + + - -mmcu=atmega16 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\gcc\dev\atmega16" - True - True - True - True - False - True - True - - - DEBUG - - - - - %24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\include - - - Optimize (-O1) - True - True - Default (-g2) - True - - - libm - - - - - %24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\include - - - Default (-Wa,-g) - + -mmcu=atmega16 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega16" + True + True + True + True + False + True + True + + + DEBUG + + + + + %24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\ + + + Optimize (-O1) + True + True + Default (-g2) + True + + + libm + + + + + %24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\ + + + Default (-Wa,-g) +