-- fy
This commit is contained in:
@@ -201,7 +201,7 @@ void BCAnimatedDelegate::paint(QPainter *painter, const QStyleOptionViewItem& op
|
||||
{
|
||||
case 1:
|
||||
|
||||
if( m_rowOpacities.contains(row))
|
||||
if(_rowOpacities.contains(row))
|
||||
paintHighlightRow(painter,option,index);
|
||||
break;
|
||||
|
||||
@@ -221,7 +221,7 @@ void BCAnimatedDelegate::paintHighlightRow(QPainter* painter, const QStyleOption
|
||||
painter->save();
|
||||
painter->setRenderHint(QPainter::Antialiasing);
|
||||
int row = index.row();
|
||||
qreal opacity = m_rowOpacities.value(row);
|
||||
qreal opacity =_rowOpacities.value(row);
|
||||
painter->setOpacity(opacity);
|
||||
// Margin von 4px
|
||||
QRect itemRect = option.rect.adjusted(3, 3, -3, -3);
|
||||
@@ -238,21 +238,6 @@ void BCAnimatedDelegate::paintHighlightRow(QPainter* painter, const QStyleOption
|
||||
|
||||
void BCAnimatedDelegate::paintSliderIndicator(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
|
||||
{
|
||||
|
||||
/*
|
||||
if (option.state & QStyle::State_Selected)
|
||||
{
|
||||
// 1. Die originale Highlight-Farbe holen (z.B. das Blau aus dem CSS)
|
||||
QColor highlightColor = option.palette.highlight().color();
|
||||
|
||||
// 2. Transparenz setzen (z.B. nur 30% Deckkraft für "Glass"-Effekt)
|
||||
highlightColor.setAlphaF(0.3); // 0.0 bis 1.0 (float ist oft lesbarer)
|
||||
|
||||
// 3. Zeichnen (Brush setzt die Füllfarbe)
|
||||
painter->fillRect(option.rect, highlightColor);
|
||||
}
|
||||
*/
|
||||
|
||||
const BCValue& bcValue = *(_valueList[ index.row()].get());
|
||||
|
||||
qDebug() << " --- paintSLider: " << bcValue.label << ": " << (int)bcValue.valueType;
|
||||
@@ -303,10 +288,10 @@ void BCAnimatedDelegate::paintSliderIndicator(QPainter* painter, const QStyleOpt
|
||||
void BCAnimatedDelegate::onHighlightRow(int row)
|
||||
{
|
||||
// Alte Animation für diese Zeile stoppen falls vorhanden
|
||||
if (m_rowAnimations.contains(row))
|
||||
if (_rowAnimations.contains(row))
|
||||
{
|
||||
m_rowAnimations[row]->stop();
|
||||
m_rowAnimations[row]->deleteLater();
|
||||
_rowAnimations[row]->stop();
|
||||
_rowAnimations[row]->deleteLater();
|
||||
}
|
||||
|
||||
// QVariantAnimation ist flexibler als QPropertyAnimation
|
||||
@@ -330,32 +315,32 @@ void BCAnimatedDelegate::onHighlightRow(int row)
|
||||
opacity = 1.0 - ((progress - 0.2) / 0.8); // 1->0 in 80%
|
||||
}
|
||||
|
||||
m_rowOpacities[row] = opacity;
|
||||
_rowOpacities[row] = opacity;
|
||||
updateRow(row);
|
||||
});
|
||||
|
||||
connect(anim, &QVariantAnimation::finished, this, [this, row, anim]()
|
||||
{
|
||||
m_rowOpacities.remove(row);
|
||||
m_rowAnimations.remove(row);
|
||||
_rowOpacities.remove(row);
|
||||
_rowAnimations.remove(row);
|
||||
updateRow(row);
|
||||
anim->deleteLater();
|
||||
});
|
||||
|
||||
m_rowAnimations[row] = anim;
|
||||
_rowAnimations[row] = anim;
|
||||
anim->start(QAbstractAnimation::DeleteWhenStopped);
|
||||
}
|
||||
|
||||
// Optional: alle Highlights sofort clearen
|
||||
void BCAnimatedDelegate::clearAllHighlights()
|
||||
{
|
||||
for(auto* anim : std::as_const(m_rowAnimations))
|
||||
for(auto* anim : std::as_const(_rowAnimations))
|
||||
{
|
||||
anim->stop();
|
||||
anim->deleteLater();
|
||||
}
|
||||
m_rowAnimations.clear();
|
||||
m_rowOpacities.clear();
|
||||
_rowAnimations.clear();
|
||||
_rowOpacities.clear();
|
||||
|
||||
if (_view)
|
||||
{
|
||||
|
||||
@@ -78,14 +78,18 @@ protected:
|
||||
void paintHighlightRow(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
||||
void paintSliderIndicator(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
||||
|
||||
// Das ist ein Quickhack, der Delegate sollte
|
||||
// nichts über die Originaldaten wissen. Die
|
||||
// Datenbeschaffung ist alleine Sache des Models.
|
||||
|
||||
const BCValueList& _valueList;
|
||||
QTableView* _view{};
|
||||
|
||||
QPropertyAnimation* _animation{};
|
||||
|
||||
|
||||
QHash<int, qreal> m_rowOpacities;
|
||||
QHash<int, QVariantAnimation*> m_rowAnimations;
|
||||
QHash<int, qreal> _rowOpacities;
|
||||
QHash<int, QVariantAnimation*> _rowAnimations;
|
||||
|
||||
};
|
||||
|
||||
|
||||
129
bcguihelpers.cpp
129
bcguihelpers.cpp
@@ -39,27 +39,7 @@ BCThemeSwitchButton::BCThemeSwitchButton(QWidget *parent )
|
||||
// Visuelles Setup: Flach, keine Ränder, Hand-Cursor
|
||||
setFlat(true);
|
||||
setCursor(Qt::PointingHandCursor);
|
||||
setFixedSize(24, 24); // Kleiner Footprint im StatusBar
|
||||
|
||||
// CSS: Transparent, damit es sich nahtlos in den StatusBar einfügt
|
||||
// Schriftgröße etwas erhöhen, damit die Emojis gut erkennbar sind
|
||||
|
||||
/*
|
||||
setStyleSheet(R"(
|
||||
BCThemeSwitchButton
|
||||
{
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
font-size: 11pt;
|
||||
}
|
||||
BCThemeSwitchButton:Hover
|
||||
{
|
||||
background-color: rgba(128, 128, 128, 30);
|
||||
border-radius: 24px;
|
||||
}
|
||||
)");
|
||||
*/
|
||||
// Initialer Status (Startet im Dark Mode -> zeigt Mond)
|
||||
setFixedSize(24, 24);
|
||||
updateIcon();
|
||||
|
||||
connect(this, &QPushButton::clicked, this, &BCThemeSwitchButton::toggleMode);
|
||||
@@ -134,53 +114,9 @@ BCDriverStateWidget::BCDriverStateWidget(QWidget* parent)
|
||||
void BCDriverStateWidget::onDriverStateChanged(BCDriver::DriverState state, const QString& customMessage)
|
||||
{
|
||||
_state = state;
|
||||
qDebug() << " --- StateWidget: " << state << " - " << customMessage;
|
||||
updateStyle();
|
||||
}
|
||||
|
||||
/*
|
||||
void BCDriverStateWidget::updateStyle()
|
||||
{
|
||||
QString ledStyle;
|
||||
QString labelColor;
|
||||
QString toolTipText;
|
||||
|
||||
switch (_state)
|
||||
{
|
||||
case BCDriver::DriverState::DeviceReady:
|
||||
// FLUENT GREEN (Success)
|
||||
ledStyle = "background-color: #107C10; border: 1px solid #0E600E;#FF5F1F; #FF8C00;<- das isses #FF6700";
|
||||
labelColor = "#FFFFFF"; // Weiß (Hervorgehoben)
|
||||
toolTipText = "Verbindung erfolgreich hergestellt.";
|
||||
break;
|
||||
|
||||
case BCDriver::DriverState::Error:
|
||||
// FLUENT RED (Critical)
|
||||
ledStyle = "background-color: #C42B1C; border: 1px solid #A80000;";
|
||||
labelColor = "#FF99A4"; // Ein helleres Rot für Text, damit es auf Dunkel lesbar ist
|
||||
toolTipText = "Kritischer Fehler bei der Verbindung!";
|
||||
break;
|
||||
|
||||
default:
|
||||
// FLUENT GRAY (Neutral)
|
||||
// Wir machen es dunkelgrau mit hellem Rand -> "Ausgeschaltet"-Look
|
||||
ledStyle = "background-color: #3B3B3B; border: 1px solid #606060;";
|
||||
labelColor = "#9E9E9E"; // Ausgegrauter Text
|
||||
toolTipText = "System ist offline.";
|
||||
break;
|
||||
}
|
||||
|
||||
// Styles anwenden (immer rund machen)
|
||||
_led->setStyleSheet(ledStyle + "border-radius: 6px;");
|
||||
|
||||
// Textfarbe setzen
|
||||
_label->setStyleSheet(QString("color: %1; font-weight: %2;")
|
||||
.arg(labelColor)
|
||||
.arg(_state == BCDriver::DriverState::DeviceReady ? "bold" : "normal"));
|
||||
|
||||
setToolTip(toolTipText);
|
||||
}
|
||||
*/
|
||||
|
||||
void BCDriverStateWidget::updateStyle()
|
||||
{
|
||||
@@ -196,54 +132,49 @@ void BCDriverStateWidget::updateStyle()
|
||||
*/
|
||||
switch (_state)
|
||||
{
|
||||
case BCDriver::DriverState::NotPresent:
|
||||
// FLUENT GRAY (Neutral)
|
||||
// Wir machen es dunkelgrau mit hellem Rand -> "Ausgeschaltet"-Look
|
||||
ledStyle = "background-color: #3B3B3B; border: 1px solid #606060;";
|
||||
toolTipText = "Treiber nicht geladen.";
|
||||
break;
|
||||
case BCDriver::DriverState::NotPresent:
|
||||
// FLUENT GRAY (Neutral)
|
||||
// Wir machen es dunkelgrau mit hellem Rand -> "Ausgeschaltet"-Look
|
||||
ledStyle = "background-color: #3B3B3B; border: 1px solid #606060;";
|
||||
toolTipText = "Treiber nicht geladen.";
|
||||
break;
|
||||
|
||||
case BCDriver::DriverState::Error:
|
||||
// FLUENT RED (Critical)
|
||||
ledStyle = "background-color: #C42B1C; border: 1px solid #A80000;";
|
||||
toolTipText = "Fehler beim Laden des Treibers.";
|
||||
break;
|
||||
case BCDriver::DriverState::Error:
|
||||
// FLUENT RED (Critical)
|
||||
ledStyle = "background-color: #C42B1C; border: 1px solid #A80000;";
|
||||
toolTipText = "Fehler beim Laden des Treibers.";
|
||||
break;
|
||||
|
||||
// hier: dll vorhanden, Treiber geladen
|
||||
case BCDriver::DriverState::Loaded:
|
||||
case BCDriver::DriverState::Initialized:
|
||||
case BCDriver::DriverState::Opened:
|
||||
// FLUENT RED (Critical)
|
||||
ledStyle = "background-color: #FF8C00; border: 1px solid #A80000;";
|
||||
toolTipText = "Fehler beim Laden des Treibers.";
|
||||
break;
|
||||
|
||||
case BCDriver::DriverState::DeviceReady:
|
||||
// FLUENT GREEN (Success)
|
||||
ledStyle = "background-color: #107C10; border: 1px solid #0E600E;";
|
||||
toolTipText = "Verbindung erfolgreich hergestellt.";
|
||||
break;
|
||||
// hier: dll vorhanden, Treiber geladen
|
||||
case BCDriver::DriverState::Loaded:
|
||||
case BCDriver::DriverState::Initialized:
|
||||
case BCDriver::DriverState::Opened:
|
||||
// FLUENT RED (Critical)
|
||||
ledStyle = "background-color: #FF8C00; border: 1px solid #A80000;";
|
||||
toolTipText = "Fehler beim Laden des Treibers.";
|
||||
break;
|
||||
|
||||
case BCDriver::DriverState::DeviceReady:
|
||||
// FLUENT GREEN (Success)
|
||||
ledStyle = "background-color: #107C10; border: 1px solid #0E600E;";
|
||||
toolTipText = "Verbindung erfolgreich hergestellt.";
|
||||
break;
|
||||
}
|
||||
|
||||
// Styles anwenden (immer rund machen)
|
||||
_led->setStyleSheet(ledStyle + "border-radius: 6px;");
|
||||
|
||||
/*
|
||||
// Textfarbe setzen
|
||||
_setStyleSheet(QString("color: %1; font-weight: %2;")
|
||||
.arg(labelColor)
|
||||
.arg(_state == BCDriver::DriverState::DeviceReady ? "bold" : "normal"));
|
||||
*/
|
||||
setToolTip(toolTipText);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief minimale click event
|
||||
*/
|
||||
|
||||
void BCDriverStateWidget::mouseReleaseEvent(QMouseEvent* event)
|
||||
{
|
||||
if (event->button() == Qt::LeftButton)
|
||||
{
|
||||
emit clicked();
|
||||
}
|
||||
QWidget::mouseReleaseEvent(event);
|
||||
}
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ void BCTransmitter::onProcessValue()
|
||||
uint8_t regID = static_cast<uint8_t> (value.registerID);
|
||||
|
||||
// Für den Fehlerfall: Wir senden den alten Wert einfach zurück
|
||||
uint32_t newValue = value.rawUIntValue;
|
||||
uint32_t newValue = value.rawValue;
|
||||
BCValue::Flag newState = BCValue::Flag::Failed;;
|
||||
|
||||
if(value.flags.testFlag( BCValue::Flag::WriteMe ) )
|
||||
|
||||
@@ -47,9 +47,9 @@ BCValue::BCValue( BCDevice::ID deviceID_, BC::ID registerID_)
|
||||
QString BCValue::formatValue() const
|
||||
{
|
||||
if( factor == 1 )
|
||||
return QString::number( rawUIntValue );
|
||||
return QString::number( rawValue );
|
||||
|
||||
double result = rawUIntValue * factor;
|
||||
double result = rawValue * factor;
|
||||
return QString::number(result, 'f', 2);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ double BCValue::calcRatio() const
|
||||
return ratio;
|
||||
|
||||
// Die eigentliche Formel
|
||||
ratio = ((rawDoubleValue - min) / range);
|
||||
ratio = ((rawValue - min) / range);
|
||||
//ratio = (int) qBound( min,ratio, max);
|
||||
}
|
||||
return ratio;
|
||||
|
||||
@@ -105,8 +105,7 @@ public:
|
||||
ValueType valueType{ValueType::Plain};
|
||||
int indexRow{-1};
|
||||
QString label;
|
||||
mutable double rawDoubleValue;
|
||||
mutable uint32_t rawUIntValue;
|
||||
mutable uint32_t rawValue{};
|
||||
QString unitLabel;
|
||||
double factor{1};
|
||||
OptDouble optMin;
|
||||
|
||||
@@ -88,7 +88,7 @@ void BCValueModel::updateValue(int row, BCValue::Flag state, uint32_t rawValue )
|
||||
const BCValue& value = *(_valueList[row].get());
|
||||
|
||||
value.flags = state;
|
||||
value.rawUIntValue = rawValue;
|
||||
value.rawValue = rawValue;
|
||||
|
||||
QModelIndex idx1 = index(row,1);
|
||||
QModelIndex idx2 = index(row,2);
|
||||
@@ -200,7 +200,7 @@ bool BCValueModel::setData(const QModelIndex& index, const QVariant& variant, in
|
||||
// Checken ob Int oder Double
|
||||
if (variant.canConvert<int>())
|
||||
{
|
||||
value->rawUIntValue = variant.toInt();
|
||||
value->rawValue = variant.toInt();
|
||||
}
|
||||
|
||||
emit dataChanged(index, index, {Qt::DisplayRole, Qt::EditRole});
|
||||
|
||||
@@ -60,7 +60,6 @@ void BCXmlLoader::loadXmlBikeData( const QString& fileName )
|
||||
qDebug().noquote() << parts.join(" ");
|
||||
};
|
||||
|
||||
|
||||
QMetaEnum bcDeviceEnum{QMetaEnum::fromType<BCDevice::ID>()};
|
||||
|
||||
QFile file(fileName);
|
||||
@@ -88,22 +87,31 @@ void BCXmlLoader::loadXmlBikeData( const QString& fileName )
|
||||
if (token == QXmlStreamReader::StartElement)
|
||||
{
|
||||
QString deviceType = _xml.attributes().value("Type"_L1).toString();
|
||||
//printAttrs (_xml);
|
||||
// Wir wollen die Device-ID aus dem XML Tag ermitteln
|
||||
const char* deviceKey = _xml.attributes().value("Type"_L1).toLatin1().constData();
|
||||
bool ok;
|
||||
auto optDeviceID = bcDeviceEnum.keyToValue(deviceKey,&ok);
|
||||
//_currentDeviceID = BCDevice::ID( deviceID.value_or( BCDevice::ID::Invalid ) );
|
||||
//if( optDeviceID.has_value())
|
||||
if(ok)
|
||||
{
|
||||
qDebug() << " --- Device: " << _xml.name() << ": " << deviceType << " : " << optDeviceID;
|
||||
//BCDevice::ID currentDeviceID = BCDevice::ID( optDeviceID.value() );
|
||||
BCDevice::ID currentDeviceID = BCDevice::ID( optDeviceID );
|
||||
loadXmlBikeDeviceData(currentDeviceID);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
qDebug() << " --- FETCH 1: " << deviceType;
|
||||
|
||||
// Wir wollen die Device-ID aus dem XML Tag ermitteln
|
||||
if( deviceType.isEmpty() )
|
||||
{
|
||||
printAttrs (_xml);
|
||||
continue;
|
||||
}
|
||||
QByteArray byteArray = deviceType.toUtf8();
|
||||
const char* deviceKey = byteArray.constData();
|
||||
bool ok=false;
|
||||
auto optDeviceID = bcDeviceEnum.keyToValue(deviceKey,&ok);
|
||||
//_currentDeviceID = BCDevice::ID( deviceID.value_or( BCDevice::ID::Invalid ) );
|
||||
//if( optDeviceID.has_value())
|
||||
if(ok)
|
||||
{
|
||||
qDebug() << " --- FETCH 2: Device: " << deviceType << " : " << optDeviceID;
|
||||
//BCDevice::ID currentDeviceID = BCDevice::ID( optDeviceID.value() );
|
||||
BCDevice::ID currentDeviceID = BCDevice::ID( optDeviceID );
|
||||
loadXmlBikeDeviceData(currentDeviceID);
|
||||
}
|
||||
|
||||
} // if start element
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +135,6 @@ void BCXmlLoader::loadXmlBikeDeviceData(BCDevice::ID deviceID)
|
||||
printAttrs (_xml);
|
||||
Q_ASSERT(_xml.isStartElement() && _xml.name() == "Device"_L1);
|
||||
|
||||
|
||||
// temporäre Wertliste für neues Device
|
||||
BCValueList currentValues;
|
||||
|
||||
@@ -135,7 +142,7 @@ void BCXmlLoader::loadXmlBikeDeviceData(BCDevice::ID deviceID)
|
||||
{
|
||||
if( _xml.attributes().hasAttribute(BCTags::ID) )
|
||||
{
|
||||
//qDebug() << " --- found: " << _xml.name() << " : " << _xml.attributes().value(BCTags::ID);
|
||||
qDebug() << " --- found: " << _xml.name() << " : " << _xml.attributes().value(BCTags::ID);
|
||||
|
||||
// füllen des Parameter packs
|
||||
BCValueParams params
|
||||
@@ -205,7 +212,8 @@ std::optional<BCValuePtr> BCXmlLoader::makeValue( BCDevice::ID deviceID, const B
|
||||
//std::optional<quint64> IDVal = s_bcValueEnum.keyToValue64( params.ID.toLatin1().constData() );
|
||||
bool ok;
|
||||
static QMetaEnum s_bcValueEnum{QMetaEnum::fromType<BC::ID>()};
|
||||
int IDVal = s_bcValueEnum.keyToValue( params.ID.toLatin1().constData(), &ok );
|
||||
QByteArray byteArray = params.ID.toUtf8();
|
||||
int IDVal = s_bcValueEnum.keyToValue( byteArray.constData(), &ok );
|
||||
qDebug() << " --- should create: " << params.Label;
|
||||
//if( IDVal.has_value() )
|
||||
if( ok )
|
||||
@@ -218,25 +226,12 @@ std::optional<BCValuePtr> BCXmlLoader::makeValue( BCDevice::ID deviceID, const B
|
||||
setIfExists( params.Max, newValue.optMax );
|
||||
//setIfExists( params.IsWord, newValue.isWord );
|
||||
|
||||
|
||||
|
||||
newValue.label = params.Label;
|
||||
newValue.unitLabel = params.UnitLabel;
|
||||
|
||||
if( s_valueTypes.contains( params.ValueType ) )
|
||||
newValue.valueType = s_valueTypes[params.ValueType];
|
||||
|
||||
/*
|
||||
QString ID;
|
||||
QString Label;
|
||||
QString UnitLabel;
|
||||
QString Factor;
|
||||
QString Min;
|
||||
QString Max;
|
||||
QString IsWord;
|
||||
QString ValueType;
|
||||
*/
|
||||
|
||||
qDebug() << " --- created: " << params.Label;
|
||||
newValue.dumpValue();
|
||||
|
||||
|
||||
@@ -2,6 +2,21 @@
|
||||
|
||||
<Bike name='franken-wheeler'>
|
||||
|
||||
<Device Type='Battery'>
|
||||
<Value ID='Battery_Rev_Hw' Label='Hardware Version' ValueType='Plain' />
|
||||
<Value ID='Battery_Rev_Sw' Label='Software Version' ValueType='Plain' />
|
||||
</Device>
|
||||
|
||||
<Device Type='Motor'>
|
||||
<Value ID='Motor_Rev_Hw' Label='Hardware Version' ValueType='Plain'/>
|
||||
<Value ID='Motor_Rev_Sw' Label='Software Version' ValueType='Plain'/>
|
||||
<Value ID='Motor_Sn_Item_Hi' Label='Motor Part Number' ValueType='Plain' IsWord='1'/>
|
||||
<Value ID='Motor_Sn_Item_Hi' Label='Motor Serial Number' ValueType='Plain' IsWord='1' />
|
||||
<Value ID='Motor_Status_Temperature' Label='Motor Temperature' ValueType='Float' UnitLabel='°C' />
|
||||
<Value ID='Motor_Assist_Maxspeed' Label='Motor max. Speed' UnitLabel='km/h' Factor='0.1' Min='0' Max='70' ValueType='Float' />
|
||||
<Value ID='Motor_Geometry_Circ_Hi' Label='Wheel Circumference' IsWord='1' UnitLabel='mm' Min='0' Max='2300' ValueType='Number' Factor='1.5625' />
|
||||
</Device>
|
||||
|
||||
<Device Type='Console'>
|
||||
<Value ID='Cons_Rev_Hw' Label='Hardware Version' ValueType='Plain'/>
|
||||
<Value ID='Cons_Rev_Sw' Label='Software Version' ValueType='Plain'/>
|
||||
@@ -27,29 +42,14 @@
|
||||
|
||||
<Value ID='Cons_Geometry_Circ_Hi' Label='Wheel Circumference' IsWord='1' UnitLabel='mm' Min='0' Max='2300' Factor='1.5625' ValueType='Number'/>
|
||||
<Value ID='Cons_Assist_Mountain_Cap' Label='Mountain Cap' UnitLabel='%' Factor='1.5625' ValueType='Float'/>
|
||||
</Device>
|
||||
</Device>
|
||||
|
||||
|
||||
<Device Type='Motor'>
|
||||
<Value ID='Motor_Rev_Hw' Label='Hardware Version' ValueType='Plain'/>
|
||||
<Value ID='Motor_Rev_Sw' Label='Software Version' ValueType='Plain'/>
|
||||
<Value ID='Motor_Sn_Item_Hi' Label='Motor Part Number' ValueType='Plain' IsWord='1'/>
|
||||
<Value ID='Motor_Sn_Item_Hi' Label='Motor Serial Number' ValueType='Plain' IsWord='1' />
|
||||
<Value ID='Motor_Status_Temperature' Label='Motor Temperature' ValueType='Float' UnitLabel='°C' />
|
||||
<Value ID='Motor_Assist_Maxspeed' Label='Motor max. Speed' UnitLabel='km/h' Factor='0.1' Min='0' Max='70' />
|
||||
<Value ID='Motor_Geometry_Circ_Hi' Label='Wheel Circumference' IsWord='1' UnitLabel='mm' Min='0' Max='2300' Factor='1.5625' />
|
||||
</Device>
|
||||
|
||||
<Device Type='Battery'>
|
||||
<Value ID='Battery_Rev_Hw' Label='Hardware Version' />
|
||||
<Value ID='Battery_Rev_Sw' Label='Software Version' />
|
||||
</Device>
|
||||
|
||||
</Bike>
|
||||
|
||||
<!--
|
||||
printf( " odo .....................: Percent0.2f Km" _NL _NL,
|
||||
((getValue(CONSOLE, CONSOLE_STATS_BCValueTypeWord_1) << 24) +
|
||||
((getValue(CONSOLE, CONSOLE_STATS_BCValueTypeWord_1) << 24) +
|
||||
(getValue(CONSOLE, CONSOLE_STATS_BCValueTypeWord_2) << 16) +
|
||||
(getValue(CONSOLE, CONSOLE_STATS_BCValueTypeWord_3) << 8) +
|
||||
(getValue(CONSOLE, CONSOLE_STATS_BCValueTypeWord_4))) / (double)10
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
|
||||
<Value ID='Cons_Stat_Dist_Hi' Label='' Reader='mm' Factor='0.1' />
|
||||
<Value ID='Cons_Stat_Dist_Lo' Label='' Reader='mm'/>
|
||||
<Value ID='Cons_Stat_Dist_Lo' Label='' Reader='mm'/>
|
||||
<Value ID='Cons_Stat_Avgspeed_Hi' Label='' Reader='mm' Factor='0.1' />
|
||||
<Value ID='Cons_Stat_Avgspeed_Lo' Label='' Reader='mm'/>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<Value ID='Cons_Sn_Day' Label='' />
|
||||
|
||||
<Value ID='Cons_Sn_Pn_Hi' Label='' />
|
||||
<Value ID='Cons_Sn_Pn_Lo' Label='' />
|
||||
<Value ID='Cons_Sn_Pn_Lo' Label='' />
|
||||
<Value ID='Cons_Sn_Item_Hi' Label='' />
|
||||
<Value ID='Cons_Sn_Item_Lo' Label='' />
|
||||
|
||||
@@ -142,22 +142,22 @@
|
||||
|
||||
|
||||
<Value ID='Cons_Config_Last_Mode_On' Label='' />
|
||||
<Value ID='Cons_Config_Last_Mode_Off' Label='' />
|
||||
<Value ID='Cons_Config_Last_Mode_Off' Label='' />
|
||||
|
||||
<Value ID='Cons_Status_Slave' Label='' />
|
||||
|
||||
<Value ID='Cons_Throttle_Raw_Hi' Label='' />
|
||||
<Value ID='Cons_Throttle_Raw_Lo' Label='' />
|
||||
<Value ID='Cons_Throttle_Raw_Lo' Label='' />
|
||||
<Value ID='Cons_Throttle_Position' Label='' Factor='1.5625'/>
|
||||
|
||||
<Value ID='Cons_Assist_Level_Rekuperation_3' Label='' Factor='1.5625'/>
|
||||
<Value ID='Cons_Assist_Level_Rekuperation_4' Label='' Factor='1.5625'/>
|
||||
<Value ID='Cons_Assist_Level_Rekuperation_4' Label='' Factor='1.5625'/>
|
||||
<Value ID='Cons_Config_Service_Timestamp_Hi' Label='' />
|
||||
<Value ID='Cons_Config_Service_Zimestamp_Lo' Label='' />
|
||||
<Value ID='Cons_Config_Service_Distance_Hi' Label='' />
|
||||
<Value ID='Cons_Config_Service_Distance_Lo' Label='' />
|
||||
|
||||
<Value ID='Cons_Assist_Level_Rekuperation_1' Label='' Factor='1.5625'/>
|
||||
<Value ID='Cons_Assist_Level_Rekuperation_2' Label='' Factor='1.5625'/>
|
||||
<Value ID='Cons_Assist_Level_Rekuperation_2' Label='' Factor='1.5625'/>
|
||||
|
||||
-->
|
||||
|
||||
Reference in New Issue
Block a user