Fixed compilation with GCC 6 (#248)

Since newer versions of GCC emit more warnings and errors, I tried building WPILib with GCC 6.2.0. This patch fixes compilation errors that occurred.
This commit is contained in:
Tyler Veness
2016-09-23 20:27:11 -07:00
committed by Peter Johnson
parent 659dbef751
commit 049fec470b
3 changed files with 10 additions and 5 deletions

View File

@@ -8,6 +8,7 @@
#include "CANJaguar.h"
#include <cassert>
#include <cmath>
#include "FRC_NetworkCommunication/CANSessionMux.h"
#include "HAL/HAL.h"
@@ -864,7 +865,7 @@ void CANJaguar::verify() {
// The returned max output voltage is sometimes slightly higher or
// lower than what was sent. This should not trigger resending
// the message.
if (std::abs(voltage - m_maxOutputVoltage) < 0.1) {
if (std::fabs(voltage - m_maxOutputVoltage) < 0.1) {
m_maxOutputVoltageVerified = true;
} else {
// It's wrong - set it again