diff --git a/AutonomousMode/IntersectionHandler/intersection_handler.cpp b/AutonomousMode/IntersectionHandler/intersection_handler.cpp index a6b66e0..1786040 100644 --- a/AutonomousMode/IntersectionHandler/intersection_handler.cpp +++ b/AutonomousMode/IntersectionHandler/intersection_handler.cpp @@ -6,4 +6,14 @@ IntersectionHandler::IntersectionHandler(/* args */) IntersectionHandler::~IntersectionHandler() { +} + +const bool IntersectionHandler::foundLane(const FrameData& data) +{ + return data.boundingBoxes.size(); +} + +const bool IntersectionHandler::foundIntersection(const FrameData& data) +{ + return data.boundingBoxes.size()>1; } \ No newline at end of file diff --git a/AutonomousMode/IntersectionHandler/intersection_handler.h b/AutonomousMode/IntersectionHandler/intersection_handler.h index 2f18184..9080418 100644 --- a/AutonomousMode/IntersectionHandler/intersection_handler.h +++ b/AutonomousMode/IntersectionHandler/intersection_handler.h @@ -1,11 +1,14 @@ #pragma once +#include class IntersectionHandler { private: - /* data */ public: IntersectionHandler(/* args */); ~IntersectionHandler(); + + const bool foundLane(const FrameData& data); + const bool foundIntersection(const FrameData& data); }; \ No newline at end of file diff --git a/AutonomousMode/autonomous_mode_main.cpp b/AutonomousMode/autonomous_mode_main.cpp index 7976423..a3f4414 100644 --- a/AutonomousMode/autonomous_mode_main.cpp +++ b/AutonomousMode/autonomous_mode_main.cpp @@ -40,9 +40,16 @@ int main(void) double delta = static_cast(deltaMs) / 1000.0; double frameRate = 1.0 / static_cast(delta); - std::cout << "Frame rate: " << frameRate << " angle: " << result.data.angle - << " motor 1: " << result.motorSignals[0] << " motor 2: " << result.motorSignals[1] - << " motor 3: " << result.motorSignals[2] << " motor 4: " << result.motorSignals[3] <