mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
Fixes #3953 - Tests needed!
This commit is contained in:
parent
916d7038f7
commit
18f5ea37f5
3 changed files with 7 additions and 3 deletions
|
@ -994,6 +994,7 @@ class SensorData {
|
||||||
SensorData() { clear(); }
|
SensorData() { clear(); }
|
||||||
unsigned int type; // custom / formula
|
unsigned int type; // custom / formula
|
||||||
unsigned int id;
|
unsigned int id;
|
||||||
|
unsigned int subid;
|
||||||
unsigned int instance;
|
unsigned int instance;
|
||||||
unsigned int persistentValue;
|
unsigned int persistentValue;
|
||||||
unsigned int formula;
|
unsigned int formula;
|
||||||
|
|
|
@ -2902,7 +2902,7 @@ class SensorField: public TransformedField {
|
||||||
internalField.Append(new BoolField<1>(sensor.logs));
|
internalField.Append(new BoolField<1>(sensor.logs));
|
||||||
internalField.Append(new BoolField<1>(sensor.persistent));
|
internalField.Append(new BoolField<1>(sensor.persistent));
|
||||||
internalField.Append(new BoolField<1>(sensor.onlyPositive));
|
internalField.Append(new BoolField<1>(sensor.onlyPositive));
|
||||||
internalField.Append(new SpareBitsField<3>());
|
internalField.Append(new UnsignedField<3>(_subid, "subid"));
|
||||||
internalField.Append(new UnsignedField<32>(_param, "param"));
|
internalField.Append(new UnsignedField<32>(_param, "param"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2910,6 +2910,7 @@ class SensorField: public TransformedField {
|
||||||
{
|
{
|
||||||
if (sensor.type == SensorData::TELEM_TYPE_CUSTOM) {
|
if (sensor.type == SensorData::TELEM_TYPE_CUSTOM) {
|
||||||
_id = sensor.id;
|
_id = sensor.id;
|
||||||
|
_subid = sensor.subid;
|
||||||
_instance = sensor.instance;
|
_instance = sensor.instance;
|
||||||
_ratio = sensor.ratio;
|
_ratio = sensor.ratio;
|
||||||
_offset = sensor.offset;
|
_offset = sensor.offset;
|
||||||
|
@ -2932,6 +2933,7 @@ class SensorField: public TransformedField {
|
||||||
{
|
{
|
||||||
if (sensor.type == SensorData::TELEM_TYPE_CUSTOM) {
|
if (sensor.type == SensorData::TELEM_TYPE_CUSTOM) {
|
||||||
sensor.id = _id;
|
sensor.id = _id;
|
||||||
|
sensor.subid = _subid;
|
||||||
sensor.instance = _instance;
|
sensor.instance = _instance;
|
||||||
sensor.ratio = _ratio;
|
sensor.ratio = _ratio;
|
||||||
sensor.offset = _offset;
|
sensor.offset = _offset;
|
||||||
|
@ -2956,6 +2958,7 @@ class SensorField: public TransformedField {
|
||||||
StructField internalField;
|
StructField internalField;
|
||||||
SensorData & sensor;
|
SensorData & sensor;
|
||||||
unsigned int _id;
|
unsigned int _id;
|
||||||
|
unsigned int _subid;
|
||||||
unsigned int _instance;
|
unsigned int _instance;
|
||||||
union {
|
union {
|
||||||
unsigned int _param;
|
unsigned int _param;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "storage_eeprom.h"
|
#include "storage_eeprom.h"
|
||||||
|
|
||||||
|
|
||||||
unsigned long LoadEeprom(RadioData &radioData, const uint8_t *eeprom, const int size)
|
unsigned long LoadEeprom(RadioData & radioData, const uint8_t * eeprom, const int size)
|
||||||
{
|
{
|
||||||
std::bitset<NUM_ERRORS> errors;
|
std::bitset<NUM_ERRORS> errors;
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ unsigned long LoadEepromXml(RadioData & radioData, QDomDocument & doc)
|
||||||
return errors.to_ulong();
|
return errors.to_ulong();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool convertEEprom(const QString &sourceEEprom, const QString &destinationEEprom, const QString &firmwareFilename)
|
bool convertEEprom(const QString & sourceEEprom, const QString & destinationEEprom, const QString & firmwareFilename)
|
||||||
{
|
{
|
||||||
Firmware *currentFirmware = GetCurrentFirmware();
|
Firmware *currentFirmware = GetCurrentFirmware();
|
||||||
FirmwareInterface firmware(firmwareFilename);
|
FirmwareInterface firmware(firmwareFilename);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue