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 settings.h Source File

settings.h

Go to the documentation of this file.
00001 /* University of York Robotics Laboratory PsiSwarm Library: PsiSwarm Settings 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: settings.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 /*! \file settings.h
00024     \brief Header file containing PsiSwarm define headings
00025     \brief USE_MOTOR_CALIBRATION Enable motor calibration using stored values. 
00026     If enabled, the actual motor speeds will be adjusted from the requested values using the motor calibration values stored in EPROM.
00027     \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. 
00028     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
00029     
00030 */
00031 
00032 #ifndef SETTINGS_H
00033 #define SETTINGS_H
00034 
00035 /* USE_MOTOR_CALIBRATION [1=on, recommended      0=off]
00036  * If enabled, the actual motor speeds will be adjusted from the requested values using the motor calibration values stored in
00037  * firmware (and set using the motor calibration code in the demo mode)
00038  */
00039 #define USE_MOTOR_CALIBRATION 1
00040 
00041 /* OFFSET_MOTORS [1=on, recommended      0=off]
00042  * The motors typically stall when the PWM output is below around 0.2
00043  * 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
00044  */
00045 #define OFFSET_MOTORS 1 
00046 
00047 /* ENABLE_DEMO [1=on, 0=off]
00048  * If enabled the demo mode will be launched when the center button is held as the MBED is switched on or reset
00049  */
00050 #define ENABLE_DEMO 1
00051 
00052 
00053 /* ENABLE_BASIC [1=on, 0=off]:  Enable if the Psi-BASIC Interpretter is being used */
00054 #define ENABLE_BASIC 1
00055 
00056 /* SERIAL INTERFACES SETTINGS 
00057  * __________________________
00058  *
00059  * The Psi-Swarm can communicate using both the USB PC-Serial interface or via Bluetooth using a BlueSMIRF module
00060  *
00061  *
00062  */
00063 
00064 /* ENABLE_BLUETOOTH [1=on, 0=off]:  Enable if the BlueSmirf module is being used */
00065 /** @brief Enable if the BlueSmirf module is being used. 0=off 1=on*/
00066 #define ENABLE_BLUETOOTH 1
00067 
00068 /* ENABLE_PC_SERIAL [1=on, 0=off]:  Enable if the PC USB serial module is being used */
00069 #define ENABLE_PC_SERIAL 1
00070 
00071 /* BLUETOOTH_BAUD [recommended=115200]:  Baud rate for the BlueSMIRF module */
00072 #define BLUETOOTH_BAUD 115200
00073 
00074 /* PC_BAUD [recommended=460800 for optimal performance, 115200 for compatability]:  Baud rate for the PC USB serial module */
00075 //#define PC_BAUD 460800
00076 #define PC_BAUD 115200
00077 
00078 /* DEBUG_MODE [1=on, 0=off]:  Enable to allow debug messages to be sent of one of the serial interfaces */
00079 #define DEBUG_MODE 1
00080 
00081 /* SHOW_VR_WARNINGS [1=on, 0=off]:   Show voltage-regulator debug message warnings after initial boot-up */
00082 #define SHOW_VR_WARNINGS 0
00083 
00084 /* USE_LED3_FOR_INTERRUPTS [1=on, 0=off]:  Switch interrupts will appear as the lighting of LED3 on MBED */
00085 #define USE_LED3_FOR_INTERRUPTS 1
00086 
00087 /* USE_LED4_FOR_VR_WARNINGS [1=on, 0=off]:  Voltage-regulator warnings will appear as the lighting of LED4 on MBED */
00088 #define USE_LED4_FOR_VR_WARNINGS 1
00089 
00090 /* 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 */
00091 #define HALT_ON_GPIO_ERROR 1
00092 
00093 /* 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 */
00094 #define HALT_ON_ALL_VREGS_LOW 0
00095 
00096 /* 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*/
00097 #define DEBUG_OUTPUT_STREAM 1
00098 
00099 #endif
00100