lib/helper add talk_val()

talk_value_decimal() replaced talk_value()

Change-Id: Ibb7c738d6f3b399fab2e771d8ab85967e3af96d1
This commit is contained in:
William Wilgus 2021-08-18 21:30:13 -04:00
parent 24e8fa317e
commit 0679faf65d
4 changed files with 9 additions and 12 deletions

View File

@ -27,6 +27,7 @@
****************************************************************************/
#include "plugin.h"
#include "lib/helper.h"
#include "lib/kbd_helper.h"
#include "lib/configfile.h"
@ -185,12 +186,6 @@ static void config_reset_voice(void)
}
/****************** helper fuctions ******************/
static inline int talk_val(long n, int unit, bool enqueue)
{
#define NODECIMALS 0
return rb->talk_value_decimal(n, unit, NODECIMALS, enqueue);
}
void announce(void)
{
rb->talk_force_shutup();

View File

@ -22,6 +22,12 @@
#include "plugin.h"
#include "helper.h"
int talk_val(long n, int unit, bool enqueue)
{
#define NODECIMALS 0
return rb->talk_value_decimal(n, unit, NODECIMALS, enqueue);
}
#ifdef HAVE_BACKLIGHT
/* Force the backlight on */
void backlight_force_on(void)

View File

@ -23,6 +23,8 @@
#include "plugin.h"
int talk_val(long n, int unit, bool enqueue);
/**
* Backlight on/off operations
*/

View File

@ -470,12 +470,6 @@ static bool mpeg_set_int(const char *string, const char *unit,
return usb;
}
static inline int talk_val(long n, int unit, bool enqueue)
{
#define NODECIMALS 0
return rb->talk_value_decimal(n, unit, NODECIMALS, enqueue);
}
static int32_t backlight_brightness_getlang(int value, int unit)
{
if (value < 0)