style refactor
This commit is contained in:
+18
-18
@@ -5,38 +5,38 @@
|
||||
#include <string>
|
||||
#include <libserialport.h>
|
||||
|
||||
struct SerialPortInfo {
|
||||
std::string port_name;
|
||||
std::string description;
|
||||
};
|
||||
|
||||
class ConnectionWindow {
|
||||
public:
|
||||
ConnectionWindow();
|
||||
~ConnectionWindow();
|
||||
|
||||
void Initialize();
|
||||
void Render(bool* p_open);
|
||||
void initialize();
|
||||
void render(bool* p_open);
|
||||
|
||||
bool IsConnected() const { return is_connected; }
|
||||
struct sp_port* GetActivePort() const { return active_port; }
|
||||
bool isConnected() const { return connected; }
|
||||
struct sp_port* getActivePort() const { return activePort; }
|
||||
|
||||
void ForceLogMessage(const std::string& msg);
|
||||
std::string& GetSharedLog() { return tx_log; }
|
||||
void forceLogMessage(const std::string& msg);
|
||||
std::string& getSharedLog() { return txLog; }
|
||||
|
||||
private:
|
||||
void RefreshPorts();
|
||||
void refreshPorts();
|
||||
|
||||
struct SerialPortInfo {
|
||||
std::string portName;
|
||||
std::string description;
|
||||
};
|
||||
|
||||
std::vector<SerialPortInfo> ports;
|
||||
int selected_port_idx;
|
||||
int selectedPortIdx;
|
||||
|
||||
// Новые переменные для выпадающего списка Baud Rate
|
||||
std::vector<int> baud_rates;
|
||||
int selected_baud_idx;
|
||||
std::vector<int> baudRates;
|
||||
int selectedBaudIdx;
|
||||
|
||||
bool is_connected;
|
||||
struct sp_port* active_port;
|
||||
std::string tx_log;
|
||||
bool connected;
|
||||
struct sp_port* activePort;
|
||||
std::string txLog;
|
||||
};
|
||||
|
||||
#endif // SERIAL_SAMPLE_CONNECTIONWINDOW_H
|
||||
|
||||
Reference in New Issue
Block a user