Compatibility fixes

This commit is contained in:
Pascal Serrarens 2025-06-04 10:58:05 +02:00
parent be95dbeedc
commit c24925a4da
3 changed files with 8 additions and 4 deletions

View File

@ -7,7 +7,9 @@ namespace Arduino {
#pragma region DRV8833
DRV8833::DRV8833(Configuration config, Thing* parent) : Thing(Type::Undetermined, parent) {
DRV8833::DRV8833(Configuration config, Thing* parent) : Thing(parent) {
this->type = Type::Undetermined;
this->name = "DRV8833";
this->pinStandby = config.standby;
if (pinStandby != 255)
pinMode(pinStandby, OUTPUT);

View File

@ -7,8 +7,9 @@ namespace Arduino {
#pragma region Digital input
DigitalInput::DigitalInput(unsigned char pin, Thing* parent)
: Thing(Type::Undetermined, parent) {
DigitalInput::DigitalInput(unsigned char pin, Thing* parent) : Thing(parent) {
this->type = Type::Switch;
this->name = "Digital Input";
this->pin = pin;
pinMode(this->pin, INPUT);
std::cout << "digital input start\n";

View File

@ -7,7 +7,8 @@ namespace RoboidControl {
namespace Arduino {
UltrasonicSensor::UltrasonicSensor(Configuration config, Thing* parent)
: Thing(Type::Undetermined, parent) {
: Thing(parent) {
this->type = Type::DistanceSensor;
this->name = "Ultrasonic sensor";
this->pinTrigger = config.trigger;
this->pinEcho = config.echo;