Formatting
This commit is contained in:
parent
1abe40815e
commit
a227f247e0
17
Sensing.cpp
17
Sensing.cpp
@ -1,15 +1,12 @@
|
|||||||
#include "DistanceSensor.h"
|
|
||||||
#include "Sensing.h"
|
#include "Sensing.h"
|
||||||
//#include <Switch.h>
|
#include "DistanceSensor.h"
|
||||||
|
// #include <Switch.h>
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
extern "C" {
|
SensorPlacement::SensorPlacement(DistanceSensor* distanceSensor,
|
||||||
#include "debug.h"
|
Vector2 direction) {
|
||||||
}
|
|
||||||
|
|
||||||
SensorPlacement::SensorPlacement(DistanceSensor* distanceSensor, Vector2 direction) {
|
|
||||||
this->distanceSensor = distanceSensor;
|
this->distanceSensor = distanceSensor;
|
||||||
this->switchSensor = nullptr;
|
this->switchSensor = nullptr;
|
||||||
this->direction = direction;
|
this->direction = direction;
|
||||||
@ -22,7 +19,8 @@ SensorPlacement::SensorPlacement(Switch* switchSensor, Vector2 direction) {
|
|||||||
|
|
||||||
Sensing::Sensing() {}
|
Sensing::Sensing() {}
|
||||||
|
|
||||||
// void Sensing::AddSensors(SensorPlacement* sensors, unsigned int sensorCount) {
|
// void Sensing::AddSensors(SensorPlacement* sensors, unsigned int sensorCount)
|
||||||
|
// {
|
||||||
// this->sensors = sensors;
|
// this->sensors = sensors;
|
||||||
// this->sensorCount = sensorCount;
|
// this->sensorCount = sensorCount;
|
||||||
// }
|
// }
|
||||||
@ -157,7 +155,8 @@ bool Sensing::SwitchOn(float fromAngle, float toAngle) {
|
|||||||
if (angle > fromAngle && angle < toAngle) {
|
if (angle > fromAngle && angle < toAngle) {
|
||||||
DistanceSensor* distanceSensor = (DistanceSensor*)placement.thing;
|
DistanceSensor* distanceSensor = (DistanceSensor*)placement.thing;
|
||||||
|
|
||||||
// if (placement.switchSensor != nullptr && placement.switchSensor->IsOn())
|
// if (placement.switchSensor != nullptr &&
|
||||||
|
// placement.switchSensor->IsOn())
|
||||||
// return true;
|
// return true;
|
||||||
// else
|
// else
|
||||||
if (distanceSensor != nullptr && distanceSensor->IsOn())
|
if (distanceSensor != nullptr && distanceSensor->IsOn())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user