mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
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:
committed by
Peter Johnson
parent
659dbef751
commit
049fec470b
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user