0.0.0.58
This commit is contained in:
parent
85c8dfc78a
commit
5c0eaeca44
948
QtTermTCP.cpp
948
QtTermTCP.cpp
File diff suppressed because it is too large
Load Diff
21
QtTermTCP.h
21
QtTermTCP.h
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <QMainWindow>
|
||||
#include "ui_QtTermTCP.h"
|
||||
//#include "ui_ListenPort.h"
|
||||
//#include "ui_AGWParams.h"
|
||||
//#include "ui_AGWConnect.h"
|
||||
#include "ui_ColourConfig.h"
|
||||
|
@ -62,6 +61,7 @@ public:
|
|||
QTextEdit *termWindow;
|
||||
QTextEdit *monWindow;
|
||||
QLineEdit *inputWindow;
|
||||
QLabel * TTLabel;
|
||||
|
||||
myTcpSocket *clientSocket;
|
||||
|
||||
|
@ -98,12 +98,26 @@ public:
|
|||
char UIDEST[32];
|
||||
char UIPATH[128];
|
||||
|
||||
// For Teletext Emulator
|
||||
|
||||
QImage * TTBitmap; // TT Image buffer
|
||||
QDialog TTUI;
|
||||
|
||||
int TTActive;
|
||||
int TTFlashToggle;
|
||||
char pageBuffer[4096];
|
||||
QBasicTimer timer;
|
||||
|
||||
protected:
|
||||
|
||||
private slots:
|
||||
void timerEvent(QTimerEvent *event) override;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
private slots:
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -141,10 +155,13 @@ private slots:
|
|||
void devicereject();
|
||||
void showContextMenuM(const QPoint &pt);
|
||||
void showContextMenuT(const QPoint &pt);
|
||||
void showContextMenuL();
|
||||
void doQuit();
|
||||
void onTEselectionChanged();
|
||||
void onLEselectionChanged();
|
||||
void setSplit();
|
||||
void setVDMode();
|
||||
void showContextMenuMT(const QPoint & pt);
|
||||
void onNewConnection();
|
||||
void onSocketStateChanged(QAbstractSocket::SocketState socketState);
|
||||
void updateWindowMenu();
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
<IntDir>$(SolutionDir)Intermed\$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetName>QtTermTCP</TargetName>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
|
@ -66,11 +67,11 @@
|
|||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<QtInstall>msvc2017</QtInstall>
|
||||
<QtInstall>msvc2017 5.14</QtInstall>
|
||||
<QtModules>core;network;gui;widgets;serialport</QtModules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<QtInstall>msvc2017</QtInstall>
|
||||
<QtInstall>msvc2017 5.14</QtInstall>
|
||||
<QtModules>core;network;gui;widgets;serialport</QtModules>
|
||||
</PropertyGroup>
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
|
||||
|
@ -146,7 +147,7 @@
|
|||
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<BrowseInformation>false</BrowseInformation>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4577;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ObjectFileName>$(intdir)</ObjectFileName>
|
||||
|
@ -170,6 +171,7 @@
|
|||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<Midl>
|
||||
<DefaultCharType>Unsigned</DefaultCharType>
|
||||
|
@ -203,7 +205,9 @@
|
|||
<ItemGroup>
|
||||
<ClCompile Include="AGWCode.cpp" />
|
||||
<ClCompile Include="hid.c" />
|
||||
<ClCompile Include="QtTermTCP.cpp" />
|
||||
<ClCompile Include="QtTermTCP.cpp">
|
||||
<DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TabDialog.cpp" />
|
||||
<ClCompile Include="TermTCPCommon.cpp" />
|
||||
<ClCompile Include="UZ7HOUtils.c" />
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
<QtLastBackgroundBuild>2022-05-19T07:28:58.9302359Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<QtLastBackgroundBuild>2022-08-30T07:53:00.9638702Z</QtLastBackgroundBuild>
|
||||
<QtLastBackgroundBuild>2022-11-21T13:52:08.2843113Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<QtLastBackgroundBuild>2022-08-30T07:53:22.4120059Z</QtLastBackgroundBuild>
|
||||
<QtLastBackgroundBuild>2022-11-20T17:39:52.6268704Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,6 +1,6 @@
|
|||
#include <windows.h>
|
||||
|
||||
IDI_ICON1 ICON DISCARDABLE "C:\\Users\\John\\OneDrive\\Dev\\Source\\QT\\QtTermTCP\\QtTermTCP.ico"
|
||||
IDI_ICON1 ICON DISCARDABLE "QtTermTCP.ico"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,0,0,0
|
||||
|
|
|
@ -519,6 +519,7 @@ extern QMenu * connectMenu;
|
|||
extern QMenu * disconnectMenu;
|
||||
|
||||
TAX25Port DummyPort;
|
||||
extern "C" TAX25Port * get_user_port_by_calls(int snd_ch, char * CallFrom, char * CallTo);
|
||||
|
||||
void KISSConnect::myaccept()
|
||||
{
|
||||
|
@ -529,6 +530,25 @@ void KISSConnect::myaccept()
|
|||
strcpy(CallTo, wCallTo->currentText().toUpper().toUtf8());
|
||||
strcpy(Via, Digis->text().toUpper().toUtf8());
|
||||
|
||||
TAX25Port * AX25Sess = 0;
|
||||
|
||||
// Check for duplicate session
|
||||
|
||||
AX25Sess = get_user_port_by_calls(0, MYCALL, CallTo);
|
||||
|
||||
if (AX25Sess)
|
||||
{
|
||||
// Duplicate
|
||||
|
||||
char Msg[256];
|
||||
|
||||
int Len = sprintf(Msg, "You already have a session between %s and %s so can't connect\r", MYCALL, CallTo);
|
||||
|
||||
WritetoOutputWindow(ActiveSession, (unsigned char *)Msg, Len);
|
||||
// KISSConnect::accept();
|
||||
return;
|
||||
}
|
||||
|
||||
KISSMode = UIMode->isChecked();
|
||||
|
||||
// Add CallTo if not already in list
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TeleTextDialog</class>
|
||||
<widget class="QDialog" name="TeleTextDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>665</width>
|
||||
<height>551</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>224</x>
|
||||
<y>516</y>
|
||||
<width>153</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="okButton">
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QLabel" name="Page">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>28</x>
|
||||
<y>20</y>
|
||||
<width>600</width>
|
||||
<height>475</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>okButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>TeleTextDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>278</x>
|
||||
<y>253</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>96</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cancelButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>TeleTextDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>369</x>
|
||||
<y>253</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>179</x>
|
||||
<y>282</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
|
@ -33,6 +33,8 @@ int ProcessYAPPMessage(Ui_ListenSession * Sess, UCHAR * Msg, int Len);
|
|||
void SetPortMonLine(int i, char * Text, int visible, int enabled);
|
||||
void AGW_AX25_data_in(void * Sess, UCHAR * data, int Len);
|
||||
int checkUTF8(unsigned char * Msg, int Len, unsigned char * out);
|
||||
void DoTermResize(Ui_ListenSession * Sess);
|
||||
void DecodeTeleText(Ui_ListenSession * Sess, char * page);
|
||||
|
||||
int Bells = TRUE;
|
||||
int StripLF = FALSE;
|
||||
|
@ -40,6 +42,8 @@ int LogMonitor = FALSE;
|
|||
int LogOutput = FALSE;
|
||||
int SendDisconnected = TRUE;
|
||||
int ChatMode = TRUE;
|
||||
int AutoTeletext = 1;
|
||||
|
||||
int MonPorts = 1;
|
||||
int ListenOn = FALSE;
|
||||
|
||||
|
@ -173,6 +177,54 @@ void ProcessReceivedData(Ui_ListenSession * Sess, unsigned char * Buffer, int le
|
|||
return;
|
||||
}
|
||||
|
||||
// See if Teletext data
|
||||
|
||||
// We need to identify a viewdata frame. Seems to start
|
||||
|
||||
//1e 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a ........ ........
|
||||
//00000170 0a 0a 0a 0a 0a 0a 0a 0a 11 0c 1b
|
||||
|
||||
// Page seems to start 1c
|
||||
|
||||
// After page get
|
||||
|
||||
//1e 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a ........ ........
|
||||
// 0000049D 0a 0a 0a 0a 0a 0a 0a 0a 11 14 1b 44 1b 5d 1b 43 ........ ...D.].C
|
||||
// 000004AD 53 65 6c 65 Sele
|
||||
// 000004B1 63 74 20 69 74 65 6d 20 6f 72 1b 47 2a 70 61 67 ct item or .G*pag
|
||||
// 000004C1 65 5f 20 3a 20 20 20 20 20 20 20 20 20 20 20 20 e_ :
|
||||
// 000004D1 20 0d 09 09 09 09 09 09 09 09 09 09 09 09 09 09 ....... ........
|
||||
// 000004E1 09 09 09 09 09 09 09 09 09 09 09 09 09 11
|
||||
|
||||
Buffer[len] = 0;
|
||||
|
||||
if (AutoTeletext && (Buffer[0] == 0x1e || Buffer[0] == 0x0c))
|
||||
{
|
||||
if (Sess->TTActive == 0)
|
||||
{
|
||||
Sess->TTActive = 1;
|
||||
DoTermResize(Sess);
|
||||
}
|
||||
}
|
||||
|
||||
if (Sess->TTActive)
|
||||
{
|
||||
// Feed to Teletext code
|
||||
|
||||
// We need to decode a whole page. There is no obvious delimiter so process till data stops.
|
||||
// Buffer is cleared when next input is sent
|
||||
|
||||
if (strlen(&Sess->pageBuffer[0] + len) > 4090)
|
||||
Sess->pageBuffer[0] = 0; // Protect buffer
|
||||
|
||||
strcat(Sess->pageBuffer, (char *)Buffer);
|
||||
|
||||
DecodeTeleText(Sess, (char *)Sess->pageBuffer); // Re-decode same data until we get the end
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// mbstowcs(Buffer, BufferB, len);
|
||||
|
||||
// Look for MON delimiters (FF/FE)
|
||||
|
|
10
ax25_l2.c
10
ax25_l2.c
|
@ -26,6 +26,7 @@ UCHAR TimerEvent = TIMER_EVENT_OFF;
|
|||
extern int busy;
|
||||
int listenEnable;
|
||||
void * KISSSockCopy[4];
|
||||
extern UCHAR axMYCALL[7] = ""; // Mycall in ax.25
|
||||
|
||||
string * make_frame(string * data, Byte * path, Byte pid, Byte nr, Byte ns, Byte f_type, Byte f_id, boolean rpt, boolean pf, boolean cr);
|
||||
void rst_t3(TAX25Port * AX25Sess);
|
||||
|
@ -1545,6 +1546,11 @@ void analiz_frame(int snd_ch, string * frame, void * socket, boolean fecflag)
|
|||
|
||||
// No Session. If socket is set (so call is in incoming calls list) and SABM set up session
|
||||
|
||||
// Check addresses to us
|
||||
|
||||
if (memcmp(path, axMYCALL, 7) != 0)
|
||||
return; // ignore
|
||||
|
||||
if (listenEnable == 0)
|
||||
{
|
||||
set_DM(snd_ch, path);
|
||||
|
@ -1584,6 +1590,10 @@ void analiz_frame(int snd_ch, string * frame, void * socket, boolean fecflag)
|
|||
|
||||
// Must be SABM. See if it would duplicate an existing session (but could it - wouldn't that be found earlier ??
|
||||
|
||||
// Make sure it is for us
|
||||
|
||||
|
||||
|
||||
if (get_user_dupe(snd_ch, path)) // Not SABM or a duplicate call pair
|
||||
{
|
||||
freeString(data);
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#define _MSC_EXTENSIONS
|
||||
#define _INTEGRAL_MAX_BITS 64
|
||||
#define _MSC_VER 1916
|
||||
#define _MSC_FULL_VER 191627045
|
||||
#define _MSC_BUILD 0
|
||||
#define _WIN32
|
||||
#define _M_IX86 600
|
||||
#define _M_IX86_FP 2
|
||||
#define _CPPRTTI
|
||||
#define _DEBUG
|
||||
#define _MT
|
||||
#define _DLL
|
|
@ -0,0 +1,11 @@
|
|||
#define _MSC_EXTENSIONS
|
||||
#define _INTEGRAL_MAX_BITS 64
|
||||
#define _MSC_VER 1916
|
||||
#define _MSC_FULL_VER 191627045
|
||||
#define _MSC_BUILD 0
|
||||
#define _WIN32
|
||||
#define _M_IX86 600
|
||||
#define _M_IX86_FP 2
|
||||
#define _CPPRTTI
|
||||
#define _MT
|
||||
#define _DLL
|
Loading…
Reference in New Issue