bruker nå ny serial klasse med større hastighet.. Forøvrig baser en del av koden på Flaskepant oppgaven fra lab.
Dependencies: SerialTerminal mbed
Fork of Fancy-Terminal by
variables.h@6:e82da1b9e11a, 2015-10-16 (annotated)
- Committer:
- madmonkeyman82
- Date:
- Fri Oct 16 16:22:25 2015 +0000
- Revision:
- 6:e82da1b9e11a
- Parent:
- 4:14bd961881ff
testet med hastighet opp til 115200 bit/sek
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
madmonkeyman82 | 4:14bd961881ff | 1 | #include "mbed.h" |
madmonkeyman82 | 4:14bd961881ff | 2 | |
madmonkeyman82 | 4:14bd961881ff | 3 | //defines |
madmonkeyman82 | 4:14bd961881ff | 4 | #define TYPES 5 |
madmonkeyman82 | 4:14bd961881ff | 5 | #define MENUWIDTH 66 |
madmonkeyman82 | 4:14bd961881ff | 6 | #define MENULINES 11 |
madmonkeyman82 | 4:14bd961881ff | 7 | #define MENUPOSX 5 |
madmonkeyman82 | 4:14bd961881ff | 8 | #define MENUPOSY 5 |
madmonkeyman82 | 4:14bd961881ff | 9 | |
madmonkeyman82 | 4:14bd961881ff | 10 | //Variables |
madmonkeyman82 | 4:14bd961881ff | 11 | char menu[] = |
madmonkeyman82 | 4:14bd961881ff | 12 | { |
madmonkeyman82 | 4:14bd961881ff | 13 | "|----------------------------------------------------------------|" |
madmonkeyman82 | 4:14bd961881ff | 14 | "| ~Flaskepantkvitering~ |" |
madmonkeyman82 | 4:14bd961881ff | 15 | "|----------------------------------------------------------------|" |
madmonkeyman82 | 4:14bd961881ff | 16 | "|Antall flasker av type 1 : xx gir kr xxx.xx |" |
madmonkeyman82 | 4:14bd961881ff | 17 | "|Antall flasker av type 2 : xx gir kr xxx.xx |" |
madmonkeyman82 | 4:14bd961881ff | 18 | "|Antall flasker av type 3 : xx gir kr xxx.xx |" |
madmonkeyman82 | 4:14bd961881ff | 19 | "|Antall flasker av type 4 : xx gir kr xxx.xx |" |
madmonkeyman82 | 4:14bd961881ff | 20 | "|Antall flasker av type 5 : xx |" |
madmonkeyman82 | 4:14bd961881ff | 21 | "|----------------------------------------------------------------|" |
madmonkeyman82 | 4:14bd961881ff | 22 | "|TOTALT xxx flasker gir kr xxx.xx |" |
madmonkeyman82 | 4:14bd961881ff | 23 | "|----------------------------------------------------------------|" |
madmonkeyman82 | 4:14bd961881ff | 24 | }; |
madmonkeyman82 | 4:14bd961881ff | 25 | |
madmonkeyman82 | 4:14bd961881ff | 26 | static int aiFlaskeType[TYPES] = { 0,0,0,0,0 }; |
madmonkeyman82 | 4:14bd961881ff | 27 | static float aiFlaskeTypePrice[TYPES] = {1.00,1.00,2.00,2.00,0.00}; |