Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Map/Map.cpp
- Committer:
- kocemax
- Date:
- 2019-03-26
- Revision:
- 5:12c179da4788
- Child:
- 6:39bda45efeed
File content as of revision 5:12c179da4788:
#include "Map.h"
#include <vector>
using namespace std;
Centerpoints center;
vector <Centerpoints> point;
// Constructor
Map::Map()
{
}
// Destructor
Map::~Map()
{
}
void Map::setCenterpoints()
{
center.y = -1;
for (int i = 0; i < 15; i++)
{
center.y = center.y + 2;
for (int j = 0; j < 14; j++)
{
center.x = j * 6 + 1;//1,7,13,19,25,31,37,43,49,55,61,67,73,79 and 5 to the right
point.push_back(center);
}
}
}
void Map::drawMap(N5110 &lcd)
{
vector<Centerpoints>::size_type end = point.size();
for (int i = 0; i < end; i++)
{
for (int j = 0; j < 5; j++)
{
lcd.setPixel(point[i].x+j,point[i].y,true);
}
}
}