C++ Library for the PsiSwarm Robot - Version 0.8

Dependents:   PsiSwarm_V8_Blank_CPP Autonomia_RndmWlk

Fork of PsiSwarmV7_CPP by Psi Swarm Robot

Committer:
jah128
Date:
Sun Oct 16 21:06:15 2016 +0000
Revision:
11:312663037b8c
Parent:
6:b340a527add9
Child:
12:878c6e9d9e60
Added more classes

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jah128 5:3cdd1a37cdd7 1 /* University of York Robotics Laboratory PsiSwarm Library: PsiSwarm Settings File
jah128 0:d6269d17c8cf 2 *
jah128 6:b340a527add9 3 * Copyright 2016 University of York
jah128 6:b340a527add9 4 *
jah128 6:b340a527add9 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 6:b340a527add9 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: settings.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 5:3cdd1a37cdd7 16 * PsiSwarm Library Version: 0.7
jah128 0:d6269d17c8cf 17 *
jah128 5:3cdd1a37cdd7 18 * October 2016
jah128 0:d6269d17c8cf 19 *
jah128 0:d6269d17c8cf 20 *
jah128 0:d6269d17c8cf 21 */
jah128 0:d6269d17c8cf 22
jah128 11:312663037b8c 23 /*! \file settings.h
jah128 11:312663037b8c 24 \brief Header file containing PsiSwarm define headings
jah128 11:312663037b8c 25 \brief USE_MOTOR_CALIBRATION Enable motor calibration using stored values.
jah128 11:312663037b8c 26 If enabled, the actual motor speeds will be adjusted from the requested values using the motor calibration values stored in EPROM.
jah128 11:312663037b8c 27 \brief OFFSET_MOTORS Enable PWM offset to prevent stalling at low speeds. The motors typically stall when the PWM output is below around 0.2.
jah128 11:312663037b8c 28 Enabling the offset shifts the actual PWM range so that the motor speed 0.0 -> 1.0 actually sets a PWM output of 0.2 -> 1.0
jah128 11:312663037b8c 29
jah128 11:312663037b8c 30 */
jah128 11:312663037b8c 31
jah128 11:312663037b8c 32 #ifndef SETTINGS_H
jah128 11:312663037b8c 33 #define SETTINGS_H
jah128 11:312663037b8c 34
jah128 4:1c621cb8cf0d 35 /* USE_MOTOR_CALIBRATION [1=on, recommended 0=off]
jah128 4:1c621cb8cf0d 36 * If enabled, the actual motor speeds will be adjusted from the requested values using the motor calibration values stored in
jah128 4:1c621cb8cf0d 37 * firmware (and set using the motor calibration code in the demo mode)
jah128 4:1c621cb8cf0d 38 */
jah128 4:1c621cb8cf0d 39 #define USE_MOTOR_CALIBRATION 1
jah128 0:d6269d17c8cf 40
jah128 0:d6269d17c8cf 41 /* OFFSET_MOTORS [1=on, recommended 0=off]
jah128 0:d6269d17c8cf 42 * The motors typically stall when the PWM output is below around 0.2
jah128 0:d6269d17c8cf 43 * Enabling the offset shifts the actual PWM range so that the motor speed 0.0 -> 1.0 actually sets a PWM output of 0.2 -> 1.0
jah128 0:d6269d17c8cf 44 */
jah128 0:d6269d17c8cf 45 #define OFFSET_MOTORS 1
jah128 0:d6269d17c8cf 46
jah128 0:d6269d17c8cf 47 /* ENABLE_DEMO [1=on, 0=off]
jah128 0:d6269d17c8cf 48 * If enabled the demo mode will be launched when the center button is held as the MBED is switched on or reset
jah128 0:d6269d17c8cf 49 */
jah128 0:d6269d17c8cf 50 #define ENABLE_DEMO 1
jah128 0:d6269d17c8cf 51
jah128 0:d6269d17c8cf 52
jah128 0:d6269d17c8cf 53 /* ENABLE_BASIC [1=on, 0=off]: Enable if the Psi-BASIC Interpretter is being used */
jah128 0:d6269d17c8cf 54 #define ENABLE_BASIC 1
jah128 0:d6269d17c8cf 55
jah128 0:d6269d17c8cf 56 /* SERIAL INTERFACES SETTINGS
jah128 0:d6269d17c8cf 57 * __________________________
jah128 0:d6269d17c8cf 58 *
jah128 0:d6269d17c8cf 59 * The Psi-Swarm can communicate using both the USB PC-Serial interface or via Bluetooth using a BlueSMIRF module
jah128 0:d6269d17c8cf 60 *
jah128 0:d6269d17c8cf 61 *
jah128 0:d6269d17c8cf 62 */
jah128 0:d6269d17c8cf 63
jah128 0:d6269d17c8cf 64 /* ENABLE_BLUETOOTH [1=on, 0=off]: Enable if the BlueSmirf module is being used */
jah128 11:312663037b8c 65 /** @brief Enable if the BlueSmirf module is being used. 0=off 1=on*/
jah128 0:d6269d17c8cf 66 #define ENABLE_BLUETOOTH 1
jah128 0:d6269d17c8cf 67
jah128 0:d6269d17c8cf 68 /* ENABLE_PC_SERIAL [1=on, 0=off]: Enable if the PC USB serial module is being used */
jah128 0:d6269d17c8cf 69 #define ENABLE_PC_SERIAL 1
jah128 0:d6269d17c8cf 70
jah128 0:d6269d17c8cf 71 /* BLUETOOTH_BAUD [recommended=115200]: Baud rate for the BlueSMIRF module */
jah128 0:d6269d17c8cf 72 #define BLUETOOTH_BAUD 115200
jah128 0:d6269d17c8cf 73
jah128 0:d6269d17c8cf 74 /* PC_BAUD [recommended=460800 for optimal performance, 115200 for compatability]: Baud rate for the PC USB serial module */
jah128 0:d6269d17c8cf 75 //#define PC_BAUD 460800
jah128 0:d6269d17c8cf 76 #define PC_BAUD 115200
jah128 0:d6269d17c8cf 77
jah128 0:d6269d17c8cf 78 /* DEBUG_MODE [1=on, 0=off]: Enable to allow debug messages to be sent of one of the serial interfaces */
jah128 0:d6269d17c8cf 79 #define DEBUG_MODE 1
jah128 0:d6269d17c8cf 80
jah128 0:d6269d17c8cf 81 /* SHOW_VR_WARNINGS [1=on, 0=off]: Show voltage-regulator debug message warnings after initial boot-up */
jah128 0:d6269d17c8cf 82 #define SHOW_VR_WARNINGS 0
jah128 0:d6269d17c8cf 83
jah128 0:d6269d17c8cf 84 /* USE_LED3_FOR_INTERRUPTS [1=on, 0=off]: Switch interrupts will appear as the lighting of LED3 on MBED */
jah128 0:d6269d17c8cf 85 #define USE_LED3_FOR_INTERRUPTS 1
jah128 0:d6269d17c8cf 86
jah128 0:d6269d17c8cf 87 /* USE_LED4_FOR_VR_WARNINGS [1=on, 0=off]: Voltage-regulator warnings will appear as the lighting of LED4 on MBED */
jah128 0:d6269d17c8cf 88 #define USE_LED4_FOR_VR_WARNINGS 1
jah128 0:d6269d17c8cf 89
jah128 0:d6269d17c8cf 90 /* HALT_ON_GPIO_ERROR [1=on, 0=off]: Halts system if no GPIO response received during init() - typically this happens when MBED is powered but robot is switched off */
jah128 0:d6269d17c8cf 91 #define HALT_ON_GPIO_ERROR 1
jah128 0:d6269d17c8cf 92
jah128 0:d6269d17c8cf 93 /* HALT_ON_ALL_VREGS_LOW [1=on, 0=off]: Halts system when all 3.3V voltage regulators are low on boot-up - typically this happens when MBED is powered but robot is switched off */
jah128 0:d6269d17c8cf 94 #define HALT_ON_ALL_VREGS_LOW 0
jah128 0:d6269d17c8cf 95
jah128 0:d6269d17c8cf 96 /* DEBUG_OUTPUT_STREAM [1=PC\USB 2=BlueSmirf 4=Display]: Specify which output stream(s) should be used by default for debug messages, if enabled*/
jah128 0:d6269d17c8cf 97 #define DEBUG_OUTPUT_STREAM 1
jah128 11:312663037b8c 98
jah128 11:312663037b8c 99 #endif
jah128 11:312663037b8c 100