1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
| \documentclass{article}
\usepackage[UTF8]{inputenc} %pour que les accents passent bien
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\begin{document}
\pagestyle{empty}
% Define block styles
\tikzstyle{decision} = [diamond, draw, fill=blue!0,
text width=5em, text badly centered, node distance=3cm, inner sep=0pt]
\tikzstyle{block} = [rectangle, draw, fill=blue!0,
text width=12em, text centered, rounded corners, minimum height=2em]
\tikzstyle{line} = [draw,-latex']
\tikzstyle{lineNO} = [draw,o-latex']
\tikzstyle{cloud} = [draw, ellipse,fill=red!0, node distance=3cm,
minimum height=2em]
\begin{tikzpicture}[node distance = 1cm ,auto]
% Place nodes
\node [block] (start) {Start Config to RAM};
\node [block, below of=start,node distance = 1cm] (Memset) {Tout à 0};
\node [decision, below of=Memset, node distance=2cm] (TestZones) {2 zones de Flash invalides ?};
\node [decision, below of=TestZones] (TestError) {Error ? (SPI)};
\node [block, right of=TestError , node distance=5cm] (Defaut) {Force config par defaut};
\node [decision, below of=TestZones] (TestError) {Error ? (SPI)};
\node [decision, below of=TestError , node distance=3.5cm] (TestFichier) {Fichier config présent sur SD ?};
\node [block, right of=TestFichier , node distance=5cm] (AnalyseFichier) {Analyse du fichier de la SD};
\node [block, below of=AnalyseFichier] (Effacement) {Effacement du fichier de la SD};
\node [block, below of=TestFichier, node distance=3cm] (Validconfig) {Validation de la configuration};
\node [decision, below of=Validconfig , node distance=3cm] (TestSave) {Enre\-gis\-tre\-ment à faire ?};
\node [block, right of=TestSave, node distance=5cm] (Sauv) {Sauvegarde RAM->Flash};
\node [block, below of=TestSave, node distance=3cm] (Fin) {Fin};
% Draw edges
\path [line] (start) -- (Memset);
\path [line] (Memset) -- (TestZones);
\path [line] (TestZones) -| (Defaut);
\path [lineNO] (TestZones) -- (TestError);
\path [line] (TestError) -- (Defaut);
\path [lineNO] (TestError) -- (TestFichier) node[midway,inner sep =0pt](c){};
\path [line,red] (Defaut) |- (c.center);
\path [line] (TestFichier) -- (AnalyseFichier);
\path [lineNO] (TestFichier) -- (Validconfig) node[midway,inner sep =0pt](a){};
\path [line] (AnalyseFichier) -- (Effacement);
\path [line,red] (Effacement) |- (a.center);
\path [line] (Validconfig) -- (TestSave);
\path [line] (TestSave) -- (Sauv);
\path [lineNO] (TestSave) -- (Fin) node[midway,inner sep =0pt](b){};
\path [line,red] (Sauv) |- (b.center);
\end{tikzpicture}
\end{document} |