This is the firmware for the LaOS - Laser Open Source project. You can use it to drive a laser cutter. For hardware and more information, look at our wiki: http://wiki.laoslaser.org

Dependencies:   EthernetNetIf mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LaosMenu.h Source File

LaosMenu.h

00001 /**
00002  * LaosMenu.h
00003  * Simple menu system
00004  *
00005  * Copyright (c) 2011 Peter Brier & Jaap Vermaas
00006  *
00007  *   This file is part of the LaOS project (see: http://wiki.laoslaser.org/)
00008  *
00009  *   LaOS is free software: you can redistribute it and/or modify
00010  *   it under the terms of the GNU General Public License as published by
00011  *   the Free Software Foundation, either version 3 of the License, or
00012  *   (at your option) any later version.
00013  *
00014  *   LaOS is distributed in the hope that it will be useful,
00015  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  *   GNU General Public License for more details.
00018  *
00019  *   You should have received a copy of the GNU General Public License
00020  *   along with LaOS.  If not, see <http://www.gnu.org/licenses/>.
00021  *
00022  *
00023  @code 
00024  --code--
00025  @endcode
00026  */
00027 #ifndef _LAOSMENU_H_
00028 #define _LAOSMENU_H_
00029 
00030 #include "global.h"
00031 #include "LaosDisplay.h"
00032 #include "laosfilesystem.h"
00033 extern "C" void mbed_reset();
00034 
00035     /** Menu system
00036       * Create server based on config file. 
00037       *
00038       * Example:
00039       * @code 
00040       * LaosMenu menu();
00041       * menu.Handle();
00042       * @endcode
00043       */
00044       
00045 extern void plan_get_current_position_xyz(float *x, float *y, float *z);
00046 
00047 class LaosMenu {
00048 public:
00049     /** Make new LaosMenu object. 
00050       */
00051   LaosMenu(LaosDisplay *display);
00052   ~LaosMenu();
00053 
00054 /** Handle the menu system
00055   * Reads inputs, displays screen
00056   */ 
00057   void Handle();
00058   void SetScreen(int screen);
00059   void SetScreen(char *s);
00060   void SetFileName(char * name);
00061   
00062 private:
00063   // LaosDisplay *display;
00064   int args[5];
00065   unsigned char waitup, timeout;
00066   char *sarg;
00067   int speed;
00068   char jobname[MAXFILESIZE];
00069   
00070   // menu states
00071   int screen, prevscreen, lastscreen;
00072   unsigned char menu, ipfield, iofield;
00073   unsigned char powerfield, power[4];
00074   LaosDisplay *dsp;
00075   int x,y,z;
00076   int xoff, yoff, zoff;
00077   FILE *runfile;
00078   
00079 };
00080 
00081  
00082 
00083 #endif