Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions FreeSSM.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ HEADERS += src/FreeSSM.h \
src/Languages.h \
src/CmdLine.h \
src/EngineDialog.h \
src/TPMSdialog.h \
src/TransmissionDialog.h \
src/ABSdialog.h \
src/CruiseControlDialog.h \
Expand Down Expand Up @@ -48,6 +49,8 @@ HEADERS += src/FreeSSM.h \
src/CUcontent_DCs_engine.h \
src/CUcontent_DCs_twoMemories.h \
src/CUcontent_DCs_stopCodes.h \
src/LocalIdentifier.h \
src/CUcontent_LocalIdentifiers.h \
src/CUcontent_MBsSWs.h \
src/CUcontent_MBsSWs_tableView.h \
src/CUcontent_Adjustments.h \
Expand All @@ -69,6 +72,7 @@ SOURCES += src/main.cpp \
src/FreeSSM.cpp \
src/CmdLine.cpp \
src/EngineDialog.cpp \
src/TPMSdialog.cpp \
src/TransmissionDialog.cpp \
src/ABSdialog.cpp \
src/CruiseControlDialog.cpp \
Expand All @@ -89,6 +93,7 @@ SOURCES += src/main.cpp \
src/SSMP2communication_core.cpp \
src/AbstractSSMcommunication.cpp \
src/SSMprotocol.cpp \
src/SSM3protocolTPMS.cpp \
src/SSMprotocol1.cpp \
src/SSMprotocol2.cpp \
src/AddMBsSWsDlg.cpp \
Expand All @@ -100,6 +105,7 @@ SOURCES += src/main.cpp \
src/CUcontent_DCs_engine.cpp \
src/CUcontent_DCs_twoMemories.cpp \
src/CUcontent_DCs_stopCodes.cpp \
src/CUcontent_LocalIdentifiers.cpp \
src/CUcontent_MBsSWs.cpp \
src/CUcontent_MBsSWs_tableView.cpp \
src/CUcontent_Adjustments.cpp \
Expand Down
1 change: 1 addition & 0 deletions resources/FreeSSM.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<file>icons/freessm/64x64/AirCon.png</file>
<file>icons/freessm/64x64/CruiseControl.png</file>
<file>icons/freessm/64x64/Engine.png</file>
<file>icons/freessm/64x64/TirePressure.png</file>
<file>icons/freessm/64x64/Transmission.png</file>
<file>icons/oxygen/16x16/chronometer.png</file>
<file>icons/oxygen/22x22/applications-utilities.png</file>
Expand Down
3 changes: 3 additions & 0 deletions resources/changelog_en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ next release (current development snapshot):
- Added experimental support for J2534 interfaces
- Added experimental support for AT command controlled interfaces
- Added experimental support for SSM2 over ISO-15765 (CAN)
- Added experimental support for TPMS control units
- Added TPMS diagnostic code reading and clear-memory support
- Added TPMS transmitter ID and live data displays
- Added support for the old SSM1 communication protocol
- Added basic support for additional control units: ABS/VDC, CC, A/C
(SSM1 only, definitions incomplete)
Expand Down
Binary file added resources/icons/freessm/64x64/TirePressure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/AbstractDiagInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ std::string AbstractDiagInterface::protocolDescription(protocol_type protocol)
return "SSM2 / ISO-14230";
case protocol_type::SSM2_ISO15765:
return "SSM2 / ISO-15765";
case protocol_type::SSM3_ISO14230:
return "SSM3 / ISO-14230";
default: // BUG
return "UNKNOWN";
}
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractDiagInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class AbstractDiagInterface

public:
enum class interface_type { serialPassThrough, J2534, ATcommandControlled };
enum class protocol_type { NONE, SSM1, SSM2_ISO14230, SSM2_ISO15765 }; // NOTE: when adding new protocols, also enhance protocolDescription(...) !
enum class protocol_type { NONE, SSM1, SSM2_ISO14230, SSM2_ISO15765, SSM3_ISO14230 }; // NOTE: when adding new protocols, also enhance protocolDescription(...) !

AbstractDiagInterface();
virtual ~AbstractDiagInterface();
Expand Down
3 changes: 3 additions & 0 deletions src/CUcontent_DCs_abstract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ void CUcontent_DCs_abstract::printDCprotocol()
case CUtype::AirCon:
CU = tr("Air Conditioning");
break;
case CUtype::TPMS:
CU = tr("Tire Pressure Monitoring System");
break;
case CUtype::FourWheelSteering:
CU = tr("4 Wheel Steering");
break;
Expand Down
154 changes: 154 additions & 0 deletions src/CUcontent_LocalIdentifiers.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
/*
* CUcontent_LocalIdentifiers.cpp - Widget for local identifier data
*
* Copyright (C) 2026
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/

#include "CUcontent_LocalIdentifiers.h"


CUcontent_LocalIdentifiers::CUcontent_LocalIdentifiers(QWidget *parent) : QWidget(parent)
{
_SSMPdev = NULL;

QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setContentsMargins(0, 0, 0, 0);
mainLayout->setSpacing(6);

_sectionsLayout = new QVBoxLayout();
_sectionsLayout->setContentsMargins(0, 0, 0, 0);
_sectionsLayout->setSpacing(6);
mainLayout->addLayout(_sectionsLayout);

QHBoxLayout *buttonLayout = new QHBoxLayout();
buttonLayout->addStretch();
_refreshButton = new QPushButton(tr("Refresh"), this);
_refreshButton->setMinimumSize(90, 34);
buttonLayout->addWidget(_refreshButton);
mainLayout->addLayout(buttonLayout);

connect(_refreshButton, SIGNAL(released()), this, SLOT(refreshData()));
}


CUcontent_LocalIdentifiers::~CUcontent_LocalIdentifiers()
{
disconnect(_refreshButton, SIGNAL(released()), this, SLOT(refreshData()));
}


bool CUcontent_LocalIdentifiers::setup(SSMprotocol *SSMPdev)
{
_SSMPdev = SSMPdev;
if (_SSMPdev == NULL)
return false;
return readAndDisplayData();
}


void CUcontent_LocalIdentifiers::refreshData()
{
if (!readAndDisplayData())
{
emit error();
return;
}
}


bool CUcontent_LocalIdentifiers::readAndDisplayData()
{
if (_SSMPdev == NULL)
return false;

std::vector<local_identifier_section_dt> sections;
if (!_SSMPdev->readLocalIdentifierData(&sections))
return false;

clearSections();
for (std::vector<local_identifier_section_dt>::const_iterator it = sections.begin(); it != sections.end(); ++it)
addSection(*it);
return true;
}


void CUcontent_LocalIdentifiers::clearSections()
{
QLayoutItem *item = NULL;
while ((item = _sectionsLayout->takeAt(0)) != NULL)
{
if (item->widget() != NULL)
delete item->widget();
delete item;
}
}


void CUcontent_LocalIdentifiers::addSection(const local_identifier_section_dt& section)
{
QFont titleFont = font();
titleFont.setUnderline(true);

QLabel *titleLabel = new QLabel(section.title, this);
titleLabel->setFont(titleFont);
_sectionsLayout->addWidget(titleLabel);

if (!section.rawValue.isEmpty())
{
QLabel *rawLabel = new QLabel(tr("Raw: %1").arg(section.rawValue), this);
_sectionsLayout->addWidget(rawLabel);
}

if (section.rows.empty())
return;

int columnCount = section.columnHeaders.size();
if (columnCount == 0)
columnCount = section.rows.at(0).size();
if (columnCount == 0)
return;

QTableWidget *table = new QTableWidget(static_cast<int>(section.rows.size()), columnCount, this);
setupTable(table);
if (section.columnHeaders.size() == columnCount)
table->setHorizontalHeaderLabels(section.columnHeaders);
for (std::size_t row = 0; row < section.rows.size(); row++)
{
const QStringList& values = section.rows.at(row);
for (int column = 0; column < columnCount; column++)
{
QTableWidgetItem *item = new QTableWidgetItem();
if (column == 0)
item->setTextAlignment(Qt::AlignCenter);
item->setText((column < values.size()) ? values.at(column) : "");
table->setItem(static_cast<int>(row), column, item);
}
}
_sectionsLayout->addWidget(table);
}


void CUcontent_LocalIdentifiers::setupTable(QTableWidget *table)
{
table->setEditTriggers(QAbstractItemView::NoEditTriggers);
table->setAlternatingRowColors(true);
table->setSelectionBehavior(QAbstractItemView::SelectRows);
table->verticalHeader()->hide();
table->setColumnWidth(0, 70);
#if QT_VERSION < 0x050000
table->horizontalHeader()->setResizeMode(0, QHeaderView::Interactive);
for (int column = 1; column < table->columnCount(); column++)
table->horizontalHeader()->setResizeMode(column, QHeaderView::Stretch);
table->verticalHeader()->setResizeMode(QHeaderView::Fixed);
#else
table->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Interactive);
for (int column = 1; column < table->columnCount(); column++)
table->horizontalHeader()->setSectionResizeMode(column, QHeaderView::Stretch);
table->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed);
#endif
}
53 changes: 53 additions & 0 deletions src/CUcontent_LocalIdentifiers.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* CUcontent_LocalIdentifiers.h - Widget for local identifier data
*
* Copyright (C) 2026
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/

#ifndef CUCONTENT_LOCALIDENTIFIERS_H
#define CUCONTENT_LOCALIDENTIFIERS_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QtGui>
#else
#include <QtWidgets>
#endif
#include "LocalIdentifier.h"
#include "SSMprotocol.h"


class CUcontent_LocalIdentifiers : public QWidget
{
Q_OBJECT

public:
CUcontent_LocalIdentifiers(QWidget *parent = 0);
~CUcontent_LocalIdentifiers();
bool setup(SSMprotocol *SSMPdev);

signals:
void error();

private slots:
void refreshData();

private:
SSMprotocol *_SSMPdev;
QVBoxLayout *_sectionsLayout;
QPushButton *_refreshButton;

bool readAndDisplayData();
void clearSections();
void addSection(const local_identifier_section_dt& section);
void setupTable(QTableWidget *table);
};


#endif
Loading