Tidying
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#include "EdbgAvr8Interface.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <thread>
|
||||
#include <cmath>
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
||||
{
|
||||
public:
|
||||
explicit EdbgAvrIspInterface(EdbgInterface& edbgInterface)
|
||||
: edbgInterface(edbgInterface) {};
|
||||
: edbgInterface(edbgInterface)
|
||||
{};
|
||||
|
||||
/**
|
||||
* The EdbgAvrIspInterface doesn't actually require any config from the user, at this point in time. So this
|
||||
|
||||
@@ -14,7 +14,9 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrame
|
||||
{
|
||||
public:
|
||||
GetProgramCounter() = default;
|
||||
explicit GetProgramCounter(const std::vector<AvrResponse>& avrResponses): Avr8GenericResponseFrame(avrResponses) {}
|
||||
explicit GetProgramCounter(const std::vector<AvrResponse>& avrResponses)
|
||||
: Avr8GenericResponseFrame(avrResponses)
|
||||
{}
|
||||
|
||||
Targets::TargetProgramCounter extractProgramCounter() {
|
||||
/*
|
||||
|
||||
@@ -13,7 +13,9 @@ namespace Bloom::Events
|
||||
static constexpr EventType type = EventType::DEBUG_SERVER_THREAD_STATE_CHANGED;
|
||||
static inline const std::string name = "DebugServerThreadStateChanged";
|
||||
|
||||
explicit DebugServerThreadStateChanged(ThreadState state): state(state) {};
|
||||
explicit DebugServerThreadStateChanged(ThreadState state)
|
||||
: state(state)
|
||||
{};
|
||||
|
||||
[[nodiscard]] EventType getType() const override {
|
||||
return DebugServerThreadStateChanged::type;
|
||||
|
||||
@@ -13,7 +13,9 @@ namespace Bloom::Events
|
||||
static constexpr EventType type = EventType::TARGET_CONTROLLER_THREAD_STATE_CHANGED;
|
||||
static inline const std::string name = "TargetControllerThreadStateChanged";
|
||||
|
||||
explicit TargetControllerThreadStateChanged(ThreadState state): state(state) {};
|
||||
explicit TargetControllerThreadStateChanged(ThreadState state)
|
||||
: state(state)
|
||||
{};
|
||||
|
||||
[[nodiscard]] EventType getType() const override {
|
||||
return TargetControllerThreadStateChanged::type;
|
||||
|
||||
@@ -11,16 +11,16 @@ namespace Bloom::Widgets
|
||||
Targets::TargetMemorySize size,
|
||||
QString labelText,
|
||||
AnnotationItemPosition position
|
||||
):
|
||||
QGraphicsItem(nullptr),
|
||||
startAddress(startAddress),
|
||||
size(size),
|
||||
endAddress(static_cast<std::uint32_t>(startAddress + size - 1)),
|
||||
labelText(std::move(labelText)),
|
||||
position(position),
|
||||
width(static_cast<int>((ByteItem::WIDTH + ByteItem::RIGHT_MARGIN) * size - ByteItem::RIGHT_MARGIN)),
|
||||
height(position == AnnotationItemPosition::TOP ? AnnotationItem::TOP_HEIGHT : AnnotationItem::BOTTOM_HEIGHT
|
||||
) {
|
||||
)
|
||||
: QGraphicsItem(nullptr)
|
||||
, startAddress(startAddress)
|
||||
, size(size)
|
||||
, endAddress(static_cast<Targets::TargetMemoryAddress>(startAddress + size - 1))
|
||||
, labelText(std::move(labelText))
|
||||
, position(position)
|
||||
, width(static_cast<int>((ByteItem::WIDTH + ByteItem::RIGHT_MARGIN) * size - ByteItem::RIGHT_MARGIN))
|
||||
, height(position == AnnotationItemPosition::TOP ? AnnotationItem::TOP_HEIGHT : AnnotationItem::BOTTOM_HEIGHT)
|
||||
{
|
||||
this->setAcceptHoverEvents(true);
|
||||
this->setToolTip(this->labelText);
|
||||
}
|
||||
@@ -29,19 +29,22 @@ namespace Bloom::Widgets
|
||||
const Targets::TargetMemoryAddressRange& addressRange,
|
||||
const QString& labelText,
|
||||
AnnotationItemPosition position
|
||||
): AnnotationItem(
|
||||
addressRange.startAddress,
|
||||
addressRange.endAddress - addressRange.startAddress + 1,
|
||||
labelText,
|
||||
position
|
||||
) {}
|
||||
)
|
||||
: AnnotationItem(
|
||||
addressRange.startAddress,
|
||||
addressRange.endAddress - addressRange.startAddress + 1,
|
||||
labelText,
|
||||
position
|
||||
)
|
||||
{}
|
||||
|
||||
AnnotationItem::AnnotationItem(const FocusedMemoryRegion& focusedMemoryRegion, AnnotationItemPosition position)
|
||||
: AnnotationItem(
|
||||
focusedMemoryRegion.addressRange,
|
||||
focusedMemoryRegion.name,
|
||||
position
|
||||
) {}
|
||||
: AnnotationItem(
|
||||
focusedMemoryRegion.addressRange,
|
||||
focusedMemoryRegion.name,
|
||||
position
|
||||
)
|
||||
{}
|
||||
|
||||
void AnnotationItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) {
|
||||
auto lineColor = this->getLineColor();
|
||||
|
||||
@@ -37,8 +37,7 @@ namespace Bloom::Widgets
|
||||
);
|
||||
|
||||
AnnotationItem(
|
||||
const Targets::TargetMemoryAddressRange&
|
||||
addressRange,
|
||||
const Targets::TargetMemoryAddressRange& addressRange,
|
||||
const QString& labelText,
|
||||
AnnotationItemPosition position
|
||||
);
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "Command.hpp"
|
||||
|
||||
#include "src/Targets/TargetBreakpoint.hpp"
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::TargetController::Commands
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include "TargetPinDescriptor.hpp"
|
||||
|
||||
namespace Bloom::Targets
|
||||
{
|
||||
enum class TargetPackage: int
|
||||
enum class TargetPackage: std::uint8_t
|
||||
{
|
||||
UNKNOWN,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user