Psi Swarm robot library version 0.9

Dependents:   PsiSwarm_V9_Blank

Fork of PsiSwarmV9 by James Hilder

Committer:
richardredpath
Date:
Mon Jul 08 10:50:40 2019 +0000
Revision:
20:2b6ebe60929d
Parent:
16:50686c07ad07
Fixed deprecated warnings for callbacks throughout the library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jah128 0:d6269d17c8cf 1 /* University of York Robotics Laboratory PsiSwarm Library: Demo Mode Header File
jah128 11:312663037b8c 2 *
jah128 14:2f1ad77d281e 3 * Copyright 2017 University of York
jah128 6:b340a527add9 4 *
jah128 11:312663037b8c 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
jah128 6:b340a527add9 6 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
jah128 6:b340a527add9 7 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS
jah128 11:312663037b8c 8 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
jah128 6:b340a527add9 9 * See the License for the specific language governing permissions and limitations under the License.
jah128 6:b340a527add9 10 *
jah128 0:d6269d17c8cf 11 * File: demo.h
jah128 0:d6269d17c8cf 12 *
jah128 0:d6269d17c8cf 13 * (C) Dept. Electronics & Computer Science, University of York
jah128 0:d6269d17c8cf 14 * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis
jah128 0:d6269d17c8cf 15 *
jah128 14:2f1ad77d281e 16 * PsiSwarm Library Version: 0.9
jah128 0:d6269d17c8cf 17 *
jah128 14:2f1ad77d281e 18 * June 2017
jah128 0:d6269d17c8cf 19 *
jah128 0:d6269d17c8cf 20 *
jah128 11:312663037b8c 21 */
jah128 0:d6269d17c8cf 22
jah128 0:d6269d17c8cf 23 #ifndef DEMO_H
jah128 0:d6269d17c8cf 24 #define DEMO_H
jah128 0:d6269d17c8cf 25
jah128 11:312663037b8c 26
jah128 11:312663037b8c 27 /**
jah128 11:312663037b8c 28 * Demo class
jah128 11:312663037b8c 29 * Build in demonstration\test mode for the robot that is enabled by holding the cursor switch
jah128 11:312663037b8c 30 * in a direction for 1 second at boot-up time. The demonstration includes the ability to get
jah128 11:312663037b8c 31 * readings from most of the on-board sensors, enable LEDs and motors, and run a number of basic
jah128 11:312663037b8c 32 * build in demonstrations and tests, using cursor-navigated menus.
jah128 11:312663037b8c 33 *
jah128 11:312663037b8c 34 * The demo can also be enabled by calling the start_demo_mode() function.
jah128 11:312663037b8c 35 */
jah128 11:312663037b8c 36 class Demo
jah128 11:312663037b8c 37 {
jah128 11:312663037b8c 38 public:
jah128 11:312663037b8c 39 /**
jah128 11:312663037b8c 40 * Start the demonstration mode
jah128 11:312663037b8c 41 */
jah128 11:312663037b8c 42 void start_demo_mode(void);
jah128 11:312663037b8c 43 void demo_handle_switch_event(char switch_pressed);
jah128 11:312663037b8c 44
jah128 11:312663037b8c 45 private:
jah128 11:312663037b8c 46 void demo_update_leds(void);
jah128 11:312663037b8c 47 void demo_event_thread(void);
jah128 11:312663037b8c 48 void start_line_demo(void);
jah128 11:312663037b8c 49 void start_obstacle_demo(void);
jah128 11:312663037b8c 50 void start_spinning_demo(void);
jah128 11:312663037b8c 51 void start_stress_demo(void);
jah128 16:50686c07ad07 52 void start_colour_demo(void);
jah128 11:312663037b8c 53 void line_demo_cycle(void);
jah128 11:312663037b8c 54 void obstacle_demo_cycle(void);
jah128 11:312663037b8c 55 void spinning_demo_cycle(void);
jah128 11:312663037b8c 56 void stress_demo_cycle(void);
jah128 16:50686c07ad07 57 void colour_demo_cycle(void);
jah128 15:66be5ec52c3b 58 void quick_test_cycle(void);
jah128 15:66be5ec52c3b 59 void toggle_quick_test(void);
jah128 11:312663037b8c 60 };
jah128 0:d6269d17c8cf 61 #endif