Formatting

This commit is contained in:
Pascal Serrarens 2023-11-16 10:45:15 +01:00
parent 1abe40815e
commit a227f247e0

View File

@ -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())