revrobotics / color-sensor-v3 Goto Github PK
View Code? Open in Web Editor NEWSource code for REV Color Sensor V3
Home Page: http://www.revrobotics.com/rev-31-1557/
License: BSD 3-Clause "New" or "Revised" License
Source code for REV Color Sensor V3
Home Page: http://www.revrobotics.com/rev-31-1557/
License: BSD 3-Clause "New" or "Revised" License
For the file ColorSensorV3.java there is an issue with the enum declarations.
The enums which are used by the public configure methods (e.g. configureColorSensor(ColorSensorResolution res, ColorSensorMeasurementRate rate, GainFactor gain) are declared with default visibility but should be public. Default visibility restricts them to use within the same package (com.revrobotics).
The following code fails to compile because the package is not part of com.revrobotics
package frc.robot;
import edu.wpi.first.wpilibj.TimedRobot;
import edu.wpi.first.wpilibj.I2C;
import com.revrobotics.ColorSensorV3;
public class Robot extends TimedRobot {
ColorSensorV3 m_sensor;
public Robot() {
m_sensor = new ColorSensorV3(I2C.Port.kOnboard);
m_sensor.configureColorSensor(ColorSensorV3.ColorSensorResolution.kColorSensorRes16bit,
ColorSensorV3.ColorSensorMeasurementRate.kColorRate50ms,
ColorSensorV3.GainFactor.kGain1x);
}
}
If the delcarations in ColorSensorV3.java are changed from
enum ColorSensorResolution { ...
to
public enum ColorSensorResolution { ...
the code will compile.
The enums aren't public and they are only visible in the package.
We would like to use ColorSensorResolution
and ProximitySensorMeasurementRate
enums in our code but they are not public in the current release.
Can the WPILib GradleRIO vendordeps JSON file (http://www.revrobotics.com/content/sw/color-sensor-v3/sdk/REVColorSensorV3.json) be updated with the latest code so we can access these enums?
Similar to this method, but public: https://github.com/REVrobotics/Color-Sensor-v3/blob/master/src/main/java/com/revrobotics/ColorSensorV3.java#L397
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.