Reworked value handling.
This commit is contained in:
108
bcmainwindow.h
108
bcmainwindow.h
@@ -147,4 +147,112 @@ private:
|
|||||||
bool m_isDarkMode;
|
bool m_isDarkMode;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class BCConnectionWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Definition der 3 Zustände
|
||||||
|
enum class State
|
||||||
|
{
|
||||||
|
Disconnected, // Grau: Offline / Standby
|
||||||
|
Connected, // Grün: Alles OK
|
||||||
|
Error // Rot: Fehler / Timeout / Abbruch
|
||||||
|
};
|
||||||
|
Q_ENUM(State) // Damit Qt das Enum kennt (optional, gut für Debugging)
|
||||||
|
|
||||||
|
explicit BCConnectionWidget(QWidget *parent = nullptr)
|
||||||
|
: QWidget(parent)
|
||||||
|
{
|
||||||
|
QHBoxLayout *layout = new QHBoxLayout(this);
|
||||||
|
layout->setContentsMargins(10, 2, 10, 2);
|
||||||
|
layout->setSpacing(8);
|
||||||
|
|
||||||
|
// 1. Die LED
|
||||||
|
m_led = new QLabel(this);
|
||||||
|
m_led->setFixedSize(12, 12);
|
||||||
|
|
||||||
|
// 2. Der Text
|
||||||
|
m_label = new QLabel(this);
|
||||||
|
m_label->setStyleSheet("font-weight: 500;"); // Medium weight
|
||||||
|
|
||||||
|
layout->addWidget(m_led);
|
||||||
|
layout->addWidget(m_label);
|
||||||
|
|
||||||
|
// Startzustand
|
||||||
|
setState(State::Disconnected, "Offline");
|
||||||
|
}
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
// Hauptfunktion zum Setzen des Status
|
||||||
|
// 'customMessage' ist optional. Wenn leer, wird ein Standardtext genommen.
|
||||||
|
void setState(State state, const QString &customMessage = QString())
|
||||||
|
{
|
||||||
|
m_state = state;
|
||||||
|
|
||||||
|
// Standard-Texte, falls keine Nachricht übergeben wurde
|
||||||
|
QString text = customMessage;
|
||||||
|
if (text.isEmpty()) {
|
||||||
|
switch (state) {
|
||||||
|
case State::Connected: text = "Online"; break;
|
||||||
|
case State::Disconnected: text = "Not Connected"; break;
|
||||||
|
case State::Error: text = "Connection Error"; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m_label->setText(text);
|
||||||
|
|
||||||
|
updateStyle();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
void updateStyle()
|
||||||
|
{
|
||||||
|
QString ledStyle;
|
||||||
|
QString labelColor;
|
||||||
|
QString toolTipText;
|
||||||
|
|
||||||
|
switch (m_state) {
|
||||||
|
case State::Connected:
|
||||||
|
// 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 State::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;
|
||||||
|
|
||||||
|
case State::Disconnected:
|
||||||
|
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)
|
||||||
|
m_led->setStyleSheet(ledStyle + "border-radius: 6px;");
|
||||||
|
|
||||||
|
// Textfarbe setzen
|
||||||
|
m_label->setStyleSheet(QString("color: %1; font-weight: %2;")
|
||||||
|
.arg(labelColor)
|
||||||
|
.arg(m_state == State::Connected ? "bold" : "normal"));
|
||||||
|
|
||||||
|
setToolTip(toolTipText);
|
||||||
|
}
|
||||||
|
|
||||||
|
QLabel *m_led;
|
||||||
|
QLabel *m_label;
|
||||||
|
State m_state;
|
||||||
|
};
|
||||||
|
|
||||||
#endif // BCMAINWINDOW_H
|
#endif // BCMAINWINDOW_H
|
||||||
|
|||||||
10
bcvalue.cpp
10
bcvalue.cpp
@@ -52,10 +52,12 @@ QString BCValue::readRawValueX( const BCAbstractTransmitter& transmitter ) const
|
|||||||
uint8_t regID = static_cast<uint8_t> (registerID);
|
uint8_t regID = static_cast<uint8_t> (registerID);
|
||||||
|
|
||||||
// wir sind hier im anderen thread! nicht einfach so reinschreiben
|
// wir sind hier im anderen thread! nicht einfach so reinschreiben
|
||||||
//visibleValue = valueType->createStringValue( transmitter, devID, regID );
|
if( valueType->readValueFunc )
|
||||||
|
{
|
||||||
return valueType->createStringValue( transmitter, devID, regID );
|
uint32_t result = valueType->readValueFunc( transmitter, devID, regID );
|
||||||
|
return valueType->formatValue( result );
|
||||||
|
}
|
||||||
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BCValue::writeRawValueX( const BCAbstractTransmitter& transmitter ) const
|
void BCValue::writeRawValueX( const BCAbstractTransmitter& transmitter ) const
|
||||||
|
|||||||
23
bcvalue.h
23
bcvalue.h
@@ -83,29 +83,28 @@ public:
|
|||||||
ReadValue,
|
ReadValue,
|
||||||
WriteValue,
|
WriteValue,
|
||||||
};
|
};
|
||||||
//Q_ENUM(OpID)
|
|
||||||
|
|
||||||
// __fix! flags draus machen ?
|
|
||||||
enum class State : uint8_t
|
enum class State : uint8_t
|
||||||
{
|
{
|
||||||
Invalid,
|
NoState = 0x0,
|
||||||
Locked,
|
ReadOnly = 0x1,
|
||||||
Failed,
|
Locked = 0x2,
|
||||||
InSync,
|
Failed = 0x4,
|
||||||
OK
|
InSync = 0x8,
|
||||||
|
OK = 0x10
|
||||||
};
|
};
|
||||||
//Q_ENUM(State)
|
Q_DECLARE_FLAGS(States, State )
|
||||||
|
|
||||||
BCValue( const BCValueType* valueType_, BCDevice::ID deviceID_, BC::ID registerID_ );
|
BCValue( const BCValueType* valueType_, BCDevice::ID deviceID_, BC::ID registerID_ );
|
||||||
|
|
||||||
QString readRawValueX( const BCAbstractTransmitter& transmitter ) const;
|
QString readRawValueX( const BCAbstractTransmitter& transmitter ) const;
|
||||||
void writeRawValueX( const BCAbstractTransmitter& transmitter ) const;
|
void writeRawValueX( const BCAbstractTransmitter& transmitter ) const;
|
||||||
// void reset()
|
// void reset()
|
||||||
|
|
||||||
// später
|
// später vielleicht
|
||||||
//protected:
|
//protected:
|
||||||
|
|
||||||
mutable State state{BCValue::State::Invalid};
|
mutable States state{BCValue::State::NoState};
|
||||||
//const BCValueType& valueType;
|
//const BCValueType& valueType;
|
||||||
//BCValueTypeCRef valueType;
|
//BCValueTypeCRef valueType;
|
||||||
const BCValueType* valueType{};
|
const BCValueType* valueType{};
|
||||||
@@ -123,7 +122,7 @@ public:
|
|||||||
//mutable std::optional<uint32_t> rawValue;
|
//mutable std::optional<uint32_t> rawValue;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Q_DECLARE_OPERATORS_FOR_FLAGS(BCValue::States)
|
||||||
Q_DECLARE_METATYPE(const BCValue*)
|
Q_DECLARE_METATYPE(const BCValue*)
|
||||||
//Q_DECLARE_METATYPE(const BCValue&)
|
//Q_DECLARE_METATYPE(const BCValue&)
|
||||||
|
|
||||||
|
|||||||
142
bcvaluetype.cpp
142
bcvaluetype.cpp
@@ -34,6 +34,46 @@
|
|||||||
#include <bcvalue.h>
|
#include <bcvalue.h>
|
||||||
|
|
||||||
|
|
||||||
|
/// reader functions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
uint32_t readByteValue( const BCAbstractTransmitter& transmitter, uint32_t deviceID, uint8_t registerID )
|
||||||
|
{
|
||||||
|
return transmitter.readByte( deviceID, registerID );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
uint32_t readWordValue( const BCAbstractTransmitter& transmitter, uint32_t deviceID, uint8_t registerID )
|
||||||
|
{
|
||||||
|
//getValue(CONSOLE, CONSOLE_SN_PN_HI) << 8) + getValue(CONSOLE, CONSOLE_SN_PN_LO)),
|
||||||
|
// hi byte
|
||||||
|
uint32_t result = transmitter.readByte( deviceID, registerID ) << 8;
|
||||||
|
// low byte, use followup register: +1
|
||||||
|
result += transmitter.readByte( deviceID, registerID+1 );
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t readODOValue( const BCAbstractTransmitter& transmitter, uint32_t deviceID, uint8_t registerID )
|
||||||
|
{
|
||||||
|
return 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t readVoltValue( const BCAbstractTransmitter& transmitter, uint32_t deviceID, uint8_t registerID )
|
||||||
|
{
|
||||||
|
return 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t readCircValue( const BCAbstractTransmitter& transmitter, uint32_t deviceID, uint8_t registerID )
|
||||||
|
{
|
||||||
|
return 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief BCValueType::BCValueType
|
||||||
|
*/
|
||||||
|
|
||||||
BCValueType::BCValueType()
|
BCValueType::BCValueType()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -69,26 +109,52 @@ QString BCValueType::formatValue( uint32_t value ) const
|
|||||||
_dataTypes.insert( "Assist", new Fatz{{ "%" }} );
|
_dataTypes.insert( "Assist", new Fatz{{ "%" }} );
|
||||||
//_dataTypes.insert( "Date", { BCValueType::TypeID::Date } );
|
//_dataTypes.insert( "Date", { BCValueType::TypeID::Date } );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
std::optional<ReadValueFunc> BCValueType::fetchReadValueFunction( const QString& unitTypeKey )
|
||||||
|
{
|
||||||
|
static QHash<QString,ReadValueFunc> s_bcReadValueFunctions
|
||||||
|
{
|
||||||
|
{ "Byte", readByteValue },
|
||||||
|
{ "Word", readWordValue },
|
||||||
|
{ "Percent",readByteValue },
|
||||||
|
{ "KWh", readByteValue },
|
||||||
|
{ "Watt", readByteValue },
|
||||||
|
{ "Km", readByteValue },
|
||||||
|
{ "Kmh", readByteValue },
|
||||||
|
{ "Mm", readByteValue },
|
||||||
|
{ "Sec", readByteValue },
|
||||||
|
{ "Degree", readByteValue },
|
||||||
|
{ "SoC", readByteValue },
|
||||||
|
{ "Odo", readByteValue },
|
||||||
|
{ "Assist", readByteValue },
|
||||||
|
{ "Assist", readByteValue },
|
||||||
|
};
|
||||||
|
|
||||||
|
if( !s_bcReadValueFunctions.contains( unitTypeKey ) )
|
||||||
|
return std::nullopt;
|
||||||
|
|
||||||
|
return s_bcReadValueFunctions[unitTypeKey];
|
||||||
|
}
|
||||||
|
|
||||||
std::optional<BCValueType*> BCValueType::fetchValueType( const QString& unitTypeKey )
|
std::optional<BCValueType*> BCValueType::fetchValueType( const QString& unitTypeKey )
|
||||||
{
|
{
|
||||||
static QHash<QString,BCValueType*> s_bcDataTypes
|
static QHash<QString,BCValueType*> s_bcDataTypes
|
||||||
{
|
{
|
||||||
{ "Byte", new BCValueTypeWord( "", 1.5625F) },
|
{ "Byte", new BCValueType( "", 1.5625F) },
|
||||||
{ "Word", new BCValueTypeWord( "", 1.5625F) },
|
{ "Word", new BCValueType( "", 1.5625F) },
|
||||||
|
{ "Float", new BCValueType( "", 1.5625F) },
|
||||||
{ "Float", new BCValueTypeWord( "", 1.5625F) },
|
{ "Percent",new BCValueType( "%", 1.5625 ) },
|
||||||
{ "Percent",new BCValueTypeWord( "%", 1.5625 ) },
|
{ "KWh", new BCValueType( "kwh", 1.5625 ) },
|
||||||
{ "KWh", new BCValueTypeWord( "kwh", 1.5625 ) },
|
{ "Watt", new BCValueType( "w", 1.5625 ) },
|
||||||
{ "Watt", new BCValueTypeWord( "w", 1.5625 ) },
|
{ "Km", new BCValueType( "km", 1.5625 ) },
|
||||||
{ "Km", new BCValueTypeWord( "km", 1.5625 ) },
|
{ "Kmh", new BCValueType( "km/h", 0.1 ) },
|
||||||
{ "Kmh", new BCValueTypeWord( "km/h", 0.1 ) },
|
{ "Mm", new BCValueType( "mm", 1.5625 ) },
|
||||||
{ "Mm", new BCValueTypeWord( "mm", 1.5625 ) },
|
{ "Sec", new BCValueType( "s", 1.5625 ) },
|
||||||
{ "Sec", new BCValueTypeWord( "s", 1.5625 ) },
|
{ "Degree", new BCValueType( "°C", 1.0 ) },
|
||||||
{ "Degree", new BCValueTypeByte( "°C", 1.0 ) },
|
{ "SoC", new BCValueType( "%", 1.5625 ) },
|
||||||
{ "SoC", new BCValueTypeWord( "%", 1.5625 ) },
|
{ "Odo", new BCValueType( "km", 1.5625 ) },
|
||||||
{ "Odo", new BCValueTypeWord( "km", 1.5625 ) },
|
{ "Assist", new BCValueType( "", 0 ,4 ) },
|
||||||
{ "Assist", new BCValueTypeWord( "", 0 ,4 ) },
|
{ "Assist", new BCValueType( "%" ) },
|
||||||
{ "Assist", new BCValueTypeWord( "%" ) },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if( !s_bcDataTypes.contains( unitTypeKey ) )
|
if( !s_bcDataTypes.contains( unitTypeKey ) )
|
||||||
@@ -100,47 +166,3 @@ std::optional<BCValueType*> BCValueType::fetchValueType( const QString& unitType
|
|||||||
|
|
||||||
/// ----
|
/// ----
|
||||||
|
|
||||||
BCValueTypeByte::BCValueTypeByte( QString unitLabel_, double factor_, optDouble min_, optDouble max_ )
|
|
||||||
: BCValueType{ unitLabel_, factor_, min_, max_}
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QString BCValueTypeByte::createStringValue( const BCAbstractTransmitter& transmitter, uint32_t deviceID, uint8_t registerID ) const
|
|
||||||
{
|
|
||||||
uint8_t result = transmitter.readByte( deviceID, registerID );
|
|
||||||
return formatValue( result );
|
|
||||||
}
|
|
||||||
|
|
||||||
/// ----
|
|
||||||
|
|
||||||
BCValueTypeWord::BCValueTypeWord( QString unitLabel_, double factor_, optDouble min_, optDouble max_ )
|
|
||||||
: BCValueType{ unitLabel_, factor_, min_, max_}
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QString BCValueTypeWord::createStringValue( const BCAbstractTransmitter& transmitter, uint32_t deviceID, uint8_t registerID ) const
|
|
||||||
{
|
|
||||||
//getValue(CONSOLE, CONSOLE_SN_PN_HI) << 8) + getValue(CONSOLE, CONSOLE_SN_PN_LO)),
|
|
||||||
// hi byte
|
|
||||||
uint8_t result = transmitter.readByte( deviceID, registerID ) << 8;
|
|
||||||
// low byte, use followup register: +1
|
|
||||||
result += transmitter.readByte( deviceID, registerID+1 );
|
|
||||||
|
|
||||||
return formatValue( result );
|
|
||||||
}
|
|
||||||
|
|
||||||
/// ----
|
|
||||||
|
|
||||||
BCValueTypeODO::BCValueTypeODO( QString unitLabel_, double factor_, optDouble min_, optDouble max_ )
|
|
||||||
: BCValueType{ unitLabel_, factor_, min_, max_}
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QString BCValueTypeODO::createStringValue( const BCAbstractTransmitter& transmitter, uint32_t deviceID, uint8_t registerID ) const
|
|
||||||
{
|
|
||||||
return "0x0";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ class BCAbstractTransmitter;
|
|||||||
class BCValue;
|
class BCValue;
|
||||||
|
|
||||||
using optDouble = std::optional<double>;
|
using optDouble = std::optional<double>;
|
||||||
|
using ReadValueFunc = std::function<uint32_t( const BCAbstractTransmitter& transmitter, uint32_t deviceID, uint8_t registerID )>;
|
||||||
|
|
||||||
struct BCValueType
|
struct BCValueType
|
||||||
{
|
{
|
||||||
@@ -59,46 +60,16 @@ public:
|
|||||||
double factor;
|
double factor;
|
||||||
optDouble min;
|
optDouble min;
|
||||||
optDouble max;
|
optDouble max;
|
||||||
|
ReadValueFunc readValueFunc;
|
||||||
virtual QString createStringValue( const BCAbstractTransmitter& transmitter, uint32_t deviceID, uint8_t registerID ) const = 0;
|
|
||||||
//virtual void writeValue( const BCAbstractTransmitter& transmitter, BCValue& value ) = 0;
|
|
||||||
|
|
||||||
virtual QString formatValue( uint32_t value ) const;
|
virtual QString formatValue( uint32_t value ) const;
|
||||||
|
|
||||||
static std::optional<BCValueType*> fetchValueType( const QString& unitTypeKey );
|
static std::optional<BCValueType*> fetchValueType( const QString& unitTypeKey );
|
||||||
|
static std::optional<ReadValueFunc> fetchReadValueFunction( const QString& unitTypeKey );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct BCValueTypeByte : BCValueType
|
|
||||||
{
|
|
||||||
BCValueTypeByte( QString unitLabel_, double factor_= 1.0, optDouble min_=std::nullopt, optDouble max_= std::nullopt );
|
|
||||||
|
|
||||||
QString createStringValue( const BCAbstractTransmitter& transmitter, uint32_t deviceID, uint8_t registerID ) const override;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct BCValueTypeWord : public BCValueType
|
|
||||||
{
|
|
||||||
BCValueTypeWord( QString unitLabel_, double factor_= 1.0, optDouble min_=std::nullopt, optDouble max_= std::nullopt );
|
|
||||||
|
|
||||||
QString createStringValue( const BCAbstractTransmitter& transmitter, uint32_t deviceID, uint8_t registerID ) const override;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct BCValueTypeODO : public BCValueType
|
|
||||||
{
|
|
||||||
BCValueTypeODO( QString unitLabel_, double factor_= 1.0, optDouble min_=std::nullopt, optDouble max_= std::nullopt );
|
|
||||||
|
|
||||||
QString createStringValue( const BCAbstractTransmitter& transmitter, uint32_t deviceID, uint8_t registerID ) const override;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
struct BCValueTypeVolt : public BCValueType
|
|
||||||
{
|
|
||||||
BCValueTypeODO( QString unitLabel_, double factor_= 1.0, optDouble min_=std::nullopt, optDouble max_= std::nullopt );
|
|
||||||
|
|
||||||
QString createStringValue( const BCAbstractTransmitter& transmitter, uint32_t deviceID, uint8_t registerID ) override;
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
//using BCTypeVariant = std::variant<BCValueType,BCValueTypeWord,Long,Fitz,Fatz>;
|
//using BCTypeVariant = std::variant<BCValueType,BCValueTypeWord,Long,Fitz,Fatz>;
|
||||||
|
|
||||||
|
|||||||
@@ -4,47 +4,47 @@
|
|||||||
|
|
||||||
<Device Type="Console">
|
<Device Type="Console">
|
||||||
|
|
||||||
<Value ID='Cons_Rev_Hw' Label='Hardware Version' Default='' UnitType='Byte' />
|
<Value ID='Cons_Rev_Hw' Label='Hardware Version' ReadOnly='true' UnitType='Byte' />
|
||||||
<Value ID='Cons_Rev_Sw' Label='Software Version' Default='' UnitType='Byte' />
|
<Value ID='Cons_Rev_Sw' Label='Software Version' ReadOnly='true' UnitType='Byte' />
|
||||||
<Value ID='Cons_Sn_Product_Hi' Label='Product Number' Default='' UnitType='Word'/>
|
<Value ID='Cons_Sn_Product_Hi' Label='Product Number' ReadOnly='true' UnitType='Word'/>
|
||||||
<Value ID='Cons_Sn_Oem_Hi' Label='OEM Number' Default='' UnitType='Word' />
|
<Value ID='Cons_Sn_Oem_Hi' Label='OEM Number' ReadOnly='true' UnitType='Word' />
|
||||||
|
|
||||||
<Value ID='Cons_Assist_Initlevel' Label='Assistance Init Level' Default='' UnitType='Assist' />
|
<Value ID='Cons_Assist_Initlevel' Label='Assistance Init Level' ReadOnly='true' UnitType='Assist' />
|
||||||
<Value ID='Cons_Assist_Level_1' Label='Assistance Level 1' Default='' UnitType='Percent' Factor='1.5625'/>
|
<Value ID='Cons_Assist_Level_1' Label='Assistance Level 1' ReadOnly='true' UnitType='Percent' Factor='1.5625'/>
|
||||||
<Value ID='Cons_Assist_Level_2' Label='Assistance Level 2' Default='' UnitType='Percent' Factor='1.5625'/>
|
<Value ID='Cons_Assist_Level_2' Label='Assistance Level 2' ReadOnly='true' UnitType='Percent' Factor='1.5625'/>
|
||||||
<Value ID='Cons_Assist_Level_3' Label='Assistance Level 3' Default='' UnitType='Percent' Factor='1.5625'/>
|
<Value ID='Cons_Assist_Level_3' Label='Assistance Level 3' ReadOnly='true' UnitType='Percent' Factor='1.5625'/>
|
||||||
<Value ID='Cons_Assist_Level_4' Label='Assistance Level 4' Default='' UnitType='Percent' Factor='1.5625'/>
|
<Value ID='Cons_Assist_Level_4' Label='Assistance Level 4' ReadOnly='true' UnitType='Percent' Factor='1.5625'/>
|
||||||
|
|
||||||
<Value ID='Cons_Assist_Maxspeed_Flag' Label='Max Limit Enabled' Default='' UnitType='Byte' />
|
<Value ID='Cons_Assist_Maxspeed_Flag' Label='Max Limit Enabled' ReadOnly='true' UnitType='Byte' />
|
||||||
<Value ID='Cons_Assist_Maxspeed_Hi' Label='Max Speed Limit' Default='' UnitType='kmh' Factor='0.1'/>
|
<Value ID='Cons_Assist_Maxspeed_Hi' Label='Max Speed Limit' ReadOnly='true' UnitType='kmh' Factor='0.1'/>
|
||||||
|
|
||||||
<Value ID='Cons_Assist_Minspeed_Flag' Label='Min Limit Enabled' Default='' UnitType='Byte' />
|
<Value ID='Cons_Assist_Minspeed_Flag' Label='Min Limit Enabled' ReadOnly='true' UnitType='Byte' />
|
||||||
<Value ID='Cons_Assist_Minspeed' Label='Min Speed Limit' Default='' UnitType='kmh'/>
|
<Value ID='Cons_Assist_Minspeed' Label='Min Speed Limit' ReadOnly='true' UnitType='kmh'/>
|
||||||
|
|
||||||
<Value ID='Cons_Throttle_Maxspeed_Flag' Label='Throttle Limit Enabled' Default='' UnitType='Byte'/>
|
<Value ID='Cons_Throttle_Maxspeed_Flag' Label='Throttle Limit Enabled' ReadOnly='true' UnitType='Byte'/>
|
||||||
<Value ID='Cons_Throttle_Maxspeed_Hi' Label='Throttle Speed Limit' Default='' UnitType='kmh' Factor='0.1'/>
|
<Value ID='Cons_Throttle_Maxspeed_Hi' Label='Throttle Speed Limit' ReadOnly='true' UnitType='kmh' Factor='0.1'/>
|
||||||
|
|
||||||
<Value ID='Cons_Geometry_Circ_Hi' Label='Wheel Circumference' Default='' UnitType='mm' />
|
<Value ID='Cons_Geometry_Circ_Hi' Label='Wheel Circumference' ReadOnly='true' UnitType='mm' />
|
||||||
<Value ID='Cons_Assist_Mountain_Cap' Label='Mountain Cap' Default='' UnitType='Percent' Factor='1.5625' />
|
<Value ID='Cons_Assist_Mountain_Cap' Label='Mountain Cap' ReadOnly='true' UnitType='Percent' Factor='1.5625' />
|
||||||
|
|
||||||
</Device>
|
</Device>
|
||||||
|
|
||||||
<Device Type="Motor">
|
<Device Type="Motor">
|
||||||
<Value ID='Motor_Rev_Hw' Label='Hardware Version' Default='' UnitType='Byte' />
|
<Value ID='Motor_Rev_Hw' Label='Hardware Version' ReadOnly='true' UnitType='Byte' />
|
||||||
<Value ID='Motor_Rev_Sw' Label='Software Version' Default='' UnitType='Byte' />
|
<Value ID='Motor_Rev_Sw' Label='Software Version' ReadOnly='true' UnitType='Byte' />
|
||||||
<Value ID='Motor_Status_Temperature' Label='Motor Temperature' Default='' UnitType='Degree'/>
|
<Value ID='Motor_Status_Temperature' Label='Motor Temperature' ReadOnly='true' UnitType='Degree'/>
|
||||||
<Value ID='Motor_Assist_Maxspeed' Label='Motor max. Speed' Default='' UnitType='Kmh' />
|
<Value ID='Motor_Assist_Maxspeed' Label='Motor max. Speed' ReadOnly='true' UnitType='Kmh' />
|
||||||
<Value ID='Motor_Sn_Item_Hi' Label='Motor Part Number' Default='' UnitType='Word'/>
|
<Value ID='Motor_Sn_Item_Hi' Label='Motor Part Number' ReadOnly='true' UnitType='Word'/>
|
||||||
<Value ID='Motor_Sn_Item_Hi' Label='Motor Serial Number' Default='' UnitType='Word' />
|
<Value ID='Motor_Sn_Item_Hi' Label='Motor Serial Number' ReadOnly='true' UnitType='Word' />
|
||||||
<Value ID='Motor_Geometry_Circ_Hi' Label='Motor Gemetry' Default='' UnitType='Mm' />
|
<Value ID='Motor_Geometry_Circ_Hi' Label='Motor Gemetry' ReadOnly='true' UnitType='Mm' />
|
||||||
</Device>
|
</Device>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Device Type="Battery">
|
<Device Type="Battery">
|
||||||
<Value ID='Battery_Rev_Hw' Label='Hardware Version' Default='' UnitType='Byte' />
|
<Value ID='Battery_Rev_Hw' Label='Hardware Version' ReadOnly='true' UnitType='Byte' />
|
||||||
<Value ID='Battery_Rev_Sw' Label='Software Version' Default='' UnitType='Byte' />
|
<Value ID='Battery_Rev_Sw' Label='Software Version' ReadOnly='true' UnitType='Byte' />
|
||||||
</Device>
|
</Device>
|
||||||
|
|
||||||
<Device Type="Sensor">
|
<Device Type="Sensor">
|
||||||
@@ -66,106 +66,106 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Value ID='Cons_Stat_Dist_Hi' Label='' Default='' UnitType='mm' Factor='0.1' />
|
<Value ID='Cons_Stat_Dist_Hi' Label='' ReadOnly='true' UnitType='mm' Factor='0.1' />
|
||||||
<Value ID='Cons_Stat_Dist_Lo' Label='' Default='' UnitType='mm'/>
|
<Value ID='Cons_Stat_Dist_Lo' Label='' ReadOnly='true' UnitType='mm'/>
|
||||||
<Value ID='Cons_Stat_Avgspeed_Hi' Label='' Default='' UnitType='mm' Factor='0.1' />
|
<Value ID='Cons_Stat_Avgspeed_Hi' Label='' ReadOnly='true' UnitType='mm' Factor='0.1' />
|
||||||
<Value ID='Cons_Stat_Avgspeed_Lo' Label='' Default='' UnitType='mm'/>
|
<Value ID='Cons_Stat_Avgspeed_Lo' Label='' ReadOnly='true' UnitType='mm'/>
|
||||||
|
|
||||||
<Value ID='Cons_Stat_Odo_Hihi' Label='' Default='' Factor='0.1' />
|
<Value ID='Cons_Stat_Odo_Hihi' Label='' ReadOnly='true' Factor='0.1' />
|
||||||
<Value ID='Cons_Stat_Odo_Hilo' Label='' Default='' />
|
<Value ID='Cons_Stat_Odo_Hilo' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Stat_Odomoter_Lohi' Label='' Default='' />
|
<Value ID='Cons_Stat_Odomoter_Lohi' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Stat_Odo_Lolo' Label='' Default='' />
|
<Value ID='Cons_Stat_Odo_Lolo' Label='' ReadOnly='true' />
|
||||||
|
|
||||||
<Value ID='Cons_Preference_Nip_Hihi' Label='' Default='' />
|
<Value ID='Cons_Preference_Nip_Hihi' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Nip_Hilo' Label='' Default='' />
|
<Value ID='Cons_Preference_Nip_Hilo' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Nip_Lohi' Label='' Default='' />
|
<Value ID='Cons_Preference_Nip_Lohi' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Nip_Lolo' Label='' Default='' />
|
<Value ID='Cons_Preference_Nip_Lolo' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Throttle_Calibrated' Label='' Default='' />
|
<Value ID='Cons_Throttle_Calibrated' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Stat_Chrono_Second' Label='' Default='' />
|
<Value ID='Cons_Stat_Chrono_Second' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Stat_Chrono_Minute' Label='' Default='' />
|
<Value ID='Cons_Stat_Chrono_Minute' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Stat_Chrono_Hour' Label='' Default='' />
|
<Value ID='Cons_Stat_Chrono_Hour' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Lcd_Contrast' Label='' Default='' />
|
<Value ID='Cons_Preference_Lcd_Contrast' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Sn_Location' Label='' Default='' />
|
<Value ID='Cons_Sn_Location' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Sn_Year' Label='' Default='' />
|
<Value ID='Cons_Sn_Year' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Sn_Month' Label='' Default='' />
|
<Value ID='Cons_Sn_Month' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Sn_Day' Label='' Default='' />
|
<Value ID='Cons_Sn_Day' Label='' ReadOnly='true' />
|
||||||
|
|
||||||
<Value ID='Cons_Sn_Pn_Hi' Label='' Default='' />
|
<Value ID='Cons_Sn_Pn_Hi' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Sn_Pn_Lo' Label='' Default='' />
|
<Value ID='Cons_Sn_Pn_Lo' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Sn_Item_Hi' Label='' Default='' />
|
<Value ID='Cons_Sn_Item_Hi' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Sn_Item_Lo' Label='' Default='' />
|
<Value ID='Cons_Sn_Item_Lo' Label='' ReadOnly='true' />
|
||||||
|
|
||||||
<Value ID='Cons_Assist_Gauge_Joint' Label='' Default='' Min='0' Max='11' />
|
<Value ID='Cons_Assist_Gauge_Joint' Label='' ReadOnly='true' Min='0' Max='11' />
|
||||||
<Value ID='Cons_Throttle_Min_Hi' Label='' Default='' />
|
<Value ID='Cons_Throttle_Min_Hi' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Throttle_Min_Lo' Label='' Default='' />
|
<Value ID='Cons_Throttle_Min_Lo' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Throttle_Max_Hi' Label='' Default='' />
|
<Value ID='Cons_Throttle_Max_Hi' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Throttle_Max_Lo' Label='' Default='' />
|
<Value ID='Cons_Throttle_Max_Lo' Label='' ReadOnly='true' />
|
||||||
|
|
||||||
<Value ID='Cons_Preference_Light_On_At_Start' Label='' Default='' />
|
<Value ID='Cons_Preference_Light_On_At_Start' Label='' ReadOnly='true' />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Value ID='Cons_Assist_Brake_Level' Label='' Default='' Min='0' Max='64' UnitType='Percent' Factor='1.5625'/>
|
<Value ID='Cons_Assist_Brake_Level' Label='' ReadOnly='true' Min='0' Max='64' UnitType='Percent' Factor='1.5625'/>
|
||||||
<Value ID='Cons_Preference_Trip_To_Empty_Flag' Label='' Default='' />
|
<Value ID='Cons_Preference_Trip_To_Empty_Flag' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Display_Units' Default='1' />
|
<Value ID='Cons_Preference_Display_Units' Default='1' />
|
||||||
<Value ID='Cons_Throttle_Enabled_Onstrain' Label='' Default='' />
|
<Value ID='Cons_Throttle_Enabled_Onstrain' Label='' ReadOnly='true' />
|
||||||
|
|
||||||
<Value ID='Cons_Assist_Brake_Flag' Default='1' />
|
<Value ID='Cons_Assist_Brake_Flag' Default='1' />
|
||||||
<Value ID='Cons_Assist_Brake_Polarity' Label='' Default='' />
|
<Value ID='Cons_Assist_Brake_Polarity' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Assist_Gauge_Filter' Label='' Default='' Min='0' Max='8' />
|
<Value ID='Cons_Assist_Gauge_Filter' Label='' ReadOnly='true' Min='0' Max='8' />
|
||||||
|
|
||||||
|
|
||||||
<Value ID='Cons_Assist_Gauge_Gain' Label='' Default='' Min='0.1' Max='4.0' Factor='0.1' />
|
<Value ID='Cons_Assist_Gauge_Gain' Label='' ReadOnly='true' Min='0.1' Max='4.0' Factor='0.1' />
|
||||||
<Value ID='Cons_Assist_Gain_A' Label='' Default='' Min='0.1' Max='4.0' Factor='0.1' />
|
<Value ID='Cons_Assist_Gain_A' Label='' ReadOnly='true' Min='0.1' Max='4.0' Factor='0.1' />
|
||||||
<Value ID='Cons_Assist_Gain_B' Label='' Default='' Min='0.1' Max='25.0' Factor='0.1' />
|
<Value ID='Cons_Assist_Gain_B' Label='' ReadOnly='true' Min='0.1' Max='25.0' Factor='0.1' />
|
||||||
<Value ID='Cons_Sn_Type' Label='' Default='' />
|
<Value ID='Cons_Sn_Type' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Region' Label='' Default='' />
|
<Value ID='Cons_Preference_Region' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Configbit_0' Label='' Default='' />
|
<Value ID='Cons_Preference_Configbit_0' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Throttle_Enabled_Boost_Display' Label='' Default='' />
|
<Value ID='Cons_Throttle_Enabled_Boost_Display' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Assist_Autoregen_Flag' Label='' Default='' />
|
<Value ID='Cons_Assist_Autoregen_Flag' Label='' ReadOnly='true' />
|
||||||
|
|
||||||
<Value ID='Cons_Rev_Sub' Label='' Default='' />
|
<Value ID='Cons_Rev_Sub' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Light_Button_Mode' Label='' Default='' />
|
<Value ID='Cons_Preference_Light_Button_Mode' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Expertmode' Label='' Default='' />
|
<Value ID='Cons_Preference_Expertmode' Label='' ReadOnly='true' />
|
||||||
|
|
||||||
|
|
||||||
<Value ID='Cons_Preference_Codes_Hihi' Label='' Default='' />
|
<Value ID='Cons_Preference_Codes_Hihi' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Codes_Hilo' Label='' Default='' />
|
<Value ID='Cons_Preference_Codes_Hilo' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Codes_Lohi' Label='' Default='' />
|
<Value ID='Cons_Preference_Codes_Lohi' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Codes_Lolo' Label='' Default='' />
|
<Value ID='Cons_Preference_Codes_Lolo' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Codesrw_Hihi' Label='' Default='' />
|
<Value ID='Cons_Preference_Codesrw_Hihi' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Codesrw_Hilo' Label='' Default='' />
|
<Value ID='Cons_Preference_Codesrw_Hilo' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Codesrw_Lohi' Label='' Default='' />
|
<Value ID='Cons_Preference_Codesrw_Lohi' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Codesrw_Lolo' Label='' Default='' />
|
<Value ID='Cons_Preference_Codesrw_Lolo' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Preference_Throttle_Mode' Label='' Default='' />
|
<Value ID='Cons_Preference_Throttle_Mode' Label='' ReadOnly='true' />
|
||||||
|
|
||||||
|
|
||||||
<Value ID='Cons_Throttle_Boost_Triggerlevel' Label='' Default='' Min='1.5' Max='50.0' UnitType='Percent' Factor='1.5625' />
|
<Value ID='Cons_Throttle_Boost_Triggerlevel' Label='' ReadOnly='true' Min='1.5' Max='50.0' UnitType='Percent' Factor='1.5625' />
|
||||||
<Value ID='Cons_Preference_Flip_Side' Label='' Default='' />
|
<Value ID='Cons_Preference_Flip_Side' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Config_Testmode' Label='' Default='' />
|
<Value ID='Cons_Config_Testmode' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Config_Testmode_Hw14' Label='' Default='' />
|
<Value ID='Cons_Config_Testmode_Hw14' Label='' ReadOnly='true' />
|
||||||
|
|
||||||
<Value ID='Cons_Config_Last_Mode' Label='' Default='' />
|
<Value ID='Cons_Config_Last_Mode' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Assist_Speedgain' Label='' Default='' Factor='0.1' />
|
<Value ID='Cons_Assist_Speedgain' Label='' ReadOnly='true' Factor='0.1' />
|
||||||
|
|
||||||
|
|
||||||
<Value ID='Cons_Config_Last_Mode_On' Label='' Default='' />
|
<Value ID='Cons_Config_Last_Mode_On' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Config_Last_Mode_Off' Label='' Default='' />
|
<Value ID='Cons_Config_Last_Mode_Off' Label='' ReadOnly='true' />
|
||||||
|
|
||||||
<Value ID='Cons_Status_Slave' Label='' Default='' />
|
<Value ID='Cons_Status_Slave' Label='' ReadOnly='true' />
|
||||||
|
|
||||||
<Value ID='Cons_Throttle_Raw_Hi' Label='' Default='' />
|
<Value ID='Cons_Throttle_Raw_Hi' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Throttle_Raw_Lo' Label='' Default='' />
|
<Value ID='Cons_Throttle_Raw_Lo' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Throttle_Position' Label='' Default='' Factor='1.5625'/>
|
<Value ID='Cons_Throttle_Position' Label='' ReadOnly='true' Factor='1.5625'/>
|
||||||
|
|
||||||
<Value ID='Cons_Assist_Level_Rekuperation_3' Label='' Default='' UnitType='Percent' Factor='1.5625'/>
|
<Value ID='Cons_Assist_Level_Rekuperation_3' Label='' ReadOnly='true' UnitType='Percent' Factor='1.5625'/>
|
||||||
<Value ID='Cons_Assist_Level_Rekuperation_4' Label='' Default='' UnitType='Percent' Factor='1.5625'/>
|
<Value ID='Cons_Assist_Level_Rekuperation_4' Label='' ReadOnly='true' UnitType='Percent' Factor='1.5625'/>
|
||||||
<Value ID='Cons_Config_Service_Timestamp_Hi' Label='' Default='' />
|
<Value ID='Cons_Config_Service_Timestamp_Hi' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Config_Service_Zimestamp_Lo' Label='' Default='' />
|
<Value ID='Cons_Config_Service_Zimestamp_Lo' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Config_Service_Distance_Hi' Label='' Default='' />
|
<Value ID='Cons_Config_Service_Distance_Hi' Label='' ReadOnly='true' />
|
||||||
<Value ID='Cons_Config_Service_Distance_Lo' Label='' Default='' />
|
<Value ID='Cons_Config_Service_Distance_Lo' Label='' ReadOnly='true' />
|
||||||
|
|
||||||
<Value ID='Cons_Assist_Level_Rekuperation_1' Label='' Default='' UnitType='Percent' Factor='1.5625'/>
|
<Value ID='Cons_Assist_Level_Rekuperation_1' Label='' ReadOnly='true' UnitType='Percent' Factor='1.5625'/>
|
||||||
<Value ID='Cons_Assist_Level_Rekuperation_2' Label='' Default='' UnitType='Percent' Factor='1.5625'/>
|
<Value ID='Cons_Assist_Level_Rekuperation_2' Label='' ReadOnly='true' UnitType='Percent' Factor='1.5625'/>
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|||||||
Reference in New Issue
Block a user