From d472af351793481733bf407c3fd27dfe1587909d Mon Sep 17 00:00:00 2001 From: Thad House Date: Fri, 30 Jun 2017 15:13:51 -0700 Subject: [PATCH] Removes CAN.h from the HAL (#556) I can't find where the actual code is implemented, and I get errors if I try to link or compile to any of its functions. Even CANJaguar doesn't use them, nor did the old impl of CANTalon. Plus looking at the API it makes no sense anyway, since it doesn't do any buffers , so I think its worth it to remove it. Removes CAN.h from the JNI header --- hal/include/HAL/CAN.h | 35 --------------------------- wpilibj/src/athena/cpp/lib/CANJNI.cpp | 1 - 2 files changed, 36 deletions(-) delete mode 100644 hal/include/HAL/CAN.h diff --git a/hal/include/HAL/CAN.h b/hal/include/HAL/CAN.h deleted file mode 100644 index 67b34bb55c..0000000000 --- a/hal/include/HAL/CAN.h +++ /dev/null @@ -1,35 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* Copyright (c) FIRST 2016-2017. All Rights Reserved. */ -/* Open Source Software - may be modified and shared by FRC teams. The code */ -/* must be accompanied by the FIRST BSD license file in the root directory of */ -/* the project. */ -/*----------------------------------------------------------------------------*/ - -#pragma once - -#include - -#include "FRC_NetworkCommunication/CANSessionMux.h" - -void canTxSend(uint32_t arbID, uint8_t length, - int32_t period = CAN_SEND_PERIOD_NO_REPEAT); - -void canTxPackInt8(uint32_t arbID, uint8_t offset, uint8_t value); -void canTxPackInt16(uint32_t arbID, uint8_t offset, uint16_t value); -void canTxPackInt32(uint32_t arbID, uint8_t offset, uint32_t value); -void canTxPackFXP16(uint32_t arbID, uint8_t offset, double value); -void canTxPackFXP32(uint32_t arbID, uint8_t offset, double value); - -uint8_t canTxUnpackInt8(uint32_t arbID, uint8_t offset); -uint32_t canTxUnpackInt32(uint32_t arbID, uint8_t offset); -uint16_t canTxUnpackInt16(uint32_t arbID, uint8_t offset); -double canTxUnpackFXP16(uint32_t arbID, uint8_t offset); -double canTxUnpackFXP32(uint32_t arbID, uint8_t offset); - -bool canRxReceive(uint32_t arbID); - -uint8_t canRxUnpackInt8(uint32_t arbID, uint8_t offset); -uint16_t canRxUnpackInt16(uint32_t arbID, uint8_t offset); -uint32_t canRxUnpackInt32(uint32_t arbID, uint8_t offset); -double canRxUnpackFXP16(uint32_t arbID, uint8_t offset); -double canRxUnpackFXP32(uint32_t arbID, uint8_t offset); diff --git a/wpilibj/src/athena/cpp/lib/CANJNI.cpp b/wpilibj/src/athena/cpp/lib/CANJNI.cpp index 2a7ec77867..1dca8e98c9 100644 --- a/wpilibj/src/athena/cpp/lib/CANJNI.cpp +++ b/wpilibj/src/athena/cpp/lib/CANJNI.cpp @@ -9,7 +9,6 @@ #include #include "FRC_NetworkCommunication/CANSessionMux.h" -#include "HAL/CAN.h" #include "HAL/cpp/Log.h" #include "HALUtil.h" #include "edu_wpi_first_wpilibj_can_CANJNI.h"