Added confirmation dialog and use it to confirm shutdown on receiver still connected

This commit is contained in:
Raphael Coeffic
2021-05-24 16:23:06 +02:00
committed by Raphael Coeffic
parent 51e6c48bbe
commit cb8a23cb5e
5 changed files with 177 additions and 64 deletions
+32 -20
View File
@@ -460,29 +460,41 @@ uint16_t evalChkSum();
void alert(const char * title, const char * msg, uint8_t sound);
#if !defined(GUI)
#define RAISE_ALERT(...)
#define ALERT(...)
#elif defined(COLORLCD)
void raiseAlert(const char * title, const char * msg, const char * info, uint8_t sound);
inline void RAISE_ALERT(const char * title, const char * msg, const char * info, uint8_t sound)
{
raiseAlert(title, msg, info, sound);
}
inline void ALERT(const char * title, const char * msg, uint8_t sound)
{
raiseAlert(title, msg, "", sound);
}
#else
inline void RAISE_ALERT(const char * title, const char * msg, const char * info, uint8_t sound)
{
showAlertBox(title, msg, info, sound);
}
inline void ALERT(const char * title, const char * msg, uint8_t sound)
{
alert(title, msg, sound);
}
#endif
#elif defined(COLORLCD)
bool confirmationDialog(const char *title, const char *msg, bool checkPwr = true);
void raiseAlert(const char *title, const char *msg, const char *info,
uint8_t sound);
inline void RAISE_ALERT(const char *title, const char *msg, const char *info,
uint8_t sound)
{
raiseAlert(title, msg, info, sound);
}
inline void ALERT(const char *title, const char *msg, uint8_t sound)
{
raiseAlert(title, msg, "", sound);
}
#else // !COLORLCD && GUI
inline void RAISE_ALERT(const char *title, const char *msg, const char *info,
uint8_t sound)
{
showAlertBox(title, msg, info, sound);
}
inline void ALERT(const char *title, const char *msg, uint8_t sound)
{
alert(title, msg, sound);
}
#endif // !COLORLCD && GUI
enum PerOutMode {
e_perout_mode_normal = 0,