Compare commits
No commits in common. "700f18eea80039094a76e0271e0b418d708a3d3a" and "fa2ad5d0d25d66840004483191dd0fe0dab34d54" have entirely different histories.
700f18eea8
...
fa2ad5d0d2
29 changed files with 19 additions and 148 deletions
|
|
@ -9,14 +9,6 @@ single running list until the first versioned release.
|
||||||
|
|
||||||
_Nothing yet._
|
_Nothing yet._
|
||||||
|
|
||||||
## 0.12.0
|
|
||||||
|
|
||||||
- **Battery "Bars" display** — a third battery status option in the top status
|
|
||||||
bar alongside **%** and **V**: a battery-shaped icon holding up to **four
|
|
||||||
segments**, each representing **25 %** of charge, with the fill blinking when
|
|
||||||
the battery is low. Cycle the mode with ◀/▶ at **Menu → Options → Display
|
|
||||||
Options → Battery**. The "Bars" menu label is localised (German: *Balken*).
|
|
||||||
|
|
||||||
## 0.11.0
|
## 0.11.0
|
||||||
|
|
||||||
- **CRT-style shut-off animation** — when powering off, the current screen
|
- **CRT-style shut-off animation** — when powering off, the current screen
|
||||||
|
|
|
||||||
12
MANUAL.md
12
MANUAL.md
|
|
@ -59,18 +59,6 @@ Optionally dims the backlight after inactivity to **100 / 50 / 30 / 15 %** of th
|
||||||
configured brightness (only in **Auto** backlight mode). Any activity restores full
|
configured brightness (only in **Auto** backlight mode). Any activity restores full
|
||||||
brightness. Set it in **Menu → Options → Display Options → Screen Dim**.
|
brightness. Set it in **Menu → Options → Display Options → Screen Dim**.
|
||||||
|
|
||||||
### Battery display mode — 🟢 [FreeTRX]
|
|
||||||
The battery level in the top status bar can be shown three ways, cycled with
|
|
||||||
◀/▶ at **Menu → Options → Display Options → Battery**:
|
|
||||||
|
|
||||||
- **%** — remaining charge as a percentage.
|
|
||||||
- **V** — the measured battery voltage.
|
|
||||||
- **Bars** — a battery-shaped icon with up to **four segments**, each worth
|
|
||||||
**25 %** of charge. The fill blinks when the battery is low.
|
|
||||||
|
|
||||||
The **%** and **V** options are inherited from OpenGD77; **Bars** is the new
|
|
||||||
addition. In every mode the low-battery warning still blinks the reading.
|
|
||||||
|
|
||||||
### Shut-off animation — 🟢 [FreeTRX]
|
### Shut-off animation — 🟢 [FreeTRX]
|
||||||
Powering off collapses whatever is on screen towards the middle — squeezed to a
|
Powering off collapses whatever is on screen towards the middle — squeezed to a
|
||||||
line, then a dot — like an old CRT switching off, in place of the "Power Off"
|
line, then a dot — like an old CRT switching off, in place of the "Power Off"
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
#define _FREETRX_VERSION_H_
|
#define _FREETRX_VERSION_H_
|
||||||
|
|
||||||
#define FREETRX_VERSION_MAJOR 0
|
#define FREETRX_VERSION_MAJOR 0
|
||||||
#define FREETRX_VERSION_MINOR 12
|
#define FREETRX_VERSION_MINOR 11
|
||||||
#define FREETRX_VERSION_PATCH 0
|
#define FREETRX_VERSION_PATCH 0
|
||||||
|
|
||||||
#define FREETRX_VERSION "0.12.0"
|
#define FREETRX_VERSION "0.11.0"
|
||||||
|
|
||||||
#endif // _FREETRX_VERSION_H_
|
#endif // _FREETRX_VERSION_H_
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ typedef enum
|
||||||
{
|
{
|
||||||
BIT_INVERSE_VIDEO = (SETTINGS_BITS_BANK_0 | (1 << 0)),
|
BIT_INVERSE_VIDEO = (SETTINGS_BITS_BANK_0 | (1 << 0)),
|
||||||
BIT_PTT_LATCH = (SETTINGS_BITS_BANK_0 | (1 << 1)),
|
BIT_PTT_LATCH = (SETTINGS_BITS_BANK_0 | (1 << 1)),
|
||||||
BIT_BATTERY_BARS_IN_HEADER = (SETTINGS_BITS_BANK_0 | (1 << 2)), // companion to BIT_BATTERY_VOLTAGE_IN_HEADER: encodes the "Bars" battery display mode
|
BIT_UNUSED_2 = (SETTINGS_BITS_BANK_0 | (1 << 2)),
|
||||||
BIT_BATTERY_VOLTAGE_IN_HEADER = (SETTINGS_BITS_BANK_0 | (1 << 3)),
|
BIT_BATTERY_VOLTAGE_IN_HEADER = (SETTINGS_BITS_BANK_0 | (1 << 3)),
|
||||||
BIT_SETTINGS_UPDATED = (SETTINGS_BITS_BANK_0 | (1 << 4)),
|
BIT_SETTINGS_UPDATED = (SETTINGS_BITS_BANK_0 | (1 << 4)),
|
||||||
BIT_TX_RX_FREQ_LOCK = (SETTINGS_BITS_BANK_0 | (1 << 5)),
|
BIT_TX_RX_FREQ_LOCK = (SETTINGS_BITS_BANK_0 | (1 << 5)),
|
||||||
|
|
@ -411,20 +411,6 @@ void settingsSetOptionBit(bitfieldOptions_t bit, bool set);
|
||||||
bool settingsIsOptionBitSetFromSettings(settingsStruct_t *sets, bitfieldOptions_t bit);
|
bool settingsIsOptionBitSetFromSettings(settingsStruct_t *sets, bitfieldOptions_t bit);
|
||||||
bool settingsIsOptionBitSet(bitfieldOptions_t bit);
|
bool settingsIsOptionBitSet(bitfieldOptions_t bit);
|
||||||
|
|
||||||
// How the battery level is shown in the header. Encoded across two option bits
|
|
||||||
// (BIT_BATTERY_VOLTAGE_IN_HEADER / BIT_BATTERY_BARS_IN_HEADER) for backwards
|
|
||||||
// compatibility: an unset pair reads as PERCENTAGE, matching legacy behaviour.
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
BATTERY_UNIT_PERCENTAGE = 0,
|
|
||||||
BATTERY_UNIT_VOLTAGE,
|
|
||||||
BATTERY_UNIT_BARS,
|
|
||||||
NUM_BATTERY_UNIT_DISPLAY
|
|
||||||
} batteryUnitDisplay_t;
|
|
||||||
|
|
||||||
batteryUnitDisplay_t settingsGetBatteryUnitDisplay(void);
|
|
||||||
void settingsSetBatteryUnitDisplay(batteryUnitDisplay_t mode);
|
|
||||||
|
|
||||||
void settingsSetDirty(void);
|
void settingsSetDirty(void);
|
||||||
void settingsSetVFODirty(void);
|
void settingsSetVFODirty(void);
|
||||||
void settingsSaveIfNeeded(bool immediately);
|
void settingsSaveIfNeeded(bool immediately);
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t catalanLanguage=
|
||||||
.sms_own_id_only = "My ID only", // MaxLen: 16
|
.sms_own_id_only = "My ID only", // MaxLen: 16
|
||||||
.message_from = "Message from", // MaxLen: 16
|
.message_from = "Message from", // MaxLen: 16
|
||||||
.delete_message = "Delete message?", // MaxLen: 16
|
.delete_message = "Delete message?", // MaxLen: 16
|
||||||
.battery_bars = "Barres", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t croatianLanguage =
|
||||||
.sms_own_id_only = "My ID only", // MaxLen: 16
|
.sms_own_id_only = "My ID only", // MaxLen: 16
|
||||||
.message_from = "Message from", // MaxLen: 16
|
.message_from = "Message from", // MaxLen: 16
|
||||||
.delete_message = "Delete message?", // MaxLen: 16
|
.delete_message = "Delete message?", // MaxLen: 16
|
||||||
.battery_bars = "Trake", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t czechLanguage =
|
||||||
.sms_own_id_only = "My ID only", // MaxLen: 16
|
.sms_own_id_only = "My ID only", // MaxLen: 16
|
||||||
.message_from = "Message from", // MaxLen: 16
|
.message_from = "Message from", // MaxLen: 16
|
||||||
.delete_message = "Delete message?", // MaxLen: 16
|
.delete_message = "Delete message?", // MaxLen: 16
|
||||||
.battery_bars = "Pruhy", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t danishLanguage =
|
||||||
.sms_own_id_only = "My ID only", // MaxLen: 16
|
.sms_own_id_only = "My ID only", // MaxLen: 16
|
||||||
.message_from = "Message from", // MaxLen: 16
|
.message_from = "Message from", // MaxLen: 16
|
||||||
.delete_message = "Delete message?", // MaxLen: 16
|
.delete_message = "Delete message?", // MaxLen: 16
|
||||||
.battery_bars = "Bjælker", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t dutchLanguage =
|
||||||
.sms_own_id_only = "Alleen mijn ID", // MaxLen: 16
|
.sms_own_id_only = "Alleen mijn ID", // MaxLen: 16
|
||||||
.message_from = "Bericht van", // MaxLen: 16
|
.message_from = "Bericht van", // MaxLen: 16
|
||||||
.delete_message = "Bericht wissen?", // MaxLen: 16
|
.delete_message = "Bericht wissen?", // MaxLen: 16
|
||||||
.battery_bars = "Balken", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t englishLanguage =
|
||||||
.sms_own_id_only = "My ID only", // MaxLen: 16
|
.sms_own_id_only = "My ID only", // MaxLen: 16
|
||||||
.message_from = "Message from", // MaxLen: 16
|
.message_from = "Message from", // MaxLen: 16
|
||||||
.delete_message = "Delete message?", // MaxLen: 16
|
.delete_message = "Delete message?", // MaxLen: 16
|
||||||
.battery_bars = "Bars", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t finnishLanguage =
|
||||||
.sms_own_id_only = "My ID only", // MaxLen: 16
|
.sms_own_id_only = "My ID only", // MaxLen: 16
|
||||||
.message_from = "Message from", // MaxLen: 16
|
.message_from = "Message from", // MaxLen: 16
|
||||||
.delete_message = "Delete message?", // MaxLen: 16
|
.delete_message = "Delete message?", // MaxLen: 16
|
||||||
.battery_bars = "Palkit", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t frenchLanguage =
|
||||||
.sms_own_id_only = "Mon ID seul", // MaxLen: 16
|
.sms_own_id_only = "Mon ID seul", // MaxLen: 16
|
||||||
.message_from = "Message de", // MaxLen: 16
|
.message_from = "Message de", // MaxLen: 16
|
||||||
.delete_message = "Suppr. message?", // MaxLen: 16
|
.delete_message = "Suppr. message?", // MaxLen: 16
|
||||||
.battery_bars = "Barres", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t germanLanguage =
|
||||||
.sms_own_id_only = "Nur eigene ID", // MaxLen: 16
|
.sms_own_id_only = "Nur eigene ID", // MaxLen: 16
|
||||||
.message_from = "Nachricht von", // MaxLen: 16
|
.message_from = "Nachricht von", // MaxLen: 16
|
||||||
.delete_message = "Nachricht lösch.", // MaxLen: 16
|
.delete_message = "Nachricht lösch.", // MaxLen: 16
|
||||||
.battery_bars = "Balken", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t hungarianLanguage=
|
||||||
.sms_own_id_only = "My ID only", // MaxLen: 16
|
.sms_own_id_only = "My ID only", // MaxLen: 16
|
||||||
.message_from = "Message from", // MaxLen: 16
|
.message_from = "Message from", // MaxLen: 16
|
||||||
.delete_message = "Delete message?", // MaxLen: 16
|
.delete_message = "Delete message?", // MaxLen: 16
|
||||||
.battery_bars = "Sávok", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t italianLanguage =
|
||||||
.sms_own_id_only = "Solo mio ID", // MaxLen: 16
|
.sms_own_id_only = "Solo mio ID", // MaxLen: 16
|
||||||
.message_from = "Messaggio da", // MaxLen: 16
|
.message_from = "Messaggio da", // MaxLen: 16
|
||||||
.delete_message = "Elimina msg?", // MaxLen: 16
|
.delete_message = "Elimina msg?", // MaxLen: 16
|
||||||
.battery_bars = "Barre", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t japaneseLanguage =
|
||||||
.sms_own_id_only = "My ID only", // MaxLen: 16
|
.sms_own_id_only = "My ID only", // MaxLen: 16
|
||||||
.message_from = "Message from", // MaxLen: 16
|
.message_from = "Message from", // MaxLen: 16
|
||||||
.delete_message = "Delete message?", // MaxLen: 16
|
.delete_message = "Delete message?", // MaxLen: 16
|
||||||
.battery_bars = "Bar", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t polishLanguage =
|
||||||
.sms_own_id_only = "My ID only", // MaxLen: 16
|
.sms_own_id_only = "My ID only", // MaxLen: 16
|
||||||
.message_from = "Message from", // MaxLen: 16
|
.message_from = "Message from", // MaxLen: 16
|
||||||
.delete_message = "Delete message?", // MaxLen: 16
|
.delete_message = "Delete message?", // MaxLen: 16
|
||||||
.battery_bars = "Paski", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t portuguesBrazilLanguage =
|
||||||
.sms_own_id_only = "Só meu ID", // MaxLen: 16
|
.sms_own_id_only = "Só meu ID", // MaxLen: 16
|
||||||
.message_from = "Mensagem de", // MaxLen: 16
|
.message_from = "Mensagem de", // MaxLen: 16
|
||||||
.delete_message = "Apagar msg?", // MaxLen: 16
|
.delete_message = "Apagar msg?", // MaxLen: 16
|
||||||
.battery_bars = "Barras", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t portuguesLanguage =
|
||||||
.sms_own_id_only = "Só meu ID", // MaxLen: 16
|
.sms_own_id_only = "Só meu ID", // MaxLen: 16
|
||||||
.message_from = "Mensagem de", // MaxLen: 16
|
.message_from = "Mensagem de", // MaxLen: 16
|
||||||
.delete_message = "Apagar msg?", // MaxLen: 16
|
.delete_message = "Apagar msg?", // MaxLen: 16
|
||||||
.battery_bars = "Barras", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t romanianLanguage =
|
||||||
.sms_own_id_only = "My ID only", // MaxLen: 16
|
.sms_own_id_only = "My ID only", // MaxLen: 16
|
||||||
.message_from = "Message from", // MaxLen: 16
|
.message_from = "Message from", // MaxLen: 16
|
||||||
.delete_message = "Delete message?", // MaxLen: 16
|
.delete_message = "Delete message?", // MaxLen: 16
|
||||||
.battery_bars = "Bare", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t slovenianLanguage =
|
||||||
.sms_own_id_only = "My ID only", // MaxLen: 16
|
.sms_own_id_only = "My ID only", // MaxLen: 16
|
||||||
.message_from = "Message from", // MaxLen: 16
|
.message_from = "Message from", // MaxLen: 16
|
||||||
.delete_message = "Delete message?", // MaxLen: 16
|
.delete_message = "Delete message?", // MaxLen: 16
|
||||||
.battery_bars = "Stolpci", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t spanishLanguage =
|
||||||
.sms_own_id_only = "Solo mi ID", // MaxLen: 16
|
.sms_own_id_only = "Solo mi ID", // MaxLen: 16
|
||||||
.message_from = "Mensaje de", // MaxLen: 16
|
.message_from = "Mensaje de", // MaxLen: 16
|
||||||
.delete_message = "¿Borrar mensaje?", // MaxLen: 16
|
.delete_message = "¿Borrar mensaje?", // MaxLen: 16
|
||||||
.battery_bars = "Barras", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t swedishLanguage =
|
||||||
.sms_own_id_only = "My ID only", // MaxLen: 16
|
.sms_own_id_only = "My ID only", // MaxLen: 16
|
||||||
.message_from = "Message from", // MaxLen: 16
|
.message_from = "Message from", // MaxLen: 16
|
||||||
.delete_message = "Delete message?", // MaxLen: 16
|
.delete_message = "Delete message?", // MaxLen: 16
|
||||||
.battery_bars = "Staplar", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,6 @@ const stringsTable_t turkishLanguage =
|
||||||
.sms_own_id_only = "My ID only", // MaxLen: 16
|
.sms_own_id_only = "My ID only", // MaxLen: 16
|
||||||
.message_from = "Message from", // MaxLen: 16
|
.message_from = "Message from", // MaxLen: 16
|
||||||
.delete_message = "Delete message?", // MaxLen: 16
|
.delete_message = "Delete message?", // MaxLen: 16
|
||||||
.battery_bars = "Çubuklar", // MaxLen: 16
|
|
||||||
};
|
};
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
#else
|
#else
|
||||||
#define LANGUAGE_TAG_MAGIC_NUMBER { 'G', 'D', '7', '7' }, { 'L', 'A', 'N', 'G' } // Never change this tag.
|
#define LANGUAGE_TAG_MAGIC_NUMBER { 'G', 'D', '7', '7' }, { 'L', 'A', 'N', 'G' } // Never change this tag.
|
||||||
#endif
|
#endif
|
||||||
#define LANGUAGE_TAG_VERSION { 0x00, 0x00, 0x00, 0x07 } // Bump the version each time the language struct is changed
|
#define LANGUAGE_TAG_VERSION { 0x00, 0x00, 0x00, 0x06 } // Bump the version each time the language struct is changed
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
@ -353,7 +353,6 @@ typedef struct
|
||||||
const char sms_own_id_only[LANGUAGE_TEXTS_LENGTH];
|
const char sms_own_id_only[LANGUAGE_TEXTS_LENGTH];
|
||||||
const char message_from[LANGUAGE_TEXTS_LENGTH];
|
const char message_from[LANGUAGE_TEXTS_LENGTH];
|
||||||
const char delete_message[LANGUAGE_TEXTS_LENGTH];
|
const char delete_message[LANGUAGE_TEXTS_LENGTH];
|
||||||
const char battery_bars[LANGUAGE_TEXTS_LENGTH]; // "Bars" battery header display mode
|
|
||||||
} stringsTable_t;
|
} stringsTable_t;
|
||||||
|
|
||||||
#endif // _OPENGD77_UILANGUAGE_H_
|
#endif // _OPENGD77_UILANGUAGE_H_
|
||||||
|
|
|
||||||
|
|
@ -619,27 +619,6 @@ void settingsSetScreenDimLevel(uint8_t level)
|
||||||
settingsSetOptionBit(BIT_SCREEN_DIM_2, ((level & 4) != 0));
|
settingsSetOptionBit(BIT_SCREEN_DIM_2, ((level & 4) != 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Battery header display mode is stored across two option bits so existing
|
|
||||||
// codeplugs (both bits clear) keep reading as BATTERY_UNIT_PERCENTAGE.
|
|
||||||
batteryUnitDisplay_t settingsGetBatteryUnitDisplay(void)
|
|
||||||
{
|
|
||||||
if (settingsIsOptionBitSet(BIT_BATTERY_BARS_IN_HEADER))
|
|
||||||
{
|
|
||||||
return BATTERY_UNIT_BARS;
|
|
||||||
}
|
|
||||||
if (settingsIsOptionBitSet(BIT_BATTERY_VOLTAGE_IN_HEADER))
|
|
||||||
{
|
|
||||||
return BATTERY_UNIT_VOLTAGE;
|
|
||||||
}
|
|
||||||
return BATTERY_UNIT_PERCENTAGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void settingsSetBatteryUnitDisplay(batteryUnitDisplay_t mode)
|
|
||||||
{
|
|
||||||
settingsSetOptionBit(BIT_BATTERY_VOLTAGE_IN_HEADER, (mode == BATTERY_UNIT_VOLTAGE));
|
|
||||||
settingsSetOptionBit(BIT_BATTERY_BARS_IN_HEADER, (mode == BATTERY_UNIT_BARS));
|
|
||||||
}
|
|
||||||
|
|
||||||
void settingsSetDirty(void)
|
void settingsSetDirty(void)
|
||||||
{
|
{
|
||||||
settingsDirty = true;
|
settingsDirty = true;
|
||||||
|
|
|
||||||
|
|
@ -314,19 +314,15 @@ static void updateScreen(bool isFirstRun)
|
||||||
#if ! defined(PLATFORM_MD9600)
|
#if ! defined(PLATFORM_MD9600)
|
||||||
case DISPLAY_BATTERY_UNIT_IN_HEADER:
|
case DISPLAY_BATTERY_UNIT_IN_HEADER:
|
||||||
leftSide = currentLanguage->battery;
|
leftSide = currentLanguage->battery;
|
||||||
switch (settingsGetBatteryUnitDisplay())
|
if (settingsIsOptionBitSet(BIT_BATTERY_VOLTAGE_IN_HEADER))
|
||||||
{
|
{
|
||||||
case BATTERY_UNIT_VOLTAGE:
|
|
||||||
rightSideUnitsPrompt = PROMPT_VOLTS;
|
rightSideUnitsPrompt = PROMPT_VOLTS;
|
||||||
rightSideUnitsStr = "V";
|
rightSideUnitsStr = "V";
|
||||||
break;
|
}
|
||||||
case BATTERY_UNIT_BARS:
|
else
|
||||||
rightSideConst = currentLanguage->battery_bars;
|
{
|
||||||
break;
|
|
||||||
default: // BATTERY_UNIT_PERCENTAGE
|
|
||||||
rightSideUnitsPrompt = PROMPT_PERCENT;
|
rightSideUnitsPrompt = PROMPT_PERCENT;
|
||||||
rightSideUnitsStr = "%";
|
rightSideUnitsStr = "%";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -709,12 +705,9 @@ static void handleEvent(uiEvent_t *ev)
|
||||||
|
|
||||||
#if ! defined(PLATFORM_MD9600)
|
#if ! defined(PLATFORM_MD9600)
|
||||||
case DISPLAY_BATTERY_UNIT_IN_HEADER:
|
case DISPLAY_BATTERY_UNIT_IN_HEADER:
|
||||||
|
if (settingsIsOptionBitSet(BIT_BATTERY_VOLTAGE_IN_HEADER) == false)
|
||||||
{
|
{
|
||||||
batteryUnitDisplay_t batteryUnit = settingsGetBatteryUnitDisplay();
|
settingsSetOptionBit(BIT_BATTERY_VOLTAGE_IN_HEADER, true);
|
||||||
if (batteryUnit < (NUM_BATTERY_UNIT_DISPLAY - 1))
|
|
||||||
{
|
|
||||||
settingsSetBatteryUnitDisplay(batteryUnit + 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -935,12 +928,9 @@ static void handleEvent(uiEvent_t *ev)
|
||||||
|
|
||||||
#if ! defined(PLATFORM_MD9600)
|
#if ! defined(PLATFORM_MD9600)
|
||||||
case DISPLAY_BATTERY_UNIT_IN_HEADER:
|
case DISPLAY_BATTERY_UNIT_IN_HEADER:
|
||||||
|
if (settingsIsOptionBitSet(BIT_BATTERY_VOLTAGE_IN_HEADER))
|
||||||
{
|
{
|
||||||
batteryUnitDisplay_t batteryUnit = settingsGetBatteryUnitDisplay();
|
settingsSetOptionBit(BIT_BATTERY_VOLTAGE_IN_HEADER, false);
|
||||||
if (batteryUnit > BATTERY_UNIT_PERCENTAGE)
|
|
||||||
{
|
|
||||||
settingsSetBatteryUnitDisplay(batteryUnit - 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1192,7 +1182,6 @@ static void exitCallback(void *data)
|
||||||
#endif
|
#endif
|
||||||
#if ! defined(PLATFORM_MD9600)
|
#if ! defined(PLATFORM_MD9600)
|
||||||
BIT_BATTERY_VOLTAGE_IN_HEADER,
|
BIT_BATTERY_VOLTAGE_IN_HEADER,
|
||||||
BIT_BATTERY_BARS_IN_HEADER,
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAS_SOFT_VOLUME)
|
#if defined(HAS_SOFT_VOLUME)
|
||||||
BIT_VISUAL_VOLUME,
|
BIT_VISUAL_VOLUME,
|
||||||
|
|
|
||||||
|
|
@ -1897,7 +1897,7 @@ void uiUtilityRenderHeader(bool isVFODualWatchScanning, bool isVFOSweepScanning,
|
||||||
UNUSED_PARAMETER(forceBatteryDisplay);
|
UNUSED_PARAMETER(forceBatteryDisplay);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (settingsGetBatteryUnitDisplay() == BATTERY_UNIT_VOLTAGE)
|
if (settingsIsOptionBitSet(BIT_BATTERY_VOLTAGE_IN_HEADER))
|
||||||
{
|
{
|
||||||
getBatteryVoltage(&volts, &mvolts);
|
getBatteryVoltage(&volts, &mvolts);
|
||||||
|
|
||||||
|
|
@ -1911,7 +1911,6 @@ void uiUtilityRenderHeader(bool isVFODualWatchScanning, bool isVFOSweepScanning,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Both the percentage and bars display modes need the battery percentage.
|
|
||||||
batteryPercentage = getBatteryPercentage();
|
batteryPercentage = getBatteryPercentage();
|
||||||
|
|
||||||
if (batteryPercentage < 100)
|
if (batteryPercentage < 100)
|
||||||
|
|
@ -2208,9 +2207,7 @@ void uiUtilityRenderHeader(bool isVFODualWatchScanning, bool isVFOSweepScanning,
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
batteryUnitDisplay_t batteryUnit = settingsGetBatteryUnitDisplay();
|
if (settingsIsOptionBitSet(BIT_BATTERY_VOLTAGE_IN_HEADER))
|
||||||
|
|
||||||
if (batteryUnit == BATTERY_UNIT_VOLTAGE)
|
|
||||||
{
|
{
|
||||||
int16_t xV = (DISPLAY_SIZE_X - ((4 * 6) + 3));
|
int16_t xV = (DISPLAY_SIZE_X - ((4 * 6) + 3));
|
||||||
|
|
||||||
|
|
@ -2222,41 +2219,6 @@ void uiUtilityRenderHeader(bool isVFODualWatchScanning, bool isVFOSweepScanning,
|
||||||
snprintf(buffer, SCREEN_LINE_BUFFER_SIZE, "%1dV", mvolts);
|
snprintf(buffer, SCREEN_LINE_BUFFER_SIZE, "%1dV", mvolts);
|
||||||
displayPrintCore(xV + (6 * 2) + 3, DISPLAY_Y_POS_HEADER, buffer, (apoEnabled ? FONT_SIZE_1_BOLD : FONT_SIZE_1), TEXT_ALIGN_LEFT, ((batteryIsLow ? scanBlinkPhase : false)));
|
displayPrintCore(xV + (6 * 2) + 3, DISPLAY_Y_POS_HEADER, buffer, (apoEnabled ? FONT_SIZE_1_BOLD : FONT_SIZE_1), TEXT_ALIGN_LEFT, ((batteryIsLow ? scanBlinkPhase : false)));
|
||||||
}
|
}
|
||||||
else if (batteryUnit == BATTERY_UNIT_BARS)
|
|
||||||
{
|
|
||||||
// Battery-shaped icon, right-aligned in the header: an outlined body with a
|
|
||||||
// terminal nub, holding up to 4 segments each representing 25% of charge.
|
|
||||||
const int16_t bodyW = 24;
|
|
||||||
const int16_t bodyH = 7;
|
|
||||||
const int16_t nubW = 2;
|
|
||||||
const int16_t nubH = 3;
|
|
||||||
const int16_t barW = 4;
|
|
||||||
const int16_t barGap = 1;
|
|
||||||
int16_t bx = (DISPLAY_SIZE_X - bodyW - nubW);
|
|
||||||
int16_t by = DISPLAY_Y_POS_HEADER;
|
|
||||||
|
|
||||||
// 0..4 filled segments (rounded to the nearest quarter).
|
|
||||||
int16_t filledBars = ((batteryPercentage + 12) / 25);
|
|
||||||
if (filledBars > 4)
|
|
||||||
{
|
|
||||||
filledBars = 4;
|
|
||||||
}
|
|
||||||
else if (filledBars < 0)
|
|
||||||
{
|
|
||||||
filledBars = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Body outline and terminal nub stay solid; only the fill blinks when low.
|
|
||||||
// NOTE: displayDrawRect uses isInverted==true for foreground (visible), whereas
|
|
||||||
// displayFillRect is the opposite (isInverted==false draws the foreground).
|
|
||||||
displayDrawRect(bx, by, bodyW, bodyH, true);
|
|
||||||
displayFillRect(bx + bodyW, by + ((bodyH - nubH) / 2), nubW, nubH, false);
|
|
||||||
|
|
||||||
for (int16_t b = 0; b < filledBars; b++)
|
|
||||||
{
|
|
||||||
displayFillRect(bx + 2 + (b * (barW + barGap)), by + 2, barW, (bodyH - 4), ((batteryIsLow ? scanBlinkPhase : false)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
snprintf(buffer, SCREEN_LINE_BUFFER_SIZE, "%d%%", batteryPercentage);
|
snprintf(buffer, SCREEN_LINE_BUFFER_SIZE, "%d%%", batteryPercentage);
|
||||||
|
|
@ -3187,13 +3149,12 @@ void announceItemWithInit(bool init, voicePromptItem_t item, audioPromptThreshol
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROMPT_SEQUENCE_BATTERY:
|
case PROMPT_SEQUENCE_BATTERY:
|
||||||
if (settingsGetBatteryUnitDisplay() == BATTERY_UNIT_VOLTAGE)
|
if (settingsIsOptionBitSet(BIT_BATTERY_VOLTAGE_IN_HEADER))
|
||||||
{
|
{
|
||||||
announceBatteryVoltage();
|
announceBatteryVoltage();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Bars mode maps to a charge percentage, so announce it as a percentage.
|
|
||||||
announceBatteryPercentage();
|
announceBatteryPercentage();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -54,9 +54,6 @@ FreeTRX keeps OpenGD77's core (DMR/FM, hotspot, CPS compatibility) and adds:
|
||||||
Channel quick menu, no PC/CPS required (see [Managing channels](#managing-channels-on-the-radio)).
|
Channel quick menu, no PC/CPS required (see [Managing channels](#managing-channels-on-the-radio)).
|
||||||
- **CRT-style shut-off animation** — the current screen collapses to a line and
|
- **CRT-style shut-off animation** — the current screen collapses to a line and
|
||||||
then a dot, like an old CRT switching off (replaces the "Power Off" message).
|
then a dot, like an old CRT switching off (replaces the "Power Off" message).
|
||||||
- **Battery bars display** — a third battery status option alongside % and
|
|
||||||
voltage: a battery-shaped icon with up to four 25 % segments (Display Options →
|
|
||||||
Battery).
|
|
||||||
- **DMR reliability fix** — resolves a hard-fault (freeze needing a battery pull)
|
- **DMR reliability fix** — resolves a hard-fault (freeze needing a battery pull)
|
||||||
on the DMR path that affected recent self-built OpenGD77 revisions.
|
on the DMR path that affected recent self-built OpenGD77 revisions.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue