Compare commits

...

20 Commits

Author SHA1 Message Date
Brad Miller
cad83ed3ca Bump the version number for the windows toolchains to force them to reload.
Change-Id: Ib095d5c1caf51739cc1b5bee1680592e0cfc34de
2014-09-18 17:18:03 -04:00
Kevin O'Connor
62d6579428 Add missing semi-colon to cproject file
Change-Id: I540730c3a4be32c6a636296ce36aab5b230afc8a
2014-09-16 00:50:43 -04:00
Brad Miller (WPI)
1d7b17a2ba Merge "Add quotes around linker flag path to libs (fixes artf2390 / artf3453)" 2014-09-15 09:17:01 -07:00
Brad Miller
738859c4ea Fixed bug where mac toolchains always reinstall on Eclipse start
Change-Id: Id94631162efe5766feedac2979264fe17e09b5eb
2014-09-14 15:31:56 -04:00
Patrick Plenefisch
127ff0ac0a Fixing extraction recursion: use provided version
Change-Id: I0aa0a66eae85a43df308b4c0dafbe6b953ffad5c
2014-09-14 15:31:50 -04:00
Patrick Plenefisch
472f51fc73 Add version=current to global wpilib.properties file on any property save
Change-Id: I6dc6eeac27ab97be567450c90f50ace7da6679b7
2014-09-13 18:36:02 -04:00
Brad Miller (WPI)
0f0850ca95 Merge "Update to v14 headers and libraries" 2014-09-11 08:12:45 -07:00
Thomas Clark
ab27f795b7 Update to v14 headers and libraries
Change-Id: Ibc28fc73c36acf6d9d15b3f255cbf93ad6ad70a8
2014-09-10 14:43:53 -04:00
Thomas Clark
b16a037759 Store preferences in a directory writable by lvuser
Change-Id: I1ed43968c2be76bfcb050a115f59517c398efff3
2014-09-10 14:05:51 -04:00
Brad Miller
1e812ac4d9 Added comments to the compressor class per artf3527.
Change-Id: I48d0d16242da064e8502e6fbddccca82dc680044

Updated comments with a few more details

Change-Id: Icab1698f2ea4e2032e50cbf5ac63341ba5ee1dcf
2014-09-10 12:02:13 -04:00
Brad Miller (WPI)
ecc6815f68 Merge "Fix status buffer allocation in SolenoidBase" 2014-09-10 08:57:53 -07:00
Brad Miller (WPI)
ca9f5a676d Merge "Make all channel errors throw IndexOutOfBounds" 2014-09-10 08:57:35 -07:00
Thomas Clark
debf9e0ee9 Make all channel errors throw IndexOutOfBounds
Only relay and PWM channels out of range used to throw
IndexOutOfBoundsExceptions, but Resource would catch the error
first in most cases.

Change-Id: I8feb0daf378e181f982203d46bf5a10dbde4a02e
2014-09-10 11:54:57 -04:00
Thomas Clark
15abbb36c2 Fix status buffer allocation in SolenoidBase
This fixes [artf3488] and [artf3506]

Change-Id: I6e89fc7bfc8d6c38a4bbf364a0fad412ab54e225
2014-09-10 11:36:50 -04:00
Kevin O'Connor
d9b974300f Add quotes around linker flag path to libs (fixes artf2390 / artf3453)
Change-Id: I0d4aac49edb0e93f0bfd2cc8937eca476deafc4c
2014-09-08 14:45:08 -04:00
Brad Miller
e60baf41a9 Added the "version=current" property to allow projects to correctly reference the updated installation
Change-Id: Ia6f45fab6b1d279e89129d9a0350b8aa7cf8c98a
2014-09-06 23:50:06 +00:00
Brad Miller (WPI)
09cb3a22cd Merge "Change the tail command for capturing the logs on deployment to check the file every second instead of continuously to avoid the 100% CPU time problem from artf3524" 2014-09-06 15:47:07 -07:00
Brad Miller
27ecd35834 Change the tail command for capturing the logs on deployment to check the file every second instead of continuously to avoid the 100% CPU time problem from artf3524 2014-09-06 18:41:05 -04:00
Patrick Plenefisch
ff6d180305 Revert "Fixing java version number to be current"
This reverts commit 410b739c23.
2014-09-06 18:19:25 -04:00
Patrick Plenefisch
410b739c23 Fixing java version number to be current
Change-Id: I4d124921f5735cc2a7ff24eba10246eb9e57a67b
2014-09-06 17:23:06 -04:00
59 changed files with 177 additions and 109 deletions

View File

@@ -1,10 +1,12 @@
cmake_minimum_required(VERSION 2.8)
INCLUDE(CMakeForceCompiler)
set(ARM_PREFIX arm-none-linux-gnueabi)
#set(ARM_PREFIX arm-frc-linux-gnueabi)
set(CMAKE_SYSTEM_NAME Linux)
CMAKE_FORCE_CXX_COMPILER(${ARM_PREFIX}-g++ GNU)
CMAKE_FORCE_C_COMPILER(${ARM_PREFIX}-gcc GNU)
set(CMAKE_CXX_FLAGS "-march=armv7-a -mcpu=cortex-a9 -mfloat-abi=softfp -Wall -Wno-psabi" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -g" CACHE STRING "" FORCE) # still want debugging for release?
#SET(CMAKE_FIND_ROOT_PATH /usr/arm-frc-linux-gnueabi)
SET(CMAKE_FIND_ROOT_PATH $ENV{USER_HOME}/wpilib/toolchains/arm-none-linux-gnueabi-4.4.1/arm-none-linux-gnueabi/libc)

View File

@@ -105,6 +105,7 @@ public class WPILibCore extends AbstractUIPlugin {
public void saveGlobalProperties(Properties props) {
try {
props.setProperty("version", "current");
props.store(new FileOutputStream(new File(WPILibCore.getDefault()
.getWPILibBaseDir() + "/wpilib.properties")),
"Don't add new properties, they will be deleted by the eclipse plugin.");

View File

@@ -23,7 +23,7 @@ public class ToolchainInstaller extends AbstractInstaller {
@Override
protected void updateInstalledVersion(String version) {
WPILibCPPPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.TOOLCHAIN_INSTALLED,
WPILibCPPPlugin.getDefault().getCurrentVersion());
version);
}
@Override

View File

@@ -12,7 +12,8 @@ public class ToolchainInstaller extends AbstractInstaller {
public ToolchainInstaller(String version) {
super(version,
WPILibCPPPlugin.getDefault().getPreferenceStore().getString(PreferenceConstants.TOOLCHAIN_INSTALLED), WPILibCPPPlugin.getDefault().getToolchain());
WPILibCPPPlugin.getDefault().getPreferenceStore().getString(PreferenceConstants.TOOLCHAIN_INSTALLED),
WPILibCPPPlugin.getDefault().getToolchain());
}
@Override
@@ -22,13 +23,12 @@ public class ToolchainInstaller extends AbstractInstaller {
@Override
protected void updateInstalledVersion(String version) {
WPILibCPPPlugin.getDefault().getPreferenceStore().setDefault(PreferenceConstants.TOOLCHAIN_INSTALLED,
WPILibCPPPlugin.getDefault().getCurrentVersion());
WPILibCPPPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.TOOLCHAIN_INSTALLED,
version);
}
@Override
protected InputStream getInstallResourceStream() {
return ToolchainInstaller.class.getResourceAsStream("/resources/toolchain.zip");
}
}

View File

@@ -2,7 +2,7 @@
<feature
id="edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.feature"
label="Windows Toolchain for Robot C++ Development"
version="0.2.0"
version="0.3.0"
provider-name="Worcester Polytechnic Institute"
os="win32">

View File

@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.feature</artifactId>
<version>0.2.0</version>
<version>0.3.0</version>
<packaging>eclipse-feature</packaging>
<parent>

View File

@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Windows
Bundle-SymbolicName: edu.wpi.first.wpilib.plugins.cpp.toolchains.windows;singleton:=true
Bundle-Version: 0.2.0
Bundle-Version: 0.3.0
Bundle-Activator: edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,

View File

@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.windows</artifactId>
<version>0.2.0</version>
<version>0.3.0</version>
<packaging>eclipse-plugin</packaging>
<parent>

View File

@@ -23,7 +23,7 @@ public class ToolchainInstaller extends AbstractInstaller {
@Override
protected void updateInstalledVersion(String version) {
WPILibCPPPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.TOOLCHAIN_INSTALLED,
WPILibCPPPlugin.getDefault().getCurrentVersion());
version);
}
@Override

View File

@@ -57,7 +57,7 @@
<listOptionValue builtIn="false" value="dl"/>
<listOptionValue builtIn="false" value="pthread"/>
</option>
<option id="gnu.cpp.link.option.flags.1747959472" name="Linker flags" superClass="gnu.cpp.link.option.flags" value="-Wl,-rpath-link,$cpp-location/lib" valueType="string"/>
<option id="gnu.cpp.link.option.flags.1747959472" name="Linker flags" superClass="gnu.cpp.link.option.flags" value="-Wl,-rpath-link,&quot;$cpp-location/lib&quot;" valueType="string"/>
<option id="gnu.cpp.link.option.other.1891020896" name="Other options (-Xlinker [option])" superClass="gnu.cpp.link.option.other" valueType="stringList">
<listOptionValue builtIn="false" value="-export-dynamic"/>
</option>

View File

@@ -20,7 +20,7 @@ public class CPPInstaller extends AbstractInstaller {
@Override
protected void updateInstalledVersion(String version) {
WPILibCPPPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.LIBRARY_INSTALLED,
WPILibCPPPlugin.getDefault().getCurrentVersion());
version);
}
@Override

View File

@@ -46,7 +46,7 @@
username="${username}"
password="${password}"
trust="true"
command="tail -F -s 0 -n 0 ${deploy.log.file}"/>
command="tail -F -n 0 ${deploy.log.file}"/>
</target>
<target name="kill-program" depends="get-target-ip" description="Kill the currently running FRC program">

View File

@@ -4,9 +4,10 @@ password=
deploy.dir=/home/admin
deploy.kill.command=. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r
deploy.log.file=/var/local/natinst/log/FRC_UserProgram.log
deploy.log.command=tail -F -s 0 -n 0 ${deploy.log.file}
deploy.log.command=tail -F -n 0 ${deploy.log.file}
debug.flag.dir=/tmp/
command.dir=/home/lvuser/
version=current
# Libraries to use
wpilib=${user.home}/wpilib/java/${version}

View File

@@ -12,7 +12,7 @@
<feature url="features/edu.wpi.first.wpilib.plugins.cpp.toolchains.mac.feature_0.2.0.jar" id="edu.wpi.first.wpilib.plugins.cpp.toolchains.mac.feature" version="0.2.0">
<category name="edu.wpi.first.wpilib.plugins.cpp.toolchains"/>
</feature>
<feature url="features/edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.feature_0.2.0.jar" id="edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.feature" version="0.2.0">
<feature url="features/edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.feature_0.3.0.jar" id="edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.feature" version="0.3.0">
<category name="edu.wpi.first.wpilib.plugins.cpp.toolchains"/>
</feature>
<category-def name="edu.wpi.first.wpilib.plugins" label="WPILib Robot Development">

View File

@@ -4,6 +4,6 @@
#ifndef __RoboRIO_FRC_ChipObject_Aliases_h__
#define __RoboRIO_FRC_ChipObject_Aliases_h__
#define nRoboRIO_FPGANamespace nFRC_2015_1_0_7
#define nRoboRIO_FPGANamespace nFRC_2015_1_0_8
#endif // __RoboRIO_FRC_ChipObject_Aliases_h__

View File

@@ -1,15 +1,15 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_nInterfaceGlobals_h__
#define __nFRC_2015_1_0_7_nInterfaceGlobals_h__
#ifndef __nFRC_2015_1_0_8_nInterfaceGlobals_h__
#define __nFRC_2015_1_0_8_nInterfaceGlobals_h__
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
extern unsigned int g_currentTargetClass;
}
}
#endif // __nFRC_2015_1_0_7_nInterfaceGlobals_h__
#endif // __nFRC_2015_1_0_8_nInterfaceGlobals_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_AI_h__
#define __nFRC_2015_1_0_7_AI_h__
#ifndef __nFRC_2015_1_0_8_AI_h__
#define __nFRC_2015_1_0_8_AI_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tAI
@@ -140,4 +140,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_AI_h__
#endif // __nFRC_2015_1_0_8_AI_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_AO_h__
#define __nFRC_2015_1_0_7_AO_h__
#ifndef __nFRC_2015_1_0_8_AO_h__
#define __nFRC_2015_1_0_8_AO_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tAO
@@ -47,4 +47,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_AO_h__
#endif // __nFRC_2015_1_0_8_AO_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_Accel_h__
#define __nFRC_2015_1_0_7_Accel_h__
#ifndef __nFRC_2015_1_0_8_Accel_h__
#define __nFRC_2015_1_0_8_Accel_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tAccel
@@ -99,4 +99,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_Accel_h__
#endif // __nFRC_2015_1_0_8_Accel_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_Accumulator_h__
#define __nFRC_2015_1_0_7_Accumulator_h__
#ifndef __nFRC_2015_1_0_8_Accumulator_h__
#define __nFRC_2015_1_0_8_Accumulator_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tAccumulator
@@ -84,4 +84,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_Accumulator_h__
#endif // __nFRC_2015_1_0_8_Accumulator_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_Alarm_h__
#define __nFRC_2015_1_0_7_Alarm_h__
#ifndef __nFRC_2015_1_0_8_Alarm_h__
#define __nFRC_2015_1_0_8_Alarm_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tAlarm
@@ -54,4 +54,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_Alarm_h__
#endif // __nFRC_2015_1_0_8_Alarm_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_AnalogTrigger_h__
#define __nFRC_2015_1_0_7_AnalogTrigger_h__
#ifndef __nFRC_2015_1_0_8_AnalogTrigger_h__
#define __nFRC_2015_1_0_8_AnalogTrigger_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tAnalogTrigger
@@ -126,4 +126,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_AnalogTrigger_h__
#endif // __nFRC_2015_1_0_8_AnalogTrigger_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_BIST_h__
#define __nFRC_2015_1_0_7_BIST_h__
#ifndef __nFRC_2015_1_0_8_BIST_h__
#define __nFRC_2015_1_0_8_BIST_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tBIST
@@ -87,4 +87,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_BIST_h__
#endif // __nFRC_2015_1_0_8_BIST_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_Counter_h__
#define __nFRC_2015_1_0_7_Counter_h__
#ifndef __nFRC_2015_1_0_8_Counter_h__
#define __nFRC_2015_1_0_8_Counter_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tCounter
@@ -216,4 +216,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_Counter_h__
#endif // __nFRC_2015_1_0_8_Counter_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_DIO_h__
#define __nFRC_2015_1_0_7_DIO_h__
#ifndef __nFRC_2015_1_0_8_DIO_h__
#define __nFRC_2015_1_0_8_DIO_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tDIO
@@ -245,4 +245,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_DIO_h__
#endif // __nFRC_2015_1_0_8_DIO_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_DMA_h__
#define __nFRC_2015_1_0_7_DMA_h__
#ifndef __nFRC_2015_1_0_8_DMA_h__
#define __nFRC_2015_1_0_8_DMA_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tDMA
@@ -185,4 +185,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_DMA_h__
#endif // __nFRC_2015_1_0_8_DMA_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_Encoder_h__
#define __nFRC_2015_1_0_7_Encoder_h__
#ifndef __nFRC_2015_1_0_8_Encoder_h__
#define __nFRC_2015_1_0_8_Encoder_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tEncoder
@@ -196,4 +196,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_Encoder_h__
#endif // __nFRC_2015_1_0_8_Encoder_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_Global_h__
#define __nFRC_2015_1_0_7_Global_h__
#ifndef __nFRC_2015_1_0_8_Global_h__
#define __nFRC_2015_1_0_8_Global_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tGlobal
@@ -101,4 +101,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_Global_h__
#endif // __nFRC_2015_1_0_8_Global_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_Interrupt_h__
#define __nFRC_2015_1_0_7_Interrupt_h__
#ifndef __nFRC_2015_1_0_8_Interrupt_h__
#define __nFRC_2015_1_0_8_Interrupt_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tInterrupt
@@ -90,4 +90,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_Interrupt_h__
#endif // __nFRC_2015_1_0_8_Interrupt_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_PWM_h__
#define __nFRC_2015_1_0_7_PWM_h__
#ifndef __nFRC_2015_1_0_8_PWM_h__
#define __nFRC_2015_1_0_8_PWM_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tPWM
@@ -80,6 +80,15 @@ public:
virtual unsigned char readPeriodScaleHdr(unsigned char bitfield_index, tRioStatusCode *status) = 0;
typedef enum
{
kNumZeroLatchElements = 20,
} tZeroLatch_IfaceConstants;
virtual void writeZeroLatch(unsigned char bitfield_index, bool value, tRioStatusCode *status) = 0;
virtual bool readZeroLatch(unsigned char bitfield_index, tRioStatusCode *status) = 0;
typedef enum
@@ -108,4 +117,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_PWM_h__
#endif // __nFRC_2015_1_0_8_PWM_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_Power_h__
#define __nFRC_2015_1_0_7_Power_h__
#ifndef __nFRC_2015_1_0_8_Power_h__
#define __nFRC_2015_1_0_8_Power_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tPower
@@ -214,4 +214,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_Power_h__
#endif // __nFRC_2015_1_0_8_Power_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_Relay_h__
#define __nFRC_2015_1_0_7_Relay_h__
#ifndef __nFRC_2015_1_0_8_Relay_h__
#define __nFRC_2015_1_0_8_Relay_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tRelay
@@ -65,4 +65,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_Relay_h__
#endif // __nFRC_2015_1_0_8_Relay_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_SPI_h__
#define __nFRC_2015_1_0_7_SPI_h__
#ifndef __nFRC_2015_1_0_8_SPI_h__
#define __nFRC_2015_1_0_8_SPI_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tSPI
@@ -65,4 +65,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_SPI_h__
#endif // __nFRC_2015_1_0_8_SPI_h__

View File

@@ -1,14 +1,14 @@
// Copyright (c) National Instruments 2008. All Rights Reserved.
// Do Not Edit... this file is generated!
#ifndef __nFRC_2015_1_0_7_SysWatchdog_h__
#define __nFRC_2015_1_0_7_SysWatchdog_h__
#ifndef __nFRC_2015_1_0_8_SysWatchdog_h__
#define __nFRC_2015_1_0_8_SysWatchdog_h__
#include "tSystemInterface.h"
namespace nFPGA
{
namespace nFRC_2015_1_0_7
namespace nFRC_2015_1_0_8
{
class tSysWatchdog
@@ -98,4 +98,4 @@ private:
}
}
#endif // __nFRC_2015_1_0_7_SysWatchdog_h__
#endif // __nFRC_2015_1_0_8_SysWatchdog_h__

BIN
ni-libraries/libFRC_NetworkCommunication.so.1.5.0 Executable file → Normal file

Binary file not shown.

BIN
ni-libraries/libFRC_NetworkCommunicationLV.so.1.5.0 Executable file → Normal file

Binary file not shown.

BIN
ni-libraries/libRoboRIO_FRC_ChipObject.so.1.2.0 Executable file → Normal file

Binary file not shown.

BIN
ni-libraries/libfrccanfirmwareupdate.so Executable file → Normal file

Binary file not shown.

Binary file not shown.

0
ni-libraries/libfrccansae.so.1.0.0 Executable file → Normal file
View File

Binary file not shown.

Binary file not shown.

BIN
ni-libraries/libi2c.so.1.0.0 Executable file → Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

0
ni-libraries/libspi.so.1.0.0 Executable file → Normal file
View File

View File

@@ -18,7 +18,7 @@ static const char *kTableName = "Preferences";
/** The value of the save field */
static const char *kSaveField = "~S A V E~";
/** The file to save to */
static const char *kFileName = "wpilib-preferences.ini";
static const char *kFileName = "/home/lvuser/wpilib-preferences.ini";
/** The characters to put between a field and value */
static const char *kValuePrefix = "=\"";
/** The characters to put after the value */

View File

@@ -10,7 +10,7 @@
#include <cstdio>
#include <fstream>
static const char *kFileName = "wpilib-preferences.ini";
static const char *kFileName = "/home/lvuser/wpilib-preferences.ini";
static const double kSaveTime = 0.2;
/**

View File

@@ -9,13 +9,36 @@ import edu.wpi.first.wpilibj.hal.HALUtil;
import edu.wpi.first.wpilibj.livewindow.LiveWindowSendable;
import edu.wpi.first.wpilibj.tables.ITable;
/**
* Class for operating the PCM (Pneumatics compressor module)
* The PCM automatically will run in close-loop mode by default whenever a Solenoid object is
* created. For most cases the Compressor object does not need to be
* instantiated or used in a robot program.
*
* This class is only required in cases where more detailed status or to enable/disable
* closed loop control. Note: you cannot operate the compressor directly from this class as
* doing so would circumvent the safety provided in using the pressure switch and closed
* loop control. You can only turn off closed loop control, thereby stopping the compressor
* from operating.
*/
public class Compressor extends SensorBase implements LiveWindowSendable {
private ByteBuffer m_pcm;
/**
* Create an instance of the Compressor
* @param pcmID
* The PCM CAN device ID. Most robots that use PCM will have a single module. Use this
* for supporting a second module other than the default.
*/
public Compressor(int pcmId) {
initCompressor(pcmId);
}
/**
* Create an instance of the Compressor
* Makes a new instance of the compressor using the default address. Additional modules can be
* supported by making a new instancce and specifying the CAN ID
*/
public Compressor() {
initCompressor(getDefaultSolenoidModule());
}
@@ -26,14 +49,30 @@ public class Compressor extends SensorBase implements LiveWindowSendable {
m_pcm = CompressorJNI.initializeCompressor((byte)module);
}
/**
* Start the compressor running in closed loop control mode
* Use the method in cases where you would like to manually stop and start the compressor
* for applications such as conserving battery or making sure that the compressor motor
* doesn't start during critical operations.
*/
public void start() {
setClosedLoopControl(true);
}
/**
* Stop the compressor from running in closed loop control mode.
* Use the method in cases where you would like to manually stop and start the compressor
* for applications such as conserving battery or making sure that the compressor motor
* doesn't start during critical operations.
*/
public void stop() {
setClosedLoopControl(false);
}
/**
* Get the enabled status of the compressor
* @returns true if the compressor is on
*/
public boolean enabled() {
ByteBuffer status = ByteBuffer.allocateDirect(4);
status.order(ByteOrder.LITTLE_ENDIAN);
@@ -44,6 +83,10 @@ public class Compressor extends SensorBase implements LiveWindowSendable {
return on;
}
/**
* Get the current pressure switch value
* @return true if the pressure is low by reading the pressure switch that is plugged into the PCM
*/
public boolean getPressureSwitchValue() {
ByteBuffer status = ByteBuffer.allocateDirect(4);
status.order(ByteOrder.LITTLE_ENDIAN);
@@ -54,6 +97,10 @@ public class Compressor extends SensorBase implements LiveWindowSendable {
return on;
}
/**
* Get the current being used by the compressor
* @return current consumed in amps for the compressor motor
*/
public float getCompressorCurrent() {
ByteBuffer status = ByteBuffer.allocateDirect(4);
status.order(ByteOrder.LITTLE_ENDIAN);
@@ -64,6 +111,12 @@ public class Compressor extends SensorBase implements LiveWindowSendable {
return current;
}
/**
* Set the PCM in closed loop control mode
* @param on
* If true sets the compressor to be in closed loop control mode otherwise
* normal operation of the compressor is disabled.
*/
public void setClosedLoopControl(boolean on) {
ByteBuffer status = ByteBuffer.allocateDirect(4);
status.order(ByteOrder.LITTLE_ENDIAN);
@@ -72,6 +125,10 @@ public class Compressor extends SensorBase implements LiveWindowSendable {
HALUtil.checkStatus(status.asIntBuffer());
}
/**
* Gets the current operating mode of the PCM
* @return true if compressor is operating on closed-loop mode, otherwise return false.
*/
public boolean getClosedLoopControl() {
ByteBuffer status = ByteBuffer.allocateDirect(4);
status.order(ByteOrder.LITTLE_ENDIAN);

View File

@@ -53,7 +53,7 @@ public class Preferences {
/**
* The file to save to
*/
private static final String FILE_NAME = "wpilib-preferences.ini";
private static final String FILE_NAME = "/home/lvuser/wpilib-preferences.ini";
/**
* The characters to put between a field and value
*/

View File

@@ -94,7 +94,7 @@ public abstract class SensorBase { // TODO: Refactor
*/
protected static void checkDigitalChannel(final int channel) {
if (channel < 0 || channel >= kDigitalChannels) {
System.err.println("Requested digital channel number is out of range.");
throw new IndexOutOfBoundsException("Requested digital channel number is out of range.");
}
}
@@ -107,7 +107,6 @@ public abstract class SensorBase { // TODO: Refactor
*/
protected static void checkRelayChannel(final int channel) {
if (channel < 0 || channel >= kRelayChannels) {
System.err.println("Requested relay channel number is out of range.");
throw new IndexOutOfBoundsException("Requested relay channel number is out of range.");
}
}
@@ -121,7 +120,6 @@ public abstract class SensorBase { // TODO: Refactor
*/
protected static void checkPWMChannel(final int channel) {
if (channel < 0 || channel >= kPwmChannels) {
System.err.println("Requested PWM channel number is out of range.");
throw new IndexOutOfBoundsException("Requested PWM channel number is out of range.");
}
}
@@ -134,8 +132,8 @@ public abstract class SensorBase { // TODO: Refactor
* @param channel The channel number to check.
*/
protected static void checkAnalogInputChannel(final int channel) {
if (channel <= 0 || channel > kAnalogInputChannels) {
System.err.println("Requested analog channel number is out of range.");
if (channel < 0 || channel >= kAnalogInputChannels) {
throw new IndexOutOfBoundsException("Requested analog input channel number is out of range.");
}
}
@@ -147,8 +145,8 @@ public abstract class SensorBase { // TODO: Refactor
* @param channel The channel number to check.
*/
protected static void checkAnalogOutputChannel(final int channel) {
if (channel <= 0 || channel > kAnalogOutputChannels) {
System.err.println("Requested analog channel number is out of range.");
if (channel < 0 || channel >= kAnalogOutputChannels) {
throw new IndexOutOfBoundsException("Requested analog output channel number is out of range.");
}
}
@@ -160,7 +158,7 @@ public abstract class SensorBase { // TODO: Refactor
*/
protected static void checkSolenoidChannel(final int channel) {
if (channel < 0 || channel >= kSolenoidChannels) {
System.err.println("Requested solenoid channel number is out of range.");
throw new IndexOutOfBoundsException("Requested solenoid channel number is out of range.");
}
}
@@ -172,7 +170,7 @@ public abstract class SensorBase { // TODO: Refactor
*/
protected static void checkPDPChannel(final int channel) {
if (channel < 0 || channel >= kPDPChannels) {
System.err.println("Requested solenoid channel number is out of range.");
throw new IndexOutOfBoundsException("Requested PDP channel number is out of range.");
}
}

View File

@@ -46,7 +46,7 @@ public abstract class SolenoidBase extends SensorBase {
* @param mask The channels you want to be affected.
*/
protected synchronized void set(int value, int mask) {
IntBuffer status = IntBuffer.allocate(1);
IntBuffer status = ByteBuffer.allocateDirect(4).asIntBuffer();
for (int i = 0; i < SensorBase.kSolenoidChannels; i++) {
int local_mask = 1 << i;
if ((mask & local_mask) != 0)
@@ -62,7 +62,7 @@ public abstract class SolenoidBase extends SensorBase {
*/
public byte getAll() {
byte value = 0;
IntBuffer status = IntBuffer.allocate(1);
IntBuffer status = ByteBuffer.allocateDirect(4).asIntBuffer();
for (int i = 0; i < SensorBase.kSolenoidChannels; i++) {
value |= SolenoidJNI.getSolenoid(m_ports[i], status) << i;
}

View File

@@ -28,7 +28,7 @@ import edu.wpi.first.wpilibj.test.AbstractComsSetup;
*/
public class PrefrencesTest extends AbstractComsSetup {
private static final Logger logger = Logger.getLogger(PrefrencesTest.class.getName());
private NetworkTable prefTable;
private Preferences pref;
private long check;
@@ -45,7 +45,7 @@ public class PrefrencesTest extends AbstractComsSetup {
@Before
public void setUp() throws Exception {
try {
File file = new File("wpilib-preferences.ini");
File file = new File("/home/lvuser/wpilib-preferences.ini");
file.mkdirs();
if (file.exists()) {
file.delete();
@@ -109,7 +109,7 @@ public class PrefrencesTest extends AbstractComsSetup {
assertEquals(pref.getFloat("checkedValueFloat", 0), 1, 0);
assertTrue(pref.getBoolean("checkedValueBoolean", false));
}
@Test
public void testPreferencesToNetworkTables(){
String networkedNumber = "networkCheckedValue";