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