Fixed a bug that caused playback system to send according to file upon
start up even though combobox said bus 0.
This commit is contained in:
@@ -12,7 +12,7 @@ FramePlaybackObject::FramePlaybackObject()
|
||||
playbackActive = false;
|
||||
playbackForward = true;
|
||||
useOrigTiming = false;
|
||||
whichBusSend = -1;
|
||||
whichBusSend = 0;
|
||||
}
|
||||
|
||||
FramePlaybackObject::~FramePlaybackObject()
|
||||
@@ -289,6 +289,7 @@ void FramePlaybackObject::setUseOriginalTiming(bool state)
|
||||
|
||||
void FramePlaybackObject::setSendingBus(int bus)
|
||||
{
|
||||
qDebug() << "Setting sending bus to " << bus;
|
||||
whichBusSend = bus;
|
||||
}
|
||||
|
||||
|
||||
@@ -296,9 +296,14 @@ void FramePlaybackWindow::calculateWhichBus()
|
||||
{
|
||||
int idx = ui->comboCANBus->currentIndex();
|
||||
int maxIdx = ui->comboCANBus->count() - 1;
|
||||
if (maxIdx == 0) maxIdx = 2;
|
||||
int out = idx;
|
||||
|
||||
qDebug() << idx << "***" << maxIdx;
|
||||
|
||||
if (idx == (maxIdx - 1) ) out = -1;
|
||||
if (idx == maxIdx) out = -2;
|
||||
if (idx < 0) out = 0;
|
||||
|
||||
playbackObject.setSendingBus(out);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user