mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing. Added Omar's changes to the compressor interface Fixes to make C++ plugin compile on linux. Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal. Fixed wpilibJavaSim artifactId to mirror the new convention. Modified the build of the java plugin to pull in the simulation dependencies. Added stacktrace printing. Fixed support for creating projects. Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot. Added support for a "WPILib Simulate" button. Added GearsBot to the built in examples. Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot. Removed unused import. Added file browser for world files. Added support for debugging in simulation. Change simulate icon to be a Gazebo icon. Switched over to the gazebo messaging system. Updated location of default world file. Reverted cmake change. Fixed bug in WPILibJSim, added better logging and cleaned up code. Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies. Added installation to frc_gazebo_plugin Makefile. Fixed running of simulation to actually use frcsim. Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode. Added notes for generating protobuf messages. Import of the debuild process into the main repository. Moved frc_gazebo_plugin under simulation and removed the gazebo folder. Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1]. Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot. Reduced delay between starting frcsim and the users program to 1 second. Updated GearsBot example. Fixed a few minor issues for demoable state. Added simulator support for Victors, Jaguars and Talons. Added NetworkTables, SmartDashboard and LiveWindow to the simulator. Added AnalogPotentiometer for simulation. Added support for simulating encoders. Added simulation support for Gyro. Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup. Added RobotDrive support to simulation. Separated out JavaGazebo so that SimDS will be able to reuse it. Separated out SimDS into its own application.. Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins. Added DriverStation support to WPILibCSim Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim. Cleanup of includes for WPILibCSim Added AnalogPotentiometer to the real WPILibC. Added AnalogPotentiometer to the real WPILibC. Added GearsBot example to C++ eclipse plugin. WPILibCSim fixes to work with launching from the plugin. Package libwpilibsim in a deb file. Added includes to plugin distribution. Added support for external-limit-switches to Gazebo, Java and C++. Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java. Added support for internal limit switches. Updated GearsBot programs to use limit switches + range finders. Added disabling of motors when robot is disabled to more closely mimic the real robot. Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing. Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
80 lines
4.6 KiB
C
80 lines
4.6 KiB
C
/*----------------------------------------------------------------------------*/
|
|
/* Copyright (c) FIRST 2008. All Rights Reserved. */
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
#ifndef __WPI_ERRORS_H__
|
|
#define __WPI_ERRORS_H__
|
|
|
|
#ifdef WPI_ERRORS_DEFINE_STRINGS
|
|
#define S(label, offset, message) const char *wpi_error_s_##label = message ;
|
|
#else
|
|
#define S(label, offset, message) extern const char *wpi_error_s_##label;
|
|
#endif
|
|
|
|
/*
|
|
* Fatal errors
|
|
*/
|
|
S(ModuleIndexOutOfRange, -1, "Allocating module that is out of range or not found");
|
|
S(ChannelIndexOutOfRange, -1, "Allocating channel that is out of range");
|
|
S(NotAllocated, -2, "Attempting to free unallocated resource");
|
|
S(ResourceAlreadyAllocated, -3, "Attempted to reuse an allocated resource");
|
|
S(NoAvailableResources, -4, "No available resources to allocate");
|
|
S(NullParameter, -5, "A pointer parameter to a method is NULL");
|
|
S(Timeout, -6, "A timeout has been exceeded");
|
|
S(CompassManufacturerError, -7, "Compass manufacturer doesn't match HiTechnic");
|
|
S(CompassTypeError, -8, "Compass type doesn't match expected type for HiTechnic compass");
|
|
S(IncompatibleMode, -9, "The object is in an incompatible mode");
|
|
S(AnalogTriggerLimitOrderError, -10, "AnalogTrigger limits error. Lower limit > Upper Limit");
|
|
S(AnalogTriggerPulseOutputError, -11, "Attempted to read AnalogTrigger pulse output.");
|
|
S(TaskError, -12, "Task can't be started");
|
|
S(TaskIDError, -13, "Task error: Invalid ID.");
|
|
S(TaskDeletedError, -14, "Task error: Task already deleted.");
|
|
S(TaskOptionsError, -15, "Task error: Invalid options.");
|
|
S(TaskMemoryError, -16, "Task can't be started due to insufficient memory.");
|
|
S(TaskPriorityError, -17, "Task error: Invalid priority [1-255].");
|
|
S(DriveUninitialized, -18, "RobotDrive not initialized for the C interface");
|
|
S(CompressorNonMatching, -19, "Compressor slot/channel doesn't match previous instance");
|
|
S(CompressorAlreadyDefined, -20, "Creating a second compressor instance");
|
|
S(CompressorUndefined, -21, "Using compressor functions without defining compressor");
|
|
S(InconsistentArrayValueAdded, -22, "When packing data into an array to the dashboard, not all values added were of the same type.");
|
|
S(MismatchedComplexTypeClose, -23, "When packing data to the dashboard, a Close for a complex type was called without a matching Open.");
|
|
S(DashboardDataOverflow, -24, "When packing data to the dashboard, too much data was packed and the buffer overflowed.");
|
|
S(DashboardDataCollision, -25, "The same buffer was used for packing data and for printing.");
|
|
S(EnhancedIOMissing, -26, "IO is not attached or Enhanced IO is not enabled.");
|
|
S(LineNotOutput, -27, "Cannot SetDigitalOutput for a line not configured for output.");
|
|
S(ParameterOutOfRange, -28, "A parameter is out of range.");
|
|
S(SPIClockRateTooLow, -29, "SPI clock rate was below the minimum supported");
|
|
S(JaguarVersionError, -30, "Jaguar firmware version error");
|
|
S(NetworkTablesReadError, -40, "Error reading NetworkTables socket");
|
|
S(NetworkTablesBufferFull, -41, "Buffer full writing to NetworkTables socket");
|
|
S(NetworkTablesWrongType, -42, "The wrong type was read from the NetworkTables entry");
|
|
S(NetworkTablesCorrupt, -43, "NetworkTables data stream is corrupt");
|
|
S(SmartDashboardMissingKey, -43, "SmartDashboard data does not exist");
|
|
S(CommandIllegalUse, -50, "Illegal use of Command");
|
|
S(UnsupportedInSimulation, -80, "Unsupported in simulation");
|
|
|
|
/*
|
|
* Warnings
|
|
*/
|
|
S(SampleRateTooHigh, 1, "Analog module sample rate is too high");
|
|
S(VoltageOutOfRange, 2, "Voltage to convert to raw value is out of range [-10; 10]");
|
|
S(CompressorTaskError, 3, "Compressor task won't start");
|
|
S(LoopTimingError, 4, "Digital module loop timing is not the expected value");
|
|
S(NonBinaryDigitalValue, 5, "Digital output value is not 0 or 1");
|
|
S(IncorrectBatteryChannel, 6, "Battery measurement channel is not correct value");
|
|
S(BadJoystickIndex, 7, "Joystick index is out of range, should be 1-4");
|
|
S(BadJoystickAxis, 8, "Joystick axis is out of range");
|
|
S(InvalidMotorIndex, 9, "Motor index is out of range, should be 0-3");
|
|
S(DriverStationTaskError, 10, "Driver Station task won't start");
|
|
S(EnhancedIOPWMPeriodOutOfRange, 11, "Driver Station Enhanced IO PWM Output period out of range.");
|
|
S(SPIWriteNoMOSI, 12, "Cannot write to SPI port with no MOSI output");
|
|
S(SPIReadNoMISO, 13, "Cannot read from SPI port with no MISO input");
|
|
S(SPIReadNoData, 14, "No data available to read from SPI");
|
|
S(IncompatibleState, 15, "Incompatible State: The operation cannot be completed");
|
|
|
|
#undef S
|
|
|
|
#endif // __WPI_ERRORS_H__
|