Skip to content

File target_selection.cpp

File List > target_selection.cpp

Go to the documentation of this file

#include "target_selection.h"

#include "state.h"
#include "utilities.h"

void TargetSelection::Execute(SystemState* state) {
    state->setTarget(target_source, target_id, static_cast<uint8_t>(speed));
}

TargetSelection::TargetSelection(
    TargetSource initial_target_source,
    uint8_t      initial_target_id,
    int          initial_speed,
    int64_t      initial_run_after
):
    Command(static_cast<uint64_t>(initial_run_after)),
    target_source(initial_target_source),
    target_id(initial_target_id),
    speed(initial_speed) {}