Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vsc495 connection status icons #54

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

AdeebHossain
Copy link

No description provided.

@AdeebHossain AdeebHossain requested a review from asallh January 29, 2025 02:16
src/MessageAggregator/MessageAggregator.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of a brand new packet, lets put this in the PiPacket

src/Receivers/SerialReceiver.cpp Outdated Show resolved Hide resolved
@@ -33,12 +36,11 @@ SerialReceiver::~SerialReceiver() {
void SerialReceiver::handleReadyRead() {
QByteArray data = serialPort_->readAll();

qDebug() << "Data Recieved: " << data;
qDebug() << "Data Received: " << data;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think you can spell better than me buddy

src/Receivers/SerialReceiver.cpp Show resolved Hide resolved
src/Receivers/SerialReceiver.h Outdated Show resolved Hide resolved
@@ -12,6 +14,9 @@ PacketFactory::PacketFactory() {
batteryFaultsPacket_.reset(new BatteryFaultsPacket());
b3Packet_.reset(new B3Packet());

messageTransmitter_ = std::make_unique<MessageTransmitter>();
connectionStatusPacket_.reset(new ConnectionStatusPacket(messageTransmitter_.get()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better design if me populated the connection fields directly from the transmitter class. Ie trasmitter emits a signal on success connection and on disconnection as well that will then modify the value in the packet.

Also the logic for verifying the usb connection is kind of willy nilly. And would fail to detect if usb is disconnect in the middle of runtime. Should set up a mechanism similiar to mqtt client that will monitor connect and disconnect events

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants