mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Fix Error in Device Pairing for ANT+ devices in TrainMode
... after making Wheelsize Settings athlete dependent
This commit is contained in:
@@ -25,7 +25,14 @@
|
||||
|
||||
ANTlocalController::ANTlocalController(TrainSidebar *parent, DeviceConfiguration *dc) : RealtimeController(parent, dc)
|
||||
{
|
||||
myANTlocal = new ANT (parent, dc, parent->context->athlete->cyclist);
|
||||
// for Device Pairing the controller is called with parent = NULL
|
||||
QString cyclist;
|
||||
if (parent) {
|
||||
cyclist = parent->context->athlete->cyclist;
|
||||
} else {
|
||||
cyclist = QString();
|
||||
}
|
||||
myANTlocal = new ANT (parent, dc, cyclist);
|
||||
connect(myANTlocal, SIGNAL(foundDevice(int,int,int)), this, SIGNAL(foundDevice(int,int,int)));
|
||||
connect(myANTlocal, SIGNAL(lostDevice(int)), this, SIGNAL(lostDevice(int)));
|
||||
connect(myANTlocal, SIGNAL(searchTimeout(int)), this, SIGNAL(searchTimeout(int)));
|
||||
|
||||
@@ -173,6 +173,8 @@ GSettings::setValue(QString key, QVariant value)
|
||||
QVariant
|
||||
GSettings::cvalue(QString athleteName, QString key, QVariant def) {
|
||||
|
||||
if (athleteName.isNull() || athleteName.isEmpty()) return def;
|
||||
|
||||
QString keyVar = QString(key);
|
||||
if (newFormat) {
|
||||
int store;
|
||||
|
||||
Reference in New Issue
Block a user