Git Product home page Git Product logo

color-sensor-v3's People

Contributors

jfabellera avatar lhvy avatar peterjohnson avatar ryanj1234 avatar willtoth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

color-sensor-v3's Issues

Visibility of ColorSensorv3 enums

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.