Skip to content

Commit

Permalink
Tried to fix stuff, got rid of the other lcd code and replaced with o…
Browse files Browse the repository at this point in the history
…ther code. It still drives, but the sensitivity doesn’t work yet.
  • Loading branch information
floogulinc committed Jan 22, 2014
1 parent ae8c728 commit 2a23531
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 252 deletions.
9 changes: 5 additions & 4 deletions nbproject/project.bak.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
This is a sample netbeans project file for a Sun Spot Application project.
You may edit it freely, it doesn't affect the ant-powered build.
Expand Down Expand Up @@ -81,11 +82,11 @@
<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
<compilation-unit>
<package-root>src</package-root>
<classpath mode="boot">${sunspot.bootclasspath}</classpath>
<classpath mode="compile">${wpilibj.home}/classes.jar</classpath>
<classpath mode="boot">${sunspot.home}/lib/squawk.jar</classpath>
<classpath mode="compile">${sunspot.home}/lib/wpilibj.jar:${sunspot.home}/lib/networktables-crio.jar</classpath>
<built-to>build</built-to>
<source-level>1.4</source-level>
</compilation-unit>
</java-data>
</configuration>
</project>
</project>
88 changes: 88 additions & 0 deletions src/com/frc2879/bender/DSOutput.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

package com.frc2879.bender;

import edu.wpi.first.wpilibj.DriverStationLCD;

/**
* Utilities for managing the Driver Station output window.
* <p/>
* @author Chris Cheng
* @author Ben
* @version 2011
*/
public class DSOutput {

static DriverStationLCD output;

/**
* Make a new DSOutput instance. Not hard.
*/
public DSOutput() {
output = DriverStationLCD.getInstance();
}

/**
* Display a line of text without scrolling. Max 21 characters / line.
* <p/>
* @param ln Which line to print in
* @param msg What message to display
*/
public void say(int ln, String msg) {
if(msg == null) {
msg = "null message passed";
}
// DriverStationLCD.kLineLength=21
// Add 21 spaces to clear the rest of the line
msg += " ";
// If the given message is too long, truncate it
if(msg.length() > 21) {
msg = msg.substring(0, 21);
}

switch(ln) {
case (1):
output.println(DriverStationLCD.Line.kMain6, 1, msg);
break;
case (2):
output.println(DriverStationLCD.Line.kUser2, 1, msg);
break;
case (3):
output.println(DriverStationLCD.Line.kUser3, 1, msg);
break;
case (4):
output.println(DriverStationLCD.Line.kUser4, 1, msg);
break;
case (5):
output.println(DriverStationLCD.Line.kUser5, 1, msg);
break;
case (6):
output.println(DriverStationLCD.Line.kUser6, 1, msg);
break;
}
// Show the message
output.updateLCD();
}

/**
* Clear the entire output box.
*/
public void clearOutput() {
say(1, " ");
say(2, " ");
say(3, " ");
say(4, " ");
say(5, " ");
say(6, " ");
output.updateLCD();
}
public void clearLine(int line){
say(line, " ");
// Show the message
output.updateLCD();
}
}
236 changes: 0 additions & 236 deletions src/com/frc2879/bender/DStation.java

This file was deleted.

Loading

0 comments on commit 2a23531

Please sign in to comment.