Cleaned up integer type usage in wpilibc (#92)

Replaced all unsigned types to signed and int32_t with int in wpilibc
This commit is contained in:
Tyler Veness
2016-09-06 00:01:45 -07:00
committed by Peter Johnson
parent ff93050b31
commit 0cd05d1a42
169 changed files with 914 additions and 943 deletions

View File

@@ -12,22 +12,22 @@
#include "HAL/HAL.h"
#include "LiveWindow/LiveWindow.h"
static uint8_t kRegWrite = 0x0A;
static uint8_t kRegRead = 0x0B;
static int kRegWrite = 0x0A;
static int kRegRead = 0x0B;
static uint8_t kPartIdRegister = 0x02;
static uint8_t kDataRegister = 0x0E;
static uint8_t kFilterCtlRegister = 0x2C;
static uint8_t kPowerCtlRegister = 0x2D;
static int kPartIdRegister = 0x02;
static int kDataRegister = 0x0E;
static int kFilterCtlRegister = 0x2C;
static int kPowerCtlRegister = 0x2D;
// static uint8_t kFilterCtl_Range2G = 0x00;
// static uint8_t kFilterCtl_Range4G = 0x40;
// static uint8_t kFilterCtl_Range8G = 0x80;
static uint8_t kFilterCtl_ODR_100Hz = 0x03;
// static int kFilterCtl_Range2G = 0x00;
// static int kFilterCtl_Range4G = 0x40;
// static int kFilterCtl_Range8G = 0x80;
static int kFilterCtl_ODR_100Hz = 0x03;
static uint8_t kPowerCtl_UltraLowNoise = 0x20;
// static uint8_t kPowerCtl_AutoSleep = 0x04;
static uint8_t kPowerCtl_Measure = 0x02;
static int kPowerCtl_UltraLowNoise = 0x20;
// static int kPowerCtl_AutoSleep = 0x04;
static int kPowerCtl_Measure = 0x02;
/**
* Constructor. Uses the onboard CS1.
@@ -147,7 +147,7 @@ ADXL362::AllAxes ADXL362::GetAccelerations() {
dataBuffer[1] = kDataRegister;
m_spi.Transaction(dataBuffer, dataBuffer, 8);
for (int32_t i = 0; i < 3; i++) {
for (int i = 0; i < 3; i++) {
// Sensor is little endian... swap bytes
rawData[i] = dataBuffer[i * 2 + 3] << 8 | dataBuffer[i * 2 + 2];
}