mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
Update and fix TOTP
fix - added this in every button event switch:
default:
break;
This commit is contained in:
@@ -13,16 +13,28 @@
|
||||
#define DOCOPT_OPTIONS "[options]"
|
||||
#define DOCOPT_DEFAULT(val) "[default: " val "]"
|
||||
|
||||
#define TOTP_CLI_PRINTF(format, ...) \
|
||||
_Pragma(STRINGIFY(GCC diagnostic push)); \
|
||||
_Pragma(STRINGIFY(GCC diagnostic ignored "-Wdouble-promotion")); \
|
||||
printf(format, ##__VA_ARGS__); \
|
||||
_Pragma(STRINGIFY(GCC diagnostic pop));
|
||||
#define TOTP_CLI_PRINTF(format, ...) \
|
||||
do { \
|
||||
_Pragma(STRINGIFY(GCC diagnostic push)) \
|
||||
_Pragma(STRINGIFY(GCC diagnostic ignored "-Wdouble-promotion")) \
|
||||
printf(format, ##__VA_ARGS__); \
|
||||
_Pragma(STRINGIFY(GCC diagnostic pop)) \
|
||||
} while(false)
|
||||
|
||||
#define TOTP_CLI_DELETE_LAST_LINE() \
|
||||
TOTP_CLI_PRINTF("\033[A\33[2K\r"); \
|
||||
fflush(stdout)
|
||||
|
||||
#define TOTP_CLI_DELETE_CURRENT_LINE() \
|
||||
TOTP_CLI_PRINTF("\33[2K\r"); \
|
||||
fflush(stdout)
|
||||
|
||||
#define TOTP_CLI_DELETE_LAST_CHAR() \
|
||||
TOTP_CLI_PRINTF("\b \b"); \
|
||||
fflush(stdout)
|
||||
|
||||
#define TOTP_CLI_DELETE_LAST_LINE() TOTP_CLI_PRINTF("\033[A\33[2K\r")
|
||||
#define TOTP_CLI_DELETE_CURRENT_LINE() TOTP_CLI_PRINTF("\33[2K\r")
|
||||
#define TOTP_CLI_PRINT_INVALID_ARGUMENTS() \
|
||||
TOTP_CLI_PRINTF( \
|
||||
"Invalid command arguments. use \"help\" command to get list of available commands")
|
||||
|
||||
bool totp_cli_ensure_authenticated(PluginState* plugin_state, Cli* cli);
|
||||
bool totp_cli_ensure_authenticated(const PluginState* plugin_state, Cli* cli);
|
||||
|
||||
Reference in New Issue
Block a user