2023-10-15 12:21:25 +02:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package ScStw;
|
|
|
|
|
2024-11-13 12:35:02 +01:00
|
|
|
message SoundSettings {
|
2024-12-02 23:04:31 +01:00
|
|
|
// Software volume control. Maximum value is 254, default value is 254.
|
2024-11-13 12:35:02 +01:00
|
|
|
uint32 volume = 1;
|
|
|
|
bool muteInternalSpeaker = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SecuritySettings {
|
2024-11-26 20:45:28 +01:00
|
|
|
// If set to true, the bluetooth interface won't be initialized on startup.
|
|
|
|
// This can only be changed over a web socket connection to avoid lockout.
|
|
|
|
// To be effective, the settings must be stored as default and device must be
|
|
|
|
// rebooted!
|
2024-11-13 12:35:02 +01:00
|
|
|
bool disableBluetooth = 1;
|
2024-11-26 16:49:22 +01:00
|
|
|
|
2024-11-26 20:45:28 +01:00
|
|
|
// If set to true, the default settings can't be set via bluetooth.
|
|
|
|
// This can only be changed over a web socket connection to avoid lockout.
|
2024-11-26 16:49:22 +01:00
|
|
|
bool disallowToSetDefaultViaBluetooth = 2;
|
2024-11-13 12:35:02 +01:00
|
|
|
}
|
2023-10-15 12:21:25 +02:00
|
|
|
|
2024-11-13 12:35:02 +01:00
|
|
|
//
|
2024-12-02 22:26:02 +01:00
|
|
|
// StopwatchSettings
|
2024-11-13 12:35:02 +01:00
|
|
|
//
|
|
|
|
|
|
|
|
// = Competition classic race =
|
|
|
|
message ManualStartProcedure {
|
2024-12-02 22:26:02 +01:00
|
|
|
// If set to true, the stopwatch will play the "Ready" sound before starting
|
|
|
|
// when RaceStartCommand is sent.
|
2023-10-15 12:21:25 +02:00
|
|
|
bool sayReady = 1;
|
|
|
|
}
|
|
|
|
|
2024-11-13 12:35:02 +01:00
|
|
|
message CompetitionClassicRaceMode {
|
|
|
|
ManualStartProcedure manualStartProcedure = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// = Training classic race =
|
|
|
|
message AutomatedStartProcedure {
|
|
|
|
bool sayReady = 1;
|
2024-12-02 23:04:31 +01:00
|
|
|
// The duration in milliseconds a startpad has to be pressed before the
|
|
|
|
// autostart is executed. Maximum value is 10000, default value is 3000.
|
2024-11-13 12:35:02 +01:00
|
|
|
int32 standstillDurationBeforeStart = 2;
|
2024-12-02 23:04:31 +01:00
|
|
|
// If set to true, the autostart will be executed even if the race is not in
|
|
|
|
// IDLE_CLEAR_TO_START state.
|
2024-11-13 12:35:02 +01:00
|
|
|
bool autoReset = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message StartProcedure {
|
|
|
|
oneof startProcedure {
|
|
|
|
ManualStartProcedure manualStartProcedure = 1;
|
|
|
|
AutomatedStartProcedure automatedStartProcedure = 2;
|
2023-10-15 12:21:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message LaneSettings {
|
2024-11-13 12:35:02 +01:00
|
|
|
reserved 1; // Deprecated "letter"
|
2024-11-26 20:45:28 +01:00
|
|
|
// If set to true, the lane won't be usable and won't show up in the UI.
|
|
|
|
// Can be used if there is only a single lane in the gym.
|
|
|
|
// At least one lane must be enabled. Otherwise, the first lane will be
|
|
|
|
// enabled!
|
2024-11-13 12:35:02 +01:00
|
|
|
bool disabled = 2;
|
2023-10-15 12:21:25 +02:00
|
|
|
}
|
|
|
|
|
2024-11-13 12:35:02 +01:00
|
|
|
message AbortAfterFalseStart {}
|
|
|
|
message ContinueAfterFalseStart {
|
|
|
|
// This time will be assumed as the reaction time when calculating the final
|
2024-12-02 23:04:31 +01:00
|
|
|
// time. Maximum value is 10000, default value is 100.
|
2024-11-13 12:35:02 +01:00
|
|
|
uint32 assumedReactionTime = 1;
|
|
|
|
// If set to true, there will be no false start tone and the normal tone will
|
2024-11-26 20:45:28 +01:00
|
|
|
// continue. Also, the indicator of wildcard lanes will continue as normal.
|
2024-11-13 12:35:02 +01:00
|
|
|
bool continueStartSequenceAfterFalseStart = 2;
|
|
|
|
}
|
2023-10-15 12:21:25 +02:00
|
|
|
|
2024-11-13 12:35:02 +01:00
|
|
|
message FalseStartBehaviour {
|
|
|
|
oneof behaviour {
|
|
|
|
AbortAfterFalseStart abortAfterFalseStart = 1;
|
|
|
|
ContinueAfterFalseStart continueAfterFalseStart = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message FalseStartSettings {
|
|
|
|
FalseStartBehaviour behaviour = 1;
|
2024-12-02 23:04:31 +01:00
|
|
|
// The duration in milliseconds the false start sound will be played before it
|
|
|
|
// is automatically muted. Maximum value is 60000, default value is 2000.
|
2024-11-13 12:35:02 +01:00
|
|
|
uint32 soundDuration = 2;
|
2024-11-22 14:44:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message IndicatorSettings {
|
2024-12-02 23:04:31 +01:00
|
|
|
// Software brightness control. Maximum value is 254, default value is 254.
|
2024-11-22 14:44:10 +01:00
|
|
|
uint32 brightness = 1;
|
|
|
|
// If set to true, the indicator will stop blinkng as soon as the false start
|
|
|
|
// sound stops (when a false start exists and race is in FINISHED_MUTED
|
2024-11-26 20:45:28 +01:00
|
|
|
// state). Otherwise, it will continue blinking until the race is reset.
|
2024-11-22 14:44:10 +01:00
|
|
|
bool turnOffWhenFalseStartSoundIsMuted = 2;
|
|
|
|
|
2024-12-02 23:04:31 +01:00
|
|
|
// If set to true, the indicator will turn off when the race is in IDLE state.
|
2024-11-26 20:45:28 +01:00
|
|
|
// Otherwise, it will be red.
|
2024-11-22 14:44:10 +01:00
|
|
|
bool turnOffWhenIdle = 3;
|
2024-11-13 12:35:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message TrainingClassicRaceMode {
|
|
|
|
StartProcedure startProcedure = 1;
|
2024-11-26 20:45:28 +01:00
|
|
|
// The number of lanes cannot be changed by the client.
|
2023-10-15 12:21:25 +02:00
|
|
|
repeated LaneSettings lanes = 2;
|
2024-11-13 12:35:02 +01:00
|
|
|
FalseStartSettings falseStartSettings = 3;
|
2024-11-22 14:44:10 +01:00
|
|
|
IndicatorSettings indicatorSettings = 4;
|
2024-11-13 12:35:02 +01:00
|
|
|
}
|
|
|
|
|
2024-12-02 22:26:02 +01:00
|
|
|
message StopwatchSettings {
|
2024-11-13 12:35:02 +01:00
|
|
|
oneof mode {
|
|
|
|
CompetitionClassicRaceMode competitionClassicRaceMode = 1;
|
|
|
|
TrainingClassicRaceMode trainingClassicRaceMode = 2;
|
|
|
|
// TODO CompetitionRelayMode competitionRelayMode = 3;
|
|
|
|
// TODO Competition4SpeedMode competition4SpeedMode = 4;
|
|
|
|
}
|
2023-10-15 12:21:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
message Settings {
|
2024-11-26 20:45:28 +01:00
|
|
|
// if the settings are stored as default in the flash memory.
|
2023-10-15 12:21:25 +02:00
|
|
|
bool default = 1;
|
2024-11-13 12:35:02 +01:00
|
|
|
|
2024-12-02 22:26:02 +01:00
|
|
|
// DEPRECATED, just kept for compatibility, use StopwatchSettings instead!
|
2024-12-02 23:04:31 +01:00
|
|
|
// Will be ignored when StopwatchSettings is set and converted to
|
|
|
|
// StopwatchSettings otherwise.
|
|
|
|
// For backwards compatibility, this is always set when reading the settings.
|
2024-11-13 13:53:11 +01:00
|
|
|
TrainingClassicRaceMode race = 2 [ deprecated = true ];
|
2024-11-13 12:35:02 +01:00
|
|
|
|
2023-10-15 12:21:25 +02:00
|
|
|
SoundSettings sound = 3;
|
2024-12-02 22:26:02 +01:00
|
|
|
StopwatchSettings stopwatchSettings = 4;
|
2024-11-13 12:35:02 +01:00
|
|
|
SecuritySettings securitySettings = 5;
|
2023-10-15 12:21:25 +02:00
|
|
|
}
|