Laser cutter software
Dependencies: EthernetNetIf mbed SDFileSystem
LaosMenu/LaosMenu.h@0:18ead85c200b, 2011-08-11 (annotated)
- Committer:
- pbrier
- Date:
- Thu Aug 11 09:33:15 2011 +0000
- Revision:
- 0:18ead85c200b
Laos server
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pbrier | 0:18ead85c200b | 1 | /** |
pbrier | 0:18ead85c200b | 2 | * LaosMenu.h |
pbrier | 0:18ead85c200b | 3 | * Simple menu system |
pbrier | 0:18ead85c200b | 4 | * |
pbrier | 0:18ead85c200b | 5 | * Copyright (c) 2011 Peter Brier |
pbrier | 0:18ead85c200b | 6 | * |
pbrier | 0:18ead85c200b | 7 | * This file is part of the LaOS project (see: http://wiki.protospace.nl/index.php/LaOS) |
pbrier | 0:18ead85c200b | 8 | * |
pbrier | 0:18ead85c200b | 9 | * LaOS is free software: you can redistribute it and/or modify |
pbrier | 0:18ead85c200b | 10 | * it under the terms of the GNU General Public License as published by |
pbrier | 0:18ead85c200b | 11 | * the Free Software Foundation, either version 3 of the License, or |
pbrier | 0:18ead85c200b | 12 | * (at your option) any later version. |
pbrier | 0:18ead85c200b | 13 | * |
pbrier | 0:18ead85c200b | 14 | * LaOS is distributed in the hope that it will be useful, |
pbrier | 0:18ead85c200b | 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
pbrier | 0:18ead85c200b | 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
pbrier | 0:18ead85c200b | 17 | * GNU General Public License for more details. |
pbrier | 0:18ead85c200b | 18 | * |
pbrier | 0:18ead85c200b | 19 | * You should have received a copy of the GNU General Public License |
pbrier | 0:18ead85c200b | 20 | * along with LaOS. If not, see <http://www.gnu.org/licenses/>. |
pbrier | 0:18ead85c200b | 21 | * |
pbrier | 0:18ead85c200b | 22 | * |
pbrier | 0:18ead85c200b | 23 | @code |
pbrier | 0:18ead85c200b | 24 | --code-- |
pbrier | 0:18ead85c200b | 25 | @endcode |
pbrier | 0:18ead85c200b | 26 | */ |
pbrier | 0:18ead85c200b | 27 | #ifndef _LAOSMENU_H_ |
pbrier | 0:18ead85c200b | 28 | #define _LAOSMENU_H_ |
pbrier | 0:18ead85c200b | 29 | |
pbrier | 0:18ead85c200b | 30 | #include "global.h" |
pbrier | 0:18ead85c200b | 31 | #include "LaosDisplay.h" |
pbrier | 0:18ead85c200b | 32 | |
pbrier | 0:18ead85c200b | 33 | |
pbrier | 0:18ead85c200b | 34 | /** Menu system |
pbrier | 0:18ead85c200b | 35 | * Create server based on config file. |
pbrier | 0:18ead85c200b | 36 | * |
pbrier | 0:18ead85c200b | 37 | * Example: |
pbrier | 0:18ead85c200b | 38 | * @code |
pbrier | 0:18ead85c200b | 39 | * LaosMenu menu(); |
pbrier | 0:18ead85c200b | 40 | * menu.Handle(); |
pbrier | 0:18ead85c200b | 41 | * @endcode |
pbrier | 0:18ead85c200b | 42 | */ |
pbrier | 0:18ead85c200b | 43 | class LaosMenu { |
pbrier | 0:18ead85c200b | 44 | public: |
pbrier | 0:18ead85c200b | 45 | /** Make new LaosMenu object. |
pbrier | 0:18ead85c200b | 46 | */ |
pbrier | 0:18ead85c200b | 47 | // LaosMenu(const LaosDisplay& disp); |
pbrier | 0:18ead85c200b | 48 | LaosMenu(); |
pbrier | 0:18ead85c200b | 49 | ~LaosMenu(); |
pbrier | 0:18ead85c200b | 50 | |
pbrier | 0:18ead85c200b | 51 | /** Handle the menu system |
pbrier | 0:18ead85c200b | 52 | * Reads inputs, displays screen |
pbrier | 0:18ead85c200b | 53 | */ |
pbrier | 0:18ead85c200b | 54 | void Handle(); |
pbrier | 0:18ead85c200b | 55 | |
pbrier | 0:18ead85c200b | 56 | int x,y,z; |
pbrier | 0:18ead85c200b | 57 | |
pbrier | 0:18ead85c200b | 58 | private: |
pbrier | 0:18ead85c200b | 59 | // LaosDisplay *display; |
pbrier | 0:18ead85c200b | 60 | int args[5]; |
pbrier | 0:18ead85c200b | 61 | unsigned char waitup, timeout; |
pbrier | 0:18ead85c200b | 62 | char *sarg; |
pbrier | 0:18ead85c200b | 63 | int speed; |
pbrier | 0:18ead85c200b | 64 | |
pbrier | 0:18ead85c200b | 65 | // menu states |
pbrier | 0:18ead85c200b | 66 | unsigned char screen, prevscreen, menu; |
pbrier | 0:18ead85c200b | 67 | unsigned char ipfield, iofield; |
pbrier | 0:18ead85c200b | 68 | unsigned char powerfield, power[4]; |
pbrier | 0:18ead85c200b | 69 | LaosDisplay dsp; |
pbrier | 0:18ead85c200b | 70 | |
pbrier | 0:18ead85c200b | 71 | }; |
pbrier | 0:18ead85c200b | 72 | |
pbrier | 0:18ead85c200b | 73 | |
pbrier | 0:18ead85c200b | 74 | |
pbrier | 0:18ead85c200b | 75 | #endif |