RoboidControl-cpp/Sensors/TouchSensor.cpp
2025-02-26 09:27:54 +01:00

22 lines
694 B
C++

#include "TouchSensor.h"
namespace RoboidControl {
TouchSensor::TouchSensor(RemoteParticipant* participant) : Thing(participant) {
this->touchedSomething = false;
this->type = (unsigned char)Thing::Type::TouchSensor;
}
// TouchSensor::TouchSensor(RemoteParticipant* participant, unsigned char networkId, unsigned char thingId) :
// Thing(participant, networkId, thingId) {
// this->touchedSomething = false;
// }
void TouchSensor::GenerateBinary(char* bytes, unsigned char* ix) {}
void TouchSensor::ProcessBinary(char* bytes) {
this->touchedSomething = (bytes[0] == 1);
// if (this->touchedSomething)
// std::cout << "Touching something!\n";
}
} // namespace RoboidControl