-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7f87295
Showing
194 changed files
with
136,145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Project exclude paths | ||
/cmake-build-debug/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
cmake_minimum_required(VERSION 3.24) | ||
project(FruitySerial) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
set(imgui_SOURCE_DIR ${imgui_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/imGui) | ||
set(tools_PATH ${tools_PATH} ${CMAKE_SOURCE_DIR}/Tools) | ||
set(uiDisplays_PATH ${uiDisplays_PATH} ${CMAKE_SOURCE_DIR}/UIDisplays) | ||
set(data_PATH ${data_PATH} ${CMAKE_SOURCE_DIR}/Data) | ||
set(manager_PATH ${manager_PATH} ${CMAKE_SOURCE_DIR}/Manager) | ||
set(serial_PATH ${serial_PATH} ${CMAKE_SOURCE_DIR}/Serial) | ||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) | ||
set(SDL2_PATH "SDL2") | ||
set(SDL2_IMAGE_PATH "SDL2") | ||
|
||
find_package(OpenGL REQUIRED) | ||
find_package(SDL2 REQUIRED) | ||
find_package(SDL2_image REQUIRED) | ||
|
||
add_subdirectory(serial) | ||
|
||
add_library(imgui | ||
${imgui_SOURCE_DIR}/imgui.cpp | ||
${imgui_SOURCE_DIR}/imgui.h | ||
${imgui_SOURCE_DIR}/imconfig.h | ||
${imgui_SOURCE_DIR}/imgui_demo.cpp | ||
${imgui_SOURCE_DIR}/imgui_draw.cpp | ||
${imgui_SOURCE_DIR}/imgui_internal.h | ||
${imgui_SOURCE_DIR}/imgui_tables.cpp | ||
${imgui_SOURCE_DIR}/imgui_widgets.cpp | ||
${imgui_SOURCE_DIR}/imstb_rectpack.h | ||
${imgui_SOURCE_DIR}/imstb_textedit.h | ||
${imgui_SOURCE_DIR}/imstb_truetype.h | ||
${imgui_SOURCE_DIR}/backends/imgui_impl_sdl.h | ||
${imgui_SOURCE_DIR}/backends/imgui_impl_sdl.cpp | ||
${imgui_SOURCE_DIR}/backends/imgui_impl_opengl3.h | ||
${imgui_SOURCE_DIR}/backends/imgui_impl_opengl3.cpp | ||
${imgui_SOURCE_DIR}/backends/imgui_impl_opengl3_loader.h) | ||
|
||
include_directories(${SDL2_INCLUDE_DIR} | ||
${SDL2_IMAGE_INCLUDE_DIR} | ||
${imgui_SOURCE_DIR} | ||
${tools_PATH} | ||
${uiDisplays_PATH} | ||
${data_PATH} | ||
${manager_PATH} | ||
${serial_PATH}) | ||
|
||
#link_directories(${SDL2_LIBRARY}) | ||
|
||
add_executable(FruitySerial main.cpp | ||
UIDisplays/Hud.cpp | ||
UIDisplays/Hud.h | ||
Data/DTypes.h | ||
Tools/stb_image.h | ||
Tools/FunctionTools.cpp | ||
Tools/FunctionTools.h | ||
UIDisplays/SubWindow.cpp | ||
UIDisplays/SubWindow.h | ||
UIDisplays/MainWindow.cpp | ||
UIDisplays/MainWindow.h | ||
UIDisplays/TabSerialWindow.cpp | ||
UIDisplays/TabSerialWindow.h | ||
Manager/SerialManager.cpp | ||
Manager/SerialManager.h | ||
Manager/SerialConnection.cpp | ||
Manager/SerialConnection.h | ||
Data/LineData.cpp | ||
Data/LineData.h | ||
Tools/ClockTime.cpp | ||
Tools/ClockTime.h) | ||
|
||
|
||
target_include_directories(${PROJECT_NAME} PUBLIC ${imgui_SOURCE_DIR} ${imgui_SOURCE_DIR}/backends) | ||
|
||
target_link_libraries(${PROJECT_NAME} | ||
OpenGL::GL | ||
${SDL2_LIBRARY} | ||
${SDL2_IMAGE_LIBRARY} | ||
imgui | ||
serial | ||
mingw32 | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
// | ||
// Created by castdata on 1/15/23. | ||
// | ||
#pragma once | ||
#ifndef MASTERSERIALMONITOR_DTYPES_H | ||
#define MASTERSERIALMONITOR_DTYPES_H | ||
|
||
#include "serial/serial.h" | ||
|
||
typedef enum {DARK, CLASSIC, LIGHT} UI_Theme; | ||
typedef enum {OFF, DOWN, UP, ON} BtnState; | ||
typedef enum {IDLE, SAVE, LOAD, MENU} AppState; | ||
typedef enum {DISABLE, EN_TIME} TimeStamp; | ||
|
||
typedef enum { | ||
fivebits = 5, | ||
sixbits = 6, | ||
sevenbits = 7, | ||
eigthbits = 8 | ||
} serialByteSize; | ||
|
||
typedef enum { | ||
parity_none = 0, | ||
parity_odd = 1, | ||
parity_even = 2, | ||
parity_mark = 3, | ||
parity_space = 4 | ||
} serialParity; | ||
|
||
typedef enum { | ||
stopbits_one = 1, | ||
stopbits_two = 2, | ||
stopbits_one_point_five | ||
} serialStopbits; | ||
|
||
typedef enum { | ||
flowcontrol_none = 0, | ||
flowcontrol_software, | ||
flowcontrol_hardware | ||
} serialFlowcontrol; | ||
|
||
typedef enum { | ||
baud_300 = 0, | ||
baud_1200, | ||
baud_2400, | ||
baud_4800, | ||
baud_9600, | ||
baud_19200, | ||
baud_38400, | ||
baud_57600, | ||
baud_74880, | ||
baud_115200, | ||
baud_230400, | ||
baud_250000, | ||
baud_500000, | ||
baud_1000000, | ||
baud_2000000 | ||
} serialBaudrate; | ||
|
||
typedef enum { | ||
noLine, | ||
newLine, | ||
carrieReturn, | ||
crAndLf | ||
} serialEndOfLine; | ||
|
||
typedef enum { | ||
RAW_DEC, | ||
RAW_HEX, | ||
UTF_8, | ||
UTF_8_SPECIAL, | ||
UTF_8_RAW_DEC, | ||
UTF_8_RAW_HEX | ||
} TextEncoding; | ||
|
||
typedef struct{ | ||
bool exitApp; | ||
} MenuData; | ||
|
||
typedef struct{ | ||
bool disableExitMessage; | ||
int windowCount; | ||
int connectionCount; | ||
UI_Theme uiTheme; | ||
int windowPosX; | ||
int windowPosY; | ||
int windowSizeW; | ||
int windowSizeH; | ||
AppState appState; | ||
bool cursorOverSubWinBorder; | ||
ImFont* monoFont; | ||
} AppData; | ||
|
||
typedef struct{ | ||
BtnState mouseBtnRight; | ||
BtnState mouseBtnLeft; | ||
ImVec2 mouseCursorPosition; | ||
} IOData; | ||
|
||
|
||
typedef struct{ | ||
serial::PortInfo portInfo; | ||
bool used; | ||
bool enable; | ||
bool updateIt; | ||
} SerialPortData; | ||
|
||
typedef struct{ | ||
BtnState mouseBtnLeft; | ||
int windowSizeW; | ||
int windowSizeH; | ||
} HitTestData; | ||
|
||
|
||
const char* const dataFileName = "data.bin"; | ||
|
||
static const float LEGACY_WIDTH = 1920.0f; | ||
static const float LEGACY_HEIGHT = 1080.0f; | ||
|
||
static const int MENU_BAR_HIGHT = 32; | ||
static const int RESIZE_OFFSET = 10; | ||
|
||
static const ImU32 DARK_WINDOW_BG_COL = IM_COL32(0,0,0,255); | ||
static const ImU32 LIGHT_WINDOW_BG_COL = IM_COL32(255,255,255,255); | ||
|
||
static const ImU32 DARK_BRACKET_COL = IM_COL32(0, 255, 255, 255); | ||
static const ImU32 DARK_SPECIAL_UTF8_COL = IM_COL32(255, 0, 0, 255); | ||
|
||
static const ImU32 LIGHT_BRACKET_COL = IM_COL32(0, 100, 255, 255); | ||
static const ImU32 LIGHT_SPECIAL_UTF8_COL = IM_COL32(255, 0, 0, 255); | ||
|
||
static const char* BAUDRATE_ITEMS[] = {"300 baud","1200 baud", "2400 baud", "4800 baud", "9600 baud", "19200 baud", | ||
"38400 baud", "57600 baud", "74880 baud", "115200 baud", "230400 baud", | ||
"250000 baud", "500000 baud", "1000000 baud", "2000000 baud"}; | ||
|
||
#endif //MASTERSERIALMONITOR_DTYPES_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// | ||
// Created by castdata on 2/17/2023. | ||
// | ||
|
||
#include "LineData.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// Created by castdata on 2/17/2023. | ||
// | ||
|
||
#ifndef TASTYSERIAL_LINEDATA_H | ||
#define TASTYSERIAL_LINEDATA_H | ||
|
||
|
||
class LineData { | ||
public: | ||
|
||
private: | ||
|
||
}; | ||
|
||
|
||
#endif //TASTYSERIAL_LINEDATA_H |
Oops, something went wrong.