From 3a645e8709d4342ee2ae6365c5f5a54ef04433eb Mon Sep 17 00:00:00 2001 From: Andy Killorin <37423245+Speedy6451@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:05:49 -0400 Subject: [PATCH] removed map.h --- src/map.h | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 src/map.h diff --git a/src/map.h b/src/map.h deleted file mode 100644 index aa8d31e..0000000 --- a/src/map.h +++ /dev/null @@ -1,52 +0,0 @@ -/** - * A Map is a graph of intersections (nodes) and streets (edges). To save memory, we store - * the map as a list of "turns". Every time you get to an intersection, you know where you - * came from and where you want to go. You then calculate the angle at which you need to - * turn from the directions of the roads from the current intersection. - */ - -#pragma once - -#include -// #include - -// struct Turn -// { -// Intersection to; -// int16_t direction; //direction to head from the intersection -// }; - -// struct Intersection -// { -// /** -// * List the reachable intersections and the direction of the street (absolute). -// */ -// TList turns; -// }; - -// class Map -// { -// private: -// TList intersections; - -// public: -// int16_t calcAngle(Intersection from, Intersection at, Intersection to); -// }; - -PROGMEM const uint8_t directions[][4] = -{ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} -}; - -int16_t CalcTurn(uint8_t from, uint8_t at, uint8_t to) -{ - int16_t currentHeading = directions[at][from] - 180; - int16_t desiredHeading = directions[at][to]; - - int16_t turnAngle = desiredHeading - currentHeading; - - return turnAngle; -} \ No newline at end of file