Updated cpplint.py and fixed its regexes for C-style casts (#193)

Additional C-style cast warnings thrown were also fixed.
This commit is contained in:
Tyler Veness
2016-08-11 23:38:45 -07:00
committed by Peter Johnson
parent e8f1fdda44
commit 3819cd0768
24 changed files with 109 additions and 68 deletions

View File

@@ -95,7 +95,8 @@ void ADXL362::SetRange(Range range) {
// Specify the data format to read
commands[0] = kRegWrite;
commands[1] = kFilterCtlRegister;
commands[2] = kFilterCtl_ODR_100Hz | (uint8_t)((range & 0x03) << 6);
commands[2] =
kFilterCtl_ODR_100Hz | static_cast<uint8_t>((range & 0x03) << 6);
m_spi.Write(commands, 3);
}
@@ -117,7 +118,7 @@ double ADXL362::GetAcceleration(ADXL362::Axes axis) {
uint8_t buffer[4];
uint8_t command[4] = {0, 0, 0, 0};
command[0] = kRegRead;
command[1] = kDataRegister + (uint8_t)axis;
command[1] = kDataRegister + static_cast<uint8_t>(axis);
m_spi.Transaction(command, buffer, 4);
// Sensor is little endian... swap bytes