Replaced SetTargetPinState event with TC command
This commit is contained in:
@@ -21,5 +21,6 @@ namespace Bloom::TargetController::Commands
|
||||
REMOVE_BREAKPOINT,
|
||||
SET_PROGRAM_COUNTER,
|
||||
GET_TARGET_PIN_STATES,
|
||||
SET_TARGET_PIN_STATE,
|
||||
};
|
||||
}
|
||||
|
||||
34
src/TargetController/Commands/SetTargetPinState.hpp
Normal file
34
src/TargetController/Commands/SetTargetPinState.hpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include "Command.hpp"
|
||||
|
||||
#include "src/Targets/TargetPinDescriptor.hpp"
|
||||
|
||||
namespace Bloom::TargetController::Commands
|
||||
{
|
||||
class SetTargetPinState: public Command
|
||||
{
|
||||
public:
|
||||
static constexpr CommandType type = CommandType::SET_TARGET_PIN_STATE;
|
||||
static inline const std::string name = "SetTargetPinState";
|
||||
|
||||
Targets::TargetPinDescriptor pinDescriptor;
|
||||
Targets::TargetPinState pinState;
|
||||
|
||||
SetTargetPinState(
|
||||
const Targets::TargetPinDescriptor& pinDescriptor,
|
||||
const Targets::TargetPinState& pinState
|
||||
)
|
||||
: pinDescriptor(pinDescriptor)
|
||||
, pinState(pinState)
|
||||
{};
|
||||
|
||||
[[nodiscard]] CommandType getType() const override {
|
||||
return SetTargetPinState::type;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool requiresStoppedTargetState() const override {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user