23 lines
689 B
C++
23 lines
689 B
C++
#include "TouchSensor.h"
|
|
|
|
namespace RoboidControl {
|
|
|
|
TouchSensor::TouchSensor(Participant* 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
|