C++ Library for the PsiSwarm Robot - Version 0.8

Dependents:   PsiSwarm_V8_Blank_CPP Autonomia_RndmWlk

Fork of PsiSwarmV7_CPP by Psi Swarm Robot

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers demo.h Source File

demo.h

00001 /* University of York Robotics Laboratory PsiSwarm Library: Demo Mode Header File
00002  *
00003  * Copyright 2016 University of York
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
00007  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS
00008  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00009  * See the License for the specific language governing permissions and limitations under the License.
00010  *
00011  * File: demo.h
00012  *
00013  * (C) Dept. Electronics & Computer Science, University of York
00014  * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis
00015  *
00016  * PsiSwarm Library Version: 0.8
00017  *
00018  * October 2016
00019  *
00020  *
00021  */
00022 
00023 #ifndef DEMO_H
00024 #define DEMO_H
00025 
00026 
00027 /**
00028  * Demo class
00029  * Build in demonstration\test mode for the robot that is enabled by holding the cursor switch
00030  * in a direction for 1 second at boot-up time.  The demonstration includes the ability to get
00031  * readings from most of the on-board sensors, enable LEDs and motors, and run a number of basic
00032  * build in demonstrations and tests, using cursor-navigated menus.
00033  *
00034  * The demo can also be enabled by calling the start_demo_mode() function.
00035 */
00036 class Demo
00037 {
00038 public:
00039     /**
00040      * Start the demonstration mode
00041     */ 
00042     void start_demo_mode(void);
00043     void demo_handle_switch_event(char switch_pressed);
00044 
00045 private:
00046     void demo_update_leds(void);
00047     void demo_event_thread(void);
00048     void start_line_demo(void);
00049     void start_obstacle_demo(void);
00050     void start_spinning_demo(void);
00051     void start_stress_demo(void);
00052     void line_demo_cycle(void);
00053     void obstacle_demo_cycle(void);
00054     void spinning_demo_cycle(void);
00055     void stress_demo_cycle(void);
00056 };
00057 #endif