Skip to content

Commit

Permalink
restricted self-reported dialog colum size. change CW test record.
Browse files Browse the repository at this point in the history
  • Loading branch information
sannysanoff committed Jul 5, 2024
1 parent 7c914ef commit 84654a1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions misc_modules/reports_monitor/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,11 @@ class ReportsMonitorModule : public ModuleManager::Instance, public StatusReport
if (report.decibel > 0) {
snprintf(buf, sizeof buf, "%d", (int)report.decibel);
float textWidth = ImGui::CalcTextSize(buf).x;
ImGui::Dummy(ImVec2(ImGui::GetContentRegionAvail().x - textWidth, 0));
float dx = ImGui::GetContentRegionAvail().x - textWidth;
if (dx > 100) {
dx = 100;
}
ImGui::Dummy(ImVec2(dx, 0));
ImGui::SameLine();
ImGui::Text("%s", buf);
} else {
Expand Down Expand Up @@ -830,7 +834,7 @@ class ReportsMonitorModule : public ModuleManager::Instance, public StatusReport
auto disabled = noCallsign || !sigpath::transmitter || sigpath::transmitter->getTXStatus() || !gui::mainWindow.canTransmit();
ImGui::BeginDisabled(disabled);
char buf[1024];
snprintf(buf, sizeof buf, "CW TX:\nCQ CQ DE %s %s K", sigpath::iqFrontEnd.operatorCallsign.c_str(), sigpath::iqFrontEnd.operatorCallsign.c_str());
snprintf(buf, sizeof buf, "CW TX:\nTEST DE %s %s K", sigpath::iqFrontEnd.operatorCallsign.c_str(), sigpath::iqFrontEnd.operatorCallsign.c_str());
if (doTXButtonAtFrequency(buf, gui::freqSelect.frequency)) {
transmitCW(gui::freqSelect.frequency);
}
Expand Down Expand Up @@ -954,7 +958,7 @@ class ReportsMonitorModule : public ModuleManager::Instance, public StatusReport

void transmitCW(int frequency) {
char buf[1024];
snprintf(buf, sizeof buf, "CQ CQ DE %s %s K", sigpath::iqFrontEnd.operatorCallsign.c_str(), sigpath::iqFrontEnd.operatorCallsign.c_str());
snprintf(buf, sizeof buf, "TEST DE %s %s K", sigpath::iqFrontEnd.operatorCallsign.c_str(), sigpath::iqFrontEnd.operatorCallsign.c_str());
const std::string morse = " " +convertToMorseCode(buf)+ " " ;

auto ditDuration = 60 * 1000 / (50 * gui::mainWindow.cwWPM);
Expand Down

0 comments on commit 84654a1

Please sign in to comment.