• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
First fare 2010 java-beta-2011
 

First fare 2010 java-beta-2011

on

  • 900 views

 

Statistics

Views

Total Views
900
Views on SlideShare
898
Embed Views
2

Actions

Likes
0
Downloads
0
Comments
0

1 Embed 2

http://www.team1540.org 2

Accessibility

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    First fare 2010 java-beta-2011 First fare 2010 java-beta-2011 Document Transcript

    • New Features for <br />FRC Java Programming <br />(Report on Java Beta Software 2011)<br />Andrew MerrillSoftware Mentor, FRC Team 1540Computer Science Teacher, Catlin Gabel School<br />Smart Dashboard<br />New class SmartDashboard<br />Convenient way to log diagnostic info to a remote display<br />New Java client that runs on desktop/laptop computer<br />Client program automatically displays logged fields without needing configuration<br />Example:<br />SmartDashboard.init();SmartDashboard.log("Disabled", "System State");SmartDashboard.log(leftDrive.get(), "Left Drive");SmartDashboard.log(rightDrive.get(), "Right Drive");SmartDashboard.log(rollerAvg, "Roller Avg. Value");SmartDashboard.log(basket.hasBall(), "Ball in Robot");<br /> INCLUDEPICTURE d "Macintosh HD:Users:bob:Dropbox:Documents:WebSites:OregonFIRST:Events:FIRSTFare:FIRSTFare2010:documents-export-2011-10-16.zip Folder:../../../AppData/Local/Temp/moz-screenshot.jpg" x y * MERGEFORMATINET Safe Motors<br />New interface MotorSafety, new classes SafePWM and MotorSafetyHelper<br />A safe motor shuts itself off if you stop sending it PWM signals<br />You configure how long the motor waits until shutoff<br />Motor starts working again when you send it a new PWM signal<br />Motors controlled by the RobotDrive class are automatically "safe"<br />Other motors are not "safe" by default<br />Example of making a "safe" Jaguar controlled motor:<br />        Jaguar driveMotor = new Jaguar(1);        driveMotor.setSafetyEnabled(true);        driveMotor.setExpiration(5);Driver Station Enhanced IO<br />New class DriverStationEnhancedIO<br />More access to the Cypress add-on module on the driver station<br />Example of using the DriverStationEnhancedIO class:<br />   DriverStationEnhancedIO dseio =       DriverStation.getInstance().getEnhancedIO();   double accelX =        dseio.getAcceleration(dseio.tAccelChannel.kAccelX);    double slider = dseio.getTouchSlider();   dseio.setLED(1, true);Accelerometer over I2C<br />New class ADXL345_I2C<br />Provides access to the ADXL 345 Accelerometer over the I2C interface<br />Previously, accelerometer access was via analog inputs<br />Example code:<br />  ADXL345_I2C accelerometer =      new ADXL345_I2C(1, ADXL345_I2C.DataFormat_Range.k4G);  double ax =      accelerometer.getAcceleration(ADXL345_I2C.Axes.kX);New Image Processing Capabilities<br />The package edu.wpi.first.wpilibj.image has new classes:<br />CurveOptions<br />EllipseDescriptor<br />EllipseMatch<br />RegionOfInterest<br />ShapeDetectionOptions<br />The MonoImage class has a new detectEllipses method<br />Miscellaneous Changes<br />The package com.sun.spot.ota has been removed<br />but the com.sun.spot.ota.VxWorks class was moved to the com.ni.rio package<br />The package com.sun.cldc.io was added<br />it contains only the ConnectionBaseInterface interface<br />The package com.sun.cldc.jna has two new classes:<br />BlockingFunction and TaskExecutor<br />The package com.sun.squawk has four new classes:<br />CallbackManager, CrossIsolateThread, DoBlock, ResourceFile<br />The package com.sun.squawk.io.j2me.multicast has been renamed<br />The new name is com.sun.squawk.io.j2me.multicastoutput <br />Two interfaces from com.sun.squawk.microedition.io were moved <br />ServerSocketConnection, SocketConnection are now in javax.microedition.io<br />The package com.sun.squawk.pragma has been added<br />The package com.sun.squawk.security.verifier has been removed<br />The package con.sun.squawk.util has a new SquawkHashtable<br />