Merge "Fixed replay_drivetrain crashing on exit."
diff --git a/debian/usr.BUILD b/debian/usr.BUILD
index ac354cc..c66b30d 100644
--- a/debian/usr.BUILD
+++ b/debian/usr.BUILD
@@ -44,6 +44,7 @@
],
copts = [
'-Wno-error',
+ '-Wno-parentheses-equality',
],
includes = [
'lib/python3/dist-packages/numpy/f2py/src/',
diff --git a/frc971/wpilib/loop_output_handler.cc b/frc971/wpilib/loop_output_handler.cc
index 658b064..310b3e3 100644
--- a/frc971/wpilib/loop_output_handler.cc
+++ b/frc971/wpilib/loop_output_handler.cc
@@ -15,8 +15,8 @@
: watchdog_(this, timeout) {}
void LoopOutputHandler::operator()() {
- ::aos::SetCurrentThreadName("OutputHandler");
::std::thread watchdog_thread(::std::ref(watchdog_));
+ ::aos::SetCurrentThreadName("OutputHandler");
::aos::SetCurrentThreadRealtimePriority(30);
while (run_) {
@@ -51,11 +51,11 @@
if (timerfd_.get() == -1) {
PLOG(FATAL, "timerfd_create(Time::kDefaultClock, 0)");
}
- ::aos::SetCurrentThreadRealtimePriority(35);
- ::aos::SetCurrentThreadName("OutputWatchdog");
}
void LoopOutputHandler::Watchdog::operator()() {
+ ::aos::SetCurrentThreadRealtimePriority(35);
+ ::aos::SetCurrentThreadName("OutputWatchdog");
uint8_t buf[8];
while (run_) {
PCHECK(read(timerfd_.get(), buf, sizeof(buf)));
diff --git a/tools/build_rules/fortran.bzl b/tools/build_rules/fortran.bzl
index c67884a..ff940af 100644
--- a/tools/build_rules/fortran.bzl
+++ b/tools/build_rules/fortran.bzl
@@ -18,6 +18,7 @@
'-Werror',
'-Wextra',
'-Wno-builtin-macro-redefined',
+ '-Wunused-local-typedefs',
'-D__has_feature(x)=0',
'-fmacro-backtrace-limit=0']
diff --git a/y2014/wpilib/wpilib_interface.cc b/y2014/wpilib/wpilib_interface.cc
index 855905c..50dee34 100644
--- a/y2014/wpilib/wpilib_interface.cc
+++ b/y2014/wpilib/wpilib_interface.cc
@@ -239,7 +239,6 @@
void operator()() {
::aos::SetCurrentThreadName("SensorReader");
- LOG(INFO, "In sensor reader thread\n");
my_pid_ = getpid();
ds_ =
@@ -253,7 +252,6 @@
top_reader_.Start();
bottom_reader_.Start();
dma_synchronizer_->Start();
- LOG(INFO, "Things are now started\n");
::aos::SetCurrentThreadRealtimePriority(kPriority);
while (run_) {
@@ -682,7 +680,6 @@
::std::thread joystick_thread(::std::ref(joystick_sender));
SensorReader reader;
- LOG(INFO, "Creating the reader\n");
// Create this first to make sure it ends up in one of the lower-numbered
// FPGA slots so we can use it with DMA.
diff --git a/y2014_bot3/wpilib/wpilib_interface.cc b/y2014_bot3/wpilib/wpilib_interface.cc
index 5dcb838..9632160 100644
--- a/y2014_bot3/wpilib/wpilib_interface.cc
+++ b/y2014_bot3/wpilib/wpilib_interface.cc
@@ -80,7 +80,6 @@
void operator()() {
::aos::SetCurrentThreadName("SensorReader");
- LOG(INFO, "In sensor reader thread\n");
my_pid_ = getpid();
ds_ =
@@ -91,8 +90,6 @@
#endif
pdp_.reset(new PowerDistributionPanel());
- LOG(INFO, "Things are now started\n");
-
::aos::SetCurrentThreadRealtimePriority(kPriority);
while (run_) {
::aos::time::PhasedLoopXMS(5, 4000);
@@ -339,7 +336,6 @@
// Sensors
SensorReader reader;
- LOG(INFO, "Creating the reader\n");
reader.set_drivetrain_left_encoder(make_encoder(4));
reader.set_drivetrain_right_encoder(make_encoder(5));
diff --git a/y2015/wpilib/wpilib_interface.cc b/y2015/wpilib/wpilib_interface.cc
index fa7d14a..05ef948 100644
--- a/y2015/wpilib/wpilib_interface.cc
+++ b/y2015/wpilib/wpilib_interface.cc
@@ -220,7 +220,6 @@
}
void operator()() {
- LOG(INFO, "In sensor reader thread\n");
::aos::SetCurrentThreadName("SensorReader");
my_pid_ = getpid();
@@ -234,7 +233,6 @@
wrist_encoder_.Start();
dma_synchronizer_->Start();
- LOG(INFO, "Things are now started\n");
::aos::SetCurrentThreadRealtimePriority(kPriority);
while (run_) {
@@ -638,7 +636,6 @@
// TODO(austin): Compressor needs to use a spike.
SensorReader reader;
- LOG(INFO, "Creating the reader\n");
reader.set_arm_left_encoder(encoder(1));
reader.set_arm_left_index(make_unique<DigitalInput>(1));
reader.set_arm_left_potentiometer(make_unique<AnalogInput>(1));
diff --git a/y2015_bot3/wpilib/wpilib_interface.cc b/y2015_bot3/wpilib/wpilib_interface.cc
index 554e0a6..1eeac1f 100644
--- a/y2015_bot3/wpilib/wpilib_interface.cc
+++ b/y2015_bot3/wpilib/wpilib_interface.cc
@@ -119,7 +119,6 @@
}
void operator()() {
- LOG(INFO, "In sensor reader thread\n");
::aos::SetCurrentThreadName("SensorReader");
my_pid_ = getpid();
@@ -131,8 +130,6 @@
#endif
pdp_.reset(new PowerDistributionPanel());
- LOG(INFO, "Things are now started\n");
-
::aos::SetCurrentThreadRealtimePriority(kPriority);
while (run_) {
::aos::time::PhasedLoopXMS(5, 4000);
@@ -455,7 +452,6 @@
::std::thread joystick_thread(::std::ref(joystick_sender));
SensorReader reader;
- LOG(INFO, "Creating the reader\n");
reader.set_elevator_encoder(encoder(6));
reader.set_elevator_zeroing_hall_effect(make_unique<DigitalInput>(6));