Rearange gui / Add wifi setup
This commit is contained in:
parent
84f7fafe3a
commit
ac5b130e3b
@ -54,7 +54,9 @@ bool RtAudioOutput::open()
|
|||||||
RtAudio::StreamOptions streamOptions;
|
RtAudio::StreamOptions streamOptions;
|
||||||
streamOptions.flags = RTAUDIO_MINIMIZE_LATENCY | RTAUDIO_SCHEDULE_REALTIME;
|
streamOptions.flags = RTAUDIO_MINIMIZE_LATENCY | RTAUDIO_SCHEDULE_REALTIME;
|
||||||
uint32_t bufferFrames = sampleRate_ == 16000 ? 1024 : 2048; //according to the observation of audio packets
|
uint32_t bufferFrames = sampleRate_ == 16000 ? 1024 : 2048; //according to the observation of audio packets
|
||||||
|
//dac_->openStream(¶meters, nullptr, RTAUDIO_SINT16, sampleRate_, &bufferFrames, &RtAudioOutput::audioBufferReadHandler, static_cast<void*>(this), &streamOptions);
|
||||||
dac_->openStream(¶meters, nullptr, RTAUDIO_SINT16, sampleRate_, &bufferFrames, &RtAudioOutput::audioBufferReadHandler, static_cast<void*>(this), &streamOptions);
|
dac_->openStream(¶meters, nullptr, RTAUDIO_SINT16, sampleRate_, &bufferFrames, &RtAudioOutput::audioBufferReadHandler, static_cast<void*>(this), &streamOptions);
|
||||||
|
OPENAUTO_LOG(info) << "[RtAudioOutput] Sample Rate: " << sampleRate_;
|
||||||
return audioBuffer_.open(QIODevice::ReadWrite);
|
return audioBuffer_.open(QIODevice::ReadWrite);
|
||||||
}
|
}
|
||||||
catch(const RtAudioError& e)
|
catch(const RtAudioError& e)
|
||||||
|
@ -574,13 +574,4 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime()
|
|||||||
ui_->Digital_clock->setText(time_text);
|
ui_->Digital_clock->setText(time_text);
|
||||||
sleep_for(milliseconds(10));
|
sleep_for(milliseconds(10));
|
||||||
|
|
||||||
/**if (configuration_->showClock()) {
|
|
||||||
if (ui_->Digital_clock->isVisible() == true) {
|
|
||||||
ui_->Digital_clock->hide();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (ui_->Digital_clock->isVisible() == false) {
|
|
||||||
ui_->Digital_clock->show();
|
|
||||||
}
|
|
||||||
}**/
|
|
||||||
}
|
}
|
||||||
|
@ -181,6 +181,10 @@ void SettingsWindow::onSave()
|
|||||||
params.append("#");
|
params.append("#");
|
||||||
params.append( std::to_string(ui_->spinBoxGPIOShutdownDelay->value()) );
|
params.append( std::to_string(ui_->spinBoxGPIOShutdownDelay->value()) );
|
||||||
params.append("#");
|
params.append("#");
|
||||||
|
params.append( std::string(ui_->lineEditWifiClientSSID->text().toStdString()) );
|
||||||
|
params.append("#");
|
||||||
|
params.append( std::string(ui_->lineEditWifiClientPassword->text().toStdString()) );
|
||||||
|
params.append("#");
|
||||||
system((std::string("/usr/local/bin/autoapp_helper setparams#") + std::string(params) + std::string(" &") ).c_str());
|
system((std::string("/usr/local/bin/autoapp_helper setparams#") + std::string(params) + std::string(" &") ).c_str());
|
||||||
this->close();
|
this->close();
|
||||||
}
|
}
|
||||||
@ -545,6 +549,10 @@ void SettingsWindow::loadSystemValues()
|
|||||||
// GPIO based shutdown
|
// GPIO based shutdown
|
||||||
ui_->comboBoxGPIOShutdown->setCurrentText(getparams[28]);
|
ui_->comboBoxGPIOShutdown->setCurrentText(getparams[28]);
|
||||||
ui_->spinBoxGPIOShutdownDelay->setValue(getparams[29].toInt());
|
ui_->spinBoxGPIOShutdownDelay->setValue(getparams[29].toInt());
|
||||||
|
|
||||||
|
// Wifi Credentials
|
||||||
|
ui_->lineEditWifiClientSSID->setText(getparams[30]);
|
||||||
|
ui_->lineEditWifiClientPassword->setText(getparams[31]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user