Replaced RetrieveTargetPinStates event with TC command

This commit is contained in:
Nav
2022-05-01 00:07:12 +01:00
parent 7c4e39dd03
commit 870c4ba3d7
10 changed files with 75 additions and 64 deletions

View File

@@ -11,5 +11,6 @@ namespace Bloom::TargetController::Responses
TARGET_REGISTERS_READ,
TARGET_MEMORY_READ,
TARGET_STATE,
TARGET_PIN_STATES,
};
}

View File

@@ -0,0 +1,24 @@
#pragma once
#include "Response.hpp"
#include "src/Targets/TargetPinDescriptor.hpp"
namespace Bloom::TargetController::Responses
{
class TargetPinStates: public Response
{
public:
static constexpr ResponseType type = ResponseType::TARGET_PIN_STATES;
Targets::TargetPinStateMappingType pinStatesByNumber;
explicit TargetPinStates(const Targets::TargetPinStateMappingType& pinStatesByNumber)
: pinStatesByNumber(pinStatesByNumber)
{}
[[nodiscard]] ResponseType getType() const override {
return TargetPinStates::type;
}
};
}