display of start delay is now working correctly

This commit is contained in:
Dorian Zedler 2020-10-02 16:49:43 +02:00
parent fbd13c951e
commit 6609245356
Signed by: dorian
GPG key ID: D3B255CB8BC7CD37
4 changed files with 9 additions and 13 deletions

View file

@ -46,7 +46,7 @@ Item {
property ScStwSetting setting: speedBackend.settings.getSetting(ScStwSettings.CompetitionModeSetting, ScStwSettings.KeyLevel)
property double size
startProgress: speedBackend.race.nextStartActionDetails[ScStwRace.NextStartActionDelayProgress]
startProgress: speedBackend.race.currentStartDelay[ScStwRace.CurrentStartStateDelayProgress]
/*Connections {
target: mainActionButton.setting

View file

@ -15,10 +15,6 @@ DelayButton {
property double startProgress
delay: progressControlActivated ? 2000:0
onStartProgressChanged: {
console.log("start progress: " + startProgress)
}
Text {
id: labelText
text: control.text
@ -87,7 +83,7 @@ DelayButton {
if(showHoldProgress)
progress = control.progress
else
progress = control.startProgress <= 0 ? 0:1-control.startProgress
progress = control.startProgress < 0 ? 0:1-control.startProgress
var ctx = getContext("2d")

@ -1 +1 @@
Subproject commit 78b0b883d55aae9c7efeb59aa2fef9eb5cfe0c7d
Subproject commit a247a6c3054545ec69c4eff14b5134f4c084ec31

View file

@ -74,7 +74,7 @@ void ScStwAppBackend::refreshTimerText() {
// --- refresh next start action delay progress ---
if(this->getRace()->getState() == ScStwRace::WAITING || this->getRace()->getState() == ScStwRace::PREPAIRING) {
emit this->getRace()->nextStartActionDetailsChanged();
emit this->getRace()->currentStartDelayChanged();
}
this->timerTextRefreshTimer->start();
@ -189,21 +189,21 @@ int ScStwAppBackend::getMode() {
}
void ScStwAppBackend::reloadRaceSettings() {
this->getRace()->writeStartActionSetting(
ScStwRace::AtYourMarks,
this->getRace()->writeStartSoundSetting(
ScStwSoundPlayer::AtYourMarks,
this->appSettings->readSetting(ScStwSettings::BaseStationSetting::AtYourMarksSoundEnableSetting).toBool(),
this->appSettings->readSetting(ScStwSettings::BaseStationSetting::AtYourMarksSoundDelaySetting).toDouble()
);
this->getRace()->writeStartActionSetting(
ScStwRace::Ready,
this->getRace()->writeStartSoundSetting(
ScStwSoundPlayer::Ready,
this->appSettings->readSetting(ScStwSettings::BaseStationSetting::ReadySoundEnableSetting).toBool(),
this->appSettings->readSetting(ScStwSettings::BaseStationSetting::ReadySoundDelaySetting).toDouble()
);
this->getRace()->setSoundVolume(1);
this->getRace()->setAllowAutomaticTimerDisable(true);
this->getRace()->setCompetitionMode(false);
}