-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconnectionPanel.h
More file actions
69 lines (46 loc) · 1.53 KB
/
connectionPanel.h
File metadata and controls
69 lines (46 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#pragma once
#include "wx/wx.h"
#include "dataPanel.h"
#include "COM_Communication.h"
#include <list>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
#include <fstream>
#include <shlobj.h>
class connectionPanel : public wxPanel
{
public:
connectionPanel(wxFrame* parent, dataPanel* new_rawPanel, COM_Communication* comHandle);
~connectionPanel();
void FillComboBoxes();
std::list<int> GetAvailableComPorts();
std::string get_desktop_path();
// ------ Buttons click functions ------ //
void ConnButtonClicked(wxCommandEvent& evt);
void RefreshButtonClicked(wxCommandEvent& evt);
void DisconnButtonClicked(wxCommandEvent& evt);
void ClearRawBox(wxCommandEvent& evt);
void SaveRawOutput(wxCommandEvent& evt);
wxDECLARE_EVENT_TABLE();
private:
// --------- Sizer --------- //
wxBoxSizer* s_connectlSizer = nullptr;
// -------- Buttons -------- //
wxButton* b_BtnConn = nullptr;
wxButton* b_BtnRefresh = nullptr;
wxButton* b_BtnDisconn = nullptr;
wxButton* b_BtnClearRaw = nullptr;
wxButton* b_BtnSaveOutput = nullptr;
// -------- Selectors -------- //
wxChoice* c_ComSelector = nullptr;
wxChoice* c_BaudSelector = nullptr;
// --------- Titles --------- //
wxStaticText* t_COMTitle = nullptr;
wxStaticText* t_BaudTitle = nullptr;
dataPanel* rawPanel;
int BaudRates[20] = { 300, 600, 750, 1200, 2400, 4800, 9600, 19200, 31250, 38400, 57600, 74880, 115200, 230400, 250000, 460800, 500000, 921600, 1000000, 2000000 };
bool disconnCheck = true;
COM_Communication* comHandle;
};