mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
chg: write serial port in window title (plot/slider)
This commit is contained in:
parent
60b444d5d8
commit
996b41dce7
5 changed files with 28 additions and 2 deletions
|
@ -24,6 +24,8 @@
|
||||||
//#define COMMS_DEBUG
|
//#define COMMS_DEBUG
|
||||||
//#define COMMS_DEBUG_RAW
|
//#define COMMS_DEBUG_RAW
|
||||||
|
|
||||||
|
uint8_t gui_serial_port_name[FILE_PATH_SIZE];
|
||||||
|
|
||||||
// Serial port that we are communicating with the PM3 on.
|
// Serial port that we are communicating with the PM3 on.
|
||||||
static serial_port sp = NULL;
|
static serial_port sp = NULL;
|
||||||
|
|
||||||
|
@ -568,6 +570,9 @@ bool OpenProxmark(void *port, bool wait_for_port, int timeout, bool flash_mode,
|
||||||
uint16_t len = MIN(strlen(portname), FILE_PATH_SIZE - 1);
|
uint16_t len = MIN(strlen(portname), FILE_PATH_SIZE - 1);
|
||||||
memset(conn.serial_port_name, 0, FILE_PATH_SIZE);
|
memset(conn.serial_port_name, 0, FILE_PATH_SIZE);
|
||||||
memcpy(conn.serial_port_name, portname, len);
|
memcpy(conn.serial_port_name, portname, len);
|
||||||
|
|
||||||
|
memset(gui_serial_port_name, 0, FILE_PATH_SIZE);
|
||||||
|
memcpy(gui_serial_port_name, portname, len);
|
||||||
}
|
}
|
||||||
conn.run = true;
|
conn.run = true;
|
||||||
conn.block_after_ACK = flash_mode;
|
conn.block_after_ACK = flash_mode;
|
||||||
|
|
|
@ -44,6 +44,7 @@ typedef enum {
|
||||||
FPGA_MEM,
|
FPGA_MEM,
|
||||||
} DeviceMemType_t;
|
} DeviceMemType_t;
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
bool run; // If TRUE, continue running the uart_communication thread
|
bool run; // If TRUE, continue running the uart_communication thread
|
||||||
bool block_after_ACK; // if true, block after receiving an ACK package
|
bool block_after_ACK; // if true, block after receiving an ACK package
|
||||||
|
@ -60,6 +61,8 @@ typedef struct {
|
||||||
|
|
||||||
extern communication_arg_t conn;
|
extern communication_arg_t conn;
|
||||||
|
|
||||||
|
extern uint8_t gui_serial_port_name[FILE_PATH_SIZE];
|
||||||
|
|
||||||
void *uart_receiver(void *targ);
|
void *uart_receiver(void *targ);
|
||||||
void SendCommandBL(uint64_t cmd, uint64_t arg0, uint64_t arg1, uint64_t arg2, void *data, size_t len);
|
void SendCommandBL(uint64_t cmd, uint64_t arg0, uint64_t arg1, uint64_t arg2, void *data, size_t len);
|
||||||
void SendCommandOLD(uint64_t cmd, uint64_t arg0, uint64_t arg1, uint64_t arg2, void *data, size_t len);
|
void SendCommandOLD(uint64_t cmd, uint64_t arg0, uint64_t arg1, uint64_t arg2, void *data, size_t len);
|
||||||
|
|
|
@ -18,6 +18,7 @@ extern "C" {
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
//#include "comms.h"
|
||||||
|
|
||||||
void ShowGraphWindow(void);
|
void ShowGraphWindow(void);
|
||||||
void HideGraphWindow(void);
|
void HideGraphWindow(void);
|
||||||
|
@ -55,6 +56,12 @@ extern size_t g_DemodStartIdx;
|
||||||
extern bool showDemod;
|
extern bool showDemod;
|
||||||
extern uint8_t g_debugMode;
|
extern uint8_t g_debugMode;
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef FILE_PATH_SIZE
|
||||||
|
#define FILE_PATH_SIZE 1000
|
||||||
|
#endif
|
||||||
|
extern uint8_t gui_serial_port_name[FILE_PATH_SIZE];
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -197,11 +197,22 @@ ProxWidget::ProxWidget(QWidget *parent, ProxGuiQT *master) : QWidget(parent) {
|
||||||
QVBoxLayout *layout = new QVBoxLayout;
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
layout->addWidget(plot);
|
layout->addWidget(plot);
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
show(); // places the window on the screen.
|
|
||||||
|
// plot window title
|
||||||
|
QString pt = QString("[*]Plot [ %1 ]").arg((char*)gui_serial_port_name);
|
||||||
|
setWindowTitle(pt);
|
||||||
|
|
||||||
|
// shows plot window on the screen.
|
||||||
|
show();
|
||||||
|
|
||||||
// Move controller widget below plot
|
// Move controller widget below plot
|
||||||
controlWidget->move(x(), y() + frameSize().height());
|
controlWidget->move(x(), y() + frameSize().height());
|
||||||
controlWidget->resize(size().width(), 200);
|
controlWidget->resize(size().width(), 200);
|
||||||
|
|
||||||
|
// Olverlays / slider window title
|
||||||
|
QString ct = QString("[*]Slider [ %1 ]").arg((char*)gui_serial_port_name);
|
||||||
|
controlWidget->setWindowTitle(ct);
|
||||||
|
|
||||||
controlWidget->show();
|
controlWidget->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Overlays</string>
|
<string>Sliders</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue