Removed Edge class. Wasn't needed. Nodes and Corners are anough.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
#include "prototypes.h"
|
||||
#include "tools.h"
|
||||
|
||||
Corner::Corner(Edge* new_e1, Edge* new_e2): e1(new_e1), e2(new_e2) {
|
||||
Corner::Corner(Node* no, uint8_t nu): node(no), number(nu) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include "config.h"
|
||||
#include "tools.h"
|
||||
#include "node.h"
|
||||
#include "edge.h"
|
||||
#include "corner.h"
|
||||
#include "prototypes.h"
|
||||
#include "mqtt.h"
|
||||
@ -13,7 +12,6 @@
|
||||
#include "syslog.h"
|
||||
|
||||
std::vector<Node*> nodes;
|
||||
std::list<Edge*> edges;
|
||||
std::vector<Corner*> corners;
|
||||
|
||||
CRGB leds[LED_COUNT];
|
||||
|
@ -9,7 +9,7 @@ Node::Node(uint16_t number, Coords c, uint8_t _dir) {
|
||||
|
||||
LOGln("Created Node #%d at coordinates %d,%d with direction %d.", _number, coords.x, coords.y, direction);
|
||||
for(int i=0; i<CORNERS_PER_PART; i++) {
|
||||
edges[i] = new Edge();
|
||||
neighbours[i] = nullptr;
|
||||
}
|
||||
|
||||
Corner* last_corner = nullptr;
|
||||
@ -42,9 +42,6 @@ Node* Node::create_neighbour(uint8_t edge) {
|
||||
node->neighbours[0] = this;
|
||||
neighbours[edge] = node;
|
||||
|
||||
node->edges[0]->neighbour = this->edges[edge];
|
||||
this->edges[edge]->neighbour = node->edges[0];
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user