Skip to content

Commit

Permalink
ggmorse-gui : v1.3.4 + minor updates in ggmorse-to-file
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Jul 28, 2021
1 parent 8a44485 commit 33c961d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/ggmorse-gui/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ void renderMain() {

if (windowId == WindowId::Settings) {
ImGui::BeginChild("Settings:main", ImGui::GetContentRegionAvail(), true, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
ImGui_TextCentered("GGMorse v1.3.3", false);
ImGui_TextCentered("GGMorse v1.3.4", false);
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts.back());
ImGui::Text("%s", "");
ImGui_TextCentered("created by", true);
Expand Down
8 changes: 4 additions & 4 deletions examples/ggmorse-to-file/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

int main(int argc, char** argv) {
fprintf(stderr, "Usage: %s [-fN] -[wN] [-vN] [-sN]\n", argv[0]);
fprintf(stderr, " -fN - frequency of the generated signal, N in [200, sampleRate/2], (default: 550)\n");
fprintf(stderr, " -wN - speed of the transmission in words-per-minute, N in [5, 55], (default: 25)\n");
fprintf(stderr, " -fN - frequency of the generated signal, N in [100, sampleRate/2], (default: 550)\n");
fprintf(stderr, " -wN - speed of the transmission in words-per-minute, N in [5, 140], (default: 25)\n");
fprintf(stderr, " -vN - output volume, N in (0, 100], (default: 50)\n");
fprintf(stderr, " -sN - output sample rate, N in [%d, %d], (default: %d)\n", (int) 4000, (int) 96000, (int) GGMorse::kBaseSampleRate);
fprintf(stderr, "\n");
Expand All @@ -32,12 +32,12 @@ int main(int argc, char** argv) {
int volume = argm["v"].empty() ? 50 : std::stoi(argm["v"]);
float sampleRateOut = argm["s"].empty() ? GGMorse::kBaseSampleRate : std::stof(argm["s"]);

if (frequency_hz < 200 || frequency_hz > sampleRateOut/2) {
if (frequency_hz < 100 || frequency_hz > sampleRateOut/2 + 1) {
fprintf(stderr, "Invalid frequency\n");
return -1;
}

if (speed_wpm < 5 || speed_wpm > 55) {
if (speed_wpm < 5 || speed_wpm > 140) {
fprintf(stderr, "Invalid speed\n");
return -1;
}
Expand Down

0 comments on commit 33c961d

Please sign in to comment.