Debug updates.

This commit is contained in:
Christoph Holzheuer
2026-01-08 14:55:47 +01:00
parent c40f288aaa
commit f19a33cc5f
14 changed files with 154 additions and 138 deletions

View File

@@ -31,6 +31,7 @@
#include <QFile>
#include <QTimer>
#include <QMessageBox>
#include "qassert.h"
#include <bcmainwindow.h>
@@ -139,16 +140,27 @@ void BCMainWindow::initMainWindow()
_transmitter.moveToThread(&_worker);
_worker.start();
// die Daten des eBikes laden
_dataManager.loadXmlBikeData(":/bikeinfo.xml"_L1);
try
{
// die Daten des eBikes laden
_dataManager.loadXmlBikeData(":/bikeinfo.xml"_L1);
}
catch( BCException& exception )
{
QMessageBox::critical( this, "Ladefehler", exception.what() );
}
// Konsolendaten als erstes anzeigen
_consoleAction->trigger();
//_batteryAction->trigger();
/*
// Dummy sync beim starten
QTimer::singleShot(1000, this, [this]()
{
onSyncDeviceView();
});
*/
}
@@ -265,8 +277,15 @@ void BCMainWindow::onShowDevicePanel( BCDevice::ID deviceID )
{
_currentPanel = nxtPanel;
setHeaderLabel( _currentPanel->property( cBCKeyHeaderLabel ).toString() );
_stackedWidget->setCurrentWidget( nxtPanel );
_stackedWidget->setCurrentWidget( _currentPanel );
if( _currentPanel->firstExpose() )
{
// Dummy sync beim starten
QTimer::singleShot(1000, this, [this]()
{
onSyncDeviceView();
});
}
// knopf auch abschalten?
}
}
@@ -312,7 +331,7 @@ void BCMainWindow::onSyncDeviceView()
{
qDebug() << " --- ### begin sync of value: " << QThread::currentThreadId() << " : " << value->label;
// wir setzen auf 'lesen'
value->flags.setFlag( BCValue::Flag::ReadMe );
value->valueFlags.setFlag( BCValue::Flag::ReadMe );
_syncButton->setEnabled( false );