Comments (6)
You need to cast the object if you want it as a HiTechnicNxtGyroSensor
, although there is no reason to since that class doesn't have any methods other than those in GyroSensor
.
from ftc_app.
Unless I am understanding it wrong what you should be doing is something like
HiTechnicNxtGyroSensor gyro;
gyro = hardwareMap.HiTechnicNxtGyroSensor.get("gyro_1");
which returns the error Error:(81, 28) error: cannot find symbol variable HiTechnicNxtGyroSensor
from ftc_app.
Really what you should be doing is GyroSensor sensor = this.hardwareMap.gyroSensor.get("sensorName");
from ftc_app.
And so that will work even if I am using the NXT Gyro Sensor?
from ftc_app.
You will get an instance of GyroSensor
. If your configuration file specifies that the name you provided is for a HiTechnic gyro, then that object will be of type HiTechnicNxtGyroSensor
, even though it is being stored in a variable of type GyroSensor
. When you call getRotation()
on it, it will return the result of calling getRotation()
on any object of type HiTechnicNxtGyroSensor
.
from ftc_app.
Can this be closed?
from ftc_app.
Related Issues (20)
- Hardware remains powered on app restart HOT 6
- Incorrect motor configuration data HOT 6
- How to send data through i2c? trying to communicate with Pixy2 camera HOT 3
- OnBot SDK is different than Android Studio SDK HOT 13
- v5.0 SDK Available HOT 4
- no link to 5.0 HOT 1
- Robot Controller Does not See Rev Expansion Hub
- BUG: OnBot Java overwrites files HOT 19
- Robot Controller does not detect more than 1 device HOT 6
- Pairing and troubleshooting instructions absent HOT 1
- OnBotJava loses Intellisense HOT 1
- Error in code is pointing to non existent source files HOT 4
- Op mode stuck in the init (HELP) how do we get rid of this message HOT 1
- I can't press the Init Button HOT 8
- RC stuck in initialization w/ warning contains RUN_TO_POSITION HOT 3
- Robot Controller Will Not Connect To REV Expansion Hub HOT 8
- Webcam Consistently Crashing on Init HOT 11
- Wiki update: no instant run in AS v. 3.5 or higher HOT 2
- LynxModule retransmitting happens randomly in autonomous run, block TeamCode from execution half second to 2 seconds. HOT 4
- Driver for Grove AS5600 magnetic rotary position sensor HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ftc_app.