-
Notifications
You must be signed in to change notification settings - Fork 0
/
Lawnmower.h
40 lines (35 loc) · 1017 Bytes
/
Lawnmower.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include "Screen.h"
#include "Waypoint.h"
class Lawnmower :
public Screen
{
Location location;
float heading;
short battery;
Pixel dock;
bool lowBattery;
std::vector<Waypoint*> memory;
Waypoint* currentWaypoint;
Location calculateDestination() const;
Location testCalculateDestination(const Location&, const float&) const;
Location offsetCalculation() const;
Waypoint* setWaypoint(const Pixel&);
public:
static unsigned long stepCounter;
Lawnmower(const Pixel&, const Pixel&);
~Lawnmower();
Location getLocation() const;
short getBatteryLevel() const;
Pixel destination() const;
Pixel testDestination(const Location&, const float&) const;
void newHeading();
Location move(Pixel&);
Location testMove(const Location&, const float&) const;
float lineToDock() const;
bool batteryLow() const;
void trackBack();
void moveToDock();
void recharge();
void printTelemetry() const;
};