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

Protocol Sniffer view area for macOS #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions xprotolabinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ void XprotolabInterface::checkForAvailableComPorts(){
bool XprotolabInterface::checkIfCorrectPort(QString name){
#ifdef Q_OS_WIN
return name.toLower().startsWith("com");
#elif defined(Q_OS_MAC)
return name.toLower().startsWith("bluetooth");
// #elif defined(Q_OS_MAC)
// return name.toLower().startsWith("bluetooth");
#else
return name.toLower().startsWith("tty");
#endif
Expand Down Expand Up @@ -1890,13 +1890,16 @@ void XprotolabInterface::sniffProtocol()
rxData.append(eAscii);
}
rxData.append(" ");
if (((j+9)%16)==0) rxData.append(" ");

}
else
{
bdata.append(data);
rxData.append(bdata.toHex());
rxData.append(" ");
// rxData.append(" ");
if (((j+9)%16)==0) rxData.append(" ");
if (((j+1)%16)==0) rxData.append("\n");
bdata.clear();
}
}
Expand Down Expand Up @@ -1943,13 +1946,16 @@ void XprotolabInterface::sniffProtocol()
txData.append(eAscii);
}
txData.append(" ");
if (((j+9)%16)==0) txData.append(" ");

}
else
{
bdata.append(data);
txData.append(bdata.toHex());
txData.append(" ");
// txData.append(" ");
if (((j+9)%16)==0) txData.append(" ");
if (((j+1)%16)==0) txData.append("\n");
bdata.clear();
}
}
Expand Down
20 changes: 10 additions & 10 deletions xprotolabinterface.ui
Original file line number Diff line number Diff line change
Expand Up @@ -4183,23 +4183,23 @@ Frequency</string>
<widget class="QPlainTextEdit" name="misoTextEdit">
<property name="font">
<font>
<family>Courier</family>
<family>Consolas</family>
</font>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QPlainTextEdit" name="mosiTextEdit">
<property name="font">
<font>
<family>Courier</family>
<family>Consolas</family>
</font>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
</widget>
</item>
Expand Down Expand Up @@ -4301,11 +4301,11 @@ Frequency</string>
<widget class="QTextEdit" name="i2cTextEdit">
<property name="font">
<font>
<family>Courier</family>
<family>Consolas</family>
</font>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
Expand Down Expand Up @@ -4491,23 +4491,23 @@ Frequency</string>
<widget class="QTextEdit" name="rxTextEdit">
<property name="font">
<font>
<family>Courier</family>
<family>Consolas</family>
</font>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPlainTextEdit" name="txTextEdit">
<property name="font">
<font>
<family>Courier</family>
<family>Consolas</family>
</font>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
</widget>
</item>
Expand Down