mirror of
https://github.com/gwm17/Specter.git
synced 2024-11-22 18:28:52 -05:00
Added coinicdence window to the PhysicsStartEvent
This commit is contained in:
parent
120c8895dc
commit
b7bd2da5ca
|
@ -35,7 +35,10 @@ namespace Navigator {
|
|||
m_physThread->join();
|
||||
|
||||
if(m_physThread != nullptr)
|
||||
{
|
||||
delete m_physThread;
|
||||
m_physThread = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void Application::OnEvent(Event& event)
|
||||
|
@ -68,6 +71,7 @@ namespace Navigator {
|
|||
DestroyPhysThread();
|
||||
}
|
||||
PhysicsEventBuilder::Get().AttachDataSource(event.GetSourceLocation(), event.GetSourceType());
|
||||
PhysicsEventBuilder::Get().SetCoincidenceWindow(event.GetCoincidenceWindow());
|
||||
if(PhysicsEventBuilder::Get().IsRunning())
|
||||
{
|
||||
NAV_INFO("Starting the event builder...");
|
||||
|
@ -98,7 +102,7 @@ namespace Navigator {
|
|||
|
||||
void Application::Run()
|
||||
{
|
||||
PhysicsStartEvent junk("/media/gordon/GordonData/gwm17/NavTests/data/", DataSource::SourceType::CompassOffline);
|
||||
PhysicsStartEvent junk("/media/gordon/GordonData/gwm17/NavTests/data/", DataSource::SourceType::CompassOffline, 2000000);
|
||||
OnEvent(junk);
|
||||
while(m_runFlag)
|
||||
{
|
||||
|
|
|
@ -9,12 +9,13 @@ namespace Navigator {
|
|||
class PhysicsStartEvent : public Event
|
||||
{
|
||||
public:
|
||||
PhysicsStartEvent(const std::string& loc, DataSource::SourceType type) :
|
||||
PhysicsStartEvent(const std::string& loc, DataSource::SourceType type, uint64_t window) :
|
||||
m_sourceLocation(loc), m_sourceType(type)
|
||||
{}
|
||||
|
||||
inline std::string GetSourceLocation() { return m_sourceLocation; }
|
||||
inline DataSource::SourceType GetSourceType() { return m_sourceType; }
|
||||
inline uint64_t GetCoincidenceWindow() { return m_coincidenceWindow; }
|
||||
|
||||
std::string ToString() const override
|
||||
{
|
||||
|
@ -27,6 +28,7 @@ namespace Navigator {
|
|||
private:
|
||||
std::string m_sourceLocation;
|
||||
DataSource::SourceType m_sourceType;
|
||||
uint64_t m_coincidenceWindow;
|
||||
};
|
||||
|
||||
class PhysicsStopEvent : public Event
|
||||
|
|
|
@ -67,9 +67,6 @@ namespace Navigator {
|
|||
|
||||
CompassHit hit;
|
||||
|
||||
|
||||
//temp
|
||||
m_rawSort.SetCoincidenceWindow(2000000);
|
||||
while(m_runFlag)
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user