mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Fixes ultrasonic declaration (#328)
Also adds test to ensure this doens't happen again
This commit is contained in:
committed by
Peter Johnson
parent
2235a809c4
commit
81212d80c6
@@ -38,5 +38,37 @@ model {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Shared target used just to check that wpilib is fully linked
|
||||
// Use the static target for normal linking
|
||||
myRobotcppShared(NativeExecutableSpec) {
|
||||
targetPlatform 'arm'
|
||||
binaries.all {
|
||||
tasks.withType(CppCompile) {
|
||||
addNiLibraryLinks(linker, targetPlatform)
|
||||
addNetworkTablesLibraryLinks(it, linker, targetPlatform)
|
||||
}
|
||||
|
||||
cppCompiler.args '-pthread', '-Wno-unused-variable'
|
||||
linker.args '-pthread', '-Wno-unused-variable', '-Wl,-rpath,/opt/GenICam_v2_3/bin/Linux_armv7-a'
|
||||
}
|
||||
sources {
|
||||
cpp {
|
||||
source {
|
||||
srcDir 'src'
|
||||
include '**/*.cpp'
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDirs = ['include',
|
||||
"${project.athena}/include", "${project.shared}/include",
|
||||
"${project.hal}/include/HAL", netTablesInclude, wpiUtilInclude]
|
||||
include '**/*.h'
|
||||
}
|
||||
|
||||
lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared'
|
||||
lib project: ':hal', library: 'HALAthena', linkage: 'shared'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ constexpr double Ultrasonic::kSpeedOfSoundInchesPerSec;
|
||||
// automatic round robin mode
|
||||
std::atomic<bool> Ultrasonic::m_automaticEnabled{false};
|
||||
std::set<Ultrasonic*> Ultrasonic::m_sensors;
|
||||
std::thread Ultrasonic::m_thread;
|
||||
|
||||
/**
|
||||
* Background task that goes through the list of ultrasonic sensors and pings
|
||||
|
||||
Reference in New Issue
Block a user