Fixed: OIRT frequency was not added to logbook

This commit is contained in:
Sjef Verhoeven PE5PVB
2025-01-19 22:42:04 +01:00
parent 1ad928c927
commit acfeecf0a6
2 changed files with 7 additions and 4 deletions

View File

@@ -243,11 +243,12 @@ byte addRowToCSV() {
}
// Prepare the frequency in a formatted string (e.g., "XX.XX MHz")
int freqInt = (int)frequency; // Cast the frequency value to an integer
int convertedFreq = (freqInt + ConverterSet * 100) / 100; // Apply necessary conversion
int freqInt;
if (band == BAND_OIRT) freqInt = (int)frequency_OIRT; else freqInt = (int)frequency; // Cast the frequency value to an integer
int convertedFreq = (freqInt + (band != BAND_OIRT ? ConverterSet * 100 : 0)) / 100; // Apply necessary conversion
String frequencyFormatted = String(convertedFreq) + "." +
((freqInt + ConverterSet * 100) % 100 < 10 ? "0" : "") +
String((freqInt + ConverterSet * 100) % 100) + " MHz";
((freqInt + (band != BAND_OIRT ? ConverterSet * 100 : 0)) % 100 < 10 ? "0" : "") +
String((freqInt + (band != BAND_OIRT ? ConverterSet * 100 : 0)) % 100) + " MHz";
// Calculate signal strength based on the selected unit
int SStatusprint = 0;

View File

@@ -12,12 +12,14 @@ extern bool autoDST;
extern bool clockampm;
extern bool NTPupdated;
extern bool rtcset;
extern byte band;
extern byte language;
extern byte unit;
extern int16_t SStatus;
extern int8_t NTPoffset;
extern unsigned int ConverterSet;
extern unsigned int frequency;
extern unsigned int frequency_OIRT;
extern unsigned int logcounter;
extern TEF6686 radio;